chalk

kis_autogradient_resource.h
1/*
2 * Copyright (c) 2004 Cyrille Berger <cberger@cberger.net>
3 * 2004 Sven Langkamp <longamp@reallygood.de>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef _KIS_AUTOGRADIENT_RESOURCE_H_
21#define _KIS_AUTOGRADIENT_RESOURCE_H_
22
23#include "kis_gradient.h"
24
25class KisAutogradientResource : public KisGradient
26{
27
28public:
29 KisAutogradientResource() : KisGradient("") {}
30
31public:
32
33 void createSegment( int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, TQColor left, TQColor right );
34
35 const TQValueVector<double> getHandlePositions() const;
36 const TQValueVector<double> getMiddleHandlePositions() const;
37
45 void moveSegmentStartOffset( KisGradientSegment* segment, double t);
46
54 void moveSegmentEndOffset( KisGradientSegment* segment, double t);
55
60 void moveSegmentMiddleOffset( KisGradientSegment* segment, double t);
61
62
63 void splitSegment( KisGradientSegment* segment );
64 void duplicateSegment( KisGradientSegment* segment );
65 void mirrorSegment( KisGradientSegment* segment );
66
72 KisGradientSegment* removeSegment( KisGradientSegment* segment );
73
78 bool removeSegmentPossible() const;
79
83 void updatePreview();
84public:
85 virtual bool load() { return false; };
86};
87
88#endif // _KIS_AUTOGRADIENT_RESOURCE_H_
virtual bool load()=0
Load this resource.