2019-06-23 04:13:38 +12:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef FULLCOLORFILLTOOL_H
|
|
|
|
#define FULLCOLORFILLTOOL_H
|
|
|
|
|
|
|
|
// TnzCore includes
|
|
|
|
#include "tproperty.h"
|
|
|
|
|
|
|
|
// TnzTools includes
|
|
|
|
#include "tools/tool.h"
|
|
|
|
#include "toonz/fill.h"
|
|
|
|
#include "toonz/txshsimplelevel.h"
|
|
|
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class FullColorFillTool final : public QObject, public TTool {
|
|
|
|
Q_DECLARE_TR_FUNCTIONS(FullColorFillTool)
|
|
|
|
|
|
|
|
TXshSimpleLevelP m_level;
|
|
|
|
TDoublePairProperty m_fillDepth;
|
|
|
|
TPropertyGroup m_prop;
|
|
|
|
TPointD m_clickPoint;
|
2021-07-30 00:09:41 +12:00
|
|
|
TBoolProperty m_referenced;
|
2019-06-23 04:13:38 +12:00
|
|
|
|
|
|
|
public:
|
|
|
|
FullColorFillTool();
|
|
|
|
|
|
|
|
ToolType getToolType() const override { return TTool::LevelWriteTool; }
|
|
|
|
|
|
|
|
void updateTranslation() override;
|
|
|
|
|
|
|
|
TPropertyGroup *getProperties(int targetType) override { return &m_prop; }
|
|
|
|
|
|
|
|
FillParameters getFillParameters() const;
|
|
|
|
|
|
|
|
void leftButtonDown(const TPointD &pos, const TMouseEvent &e) override;
|
|
|
|
void leftButtonDrag(const TPointD &pos, const TMouseEvent &e) override;
|
|
|
|
|
|
|
|
bool onPropertyChanged(std::string propertyName) override;
|
|
|
|
|
|
|
|
void onActivate() override;
|
|
|
|
int getCursorId() const override;
|
2023-02-04 15:05:42 +13:00
|
|
|
|
|
|
|
private:
|
|
|
|
void applyFill(const TImageP &img, const TPointD &pos, FillParameters ¶ms,
|
|
|
|
bool isShiftFill, TXshSimpleLevel *sl, const TFrameId &fid,
|
|
|
|
TXsheet *xsheet, int frameInde);
|
2019-06-23 04:13:38 +12:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FULLCOLORFILLTOOL_H
|