krita
kis_autogradient_resource.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _KIS_AUTOGRADIENT_RESOURCE_H_
00021 #define _KIS_AUTOGRADIENT_RESOURCE_H_
00022
00023 #include "kis_gradient.h"
00024
00025 class KisAutogradientResource : public KisGradient
00026 {
00027
00028 public:
00029 KisAutogradientResource() : KisGradient("") {}
00030
00031 public:
00032
00033 void createSegment( int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, QColor left, QColor right );
00034
00035 const QValueVector<double> getHandlePositions() const;
00036 const QValueVector<double> getMiddleHandlePositions() const;
00037
00045 void moveSegmentStartOffset( KisGradientSegment* segment, double t);
00046
00054 void moveSegmentEndOffset( KisGradientSegment* segment, double t);
00055
00060 void moveSegmentMiddleOffset( KisGradientSegment* segment, double t);
00061
00062
00063 void splitSegment( KisGradientSegment* segment );
00064 void duplicateSegment( KisGradientSegment* segment );
00065 void mirrorSegment( KisGradientSegment* segment );
00066
00072 KisGradientSegment* removeSegment( KisGradientSegment* segment );
00073
00078 bool removeSegmentPossible() const;
00079
00083 void updatePreview();
00084 public:
00085 virtual bool load() { return false; };
00086 };
00087
00088 #endif // _KIS_AUTOGRADIENT_RESOURCE_H_
|