krita

KisAutogradientResource Class Reference

Inheritance diagram for KisAutogradientResource:

KisGradient KisResource List of all members.

Detailed Description

Definition at line 25 of file kis_autogradient_resource.h.


Public Member Functions

 KisAutogradientResource ()
void createSegment (int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, QColor left, QColor right)
const QValueVector< double > getHandlePositions () const
const QValueVector< double > getMiddleHandlePositions () const
void moveSegmentStartOffset (KisGradientSegment *segment, double t)
void moveSegmentEndOffset (KisGradientSegment *segment, double t)
void moveSegmentMiddleOffset (KisGradientSegment *segment, double t)
void splitSegment (KisGradientSegment *segment)
void duplicateSegment (KisGradientSegment *segment)
void mirrorSegment (KisGradientSegment *segment)
KisGradientSegmentremoveSegment (KisGradientSegment *segment)
bool removeSegmentPossible () const
void updatePreview ()
virtual bool load ()

Member Function Documentation

virtual bool KisAutogradientResource::load (  )  [inline, virtual]

Load this resource.

Reimplemented from KisGradient.

Definition at line 85 of file kis_autogradient_resource.h.

void KisAutogradientResource::moveSegmentEndOffset ( KisGradientSegment segment,
double  t 
)

Moves the endoffset of the specified segment to the specified value and corrects the startoffset of the following segment.

If the segment is the last segment the endoffset will be set to 1.0 . The offset will maximally be moved till the middle of the current or the following segment

Definition at line 82 of file kis_autogradient_resource.cc.

void KisAutogradientResource::moveSegmentMiddleOffset ( KisGradientSegment segment,
double  t 
)

Moves the Middle of the specified segment to the specified value The offset will maximally be moved till the endoffset or startoffset of the segment.

Definition at line 107 of file kis_autogradient_resource.cc.

void KisAutogradientResource::moveSegmentStartOffset ( KisGradientSegment segment,
double  t 
)

Moves the StartOffset of the specified segment to the specified value and corrects the endoffset of the previous segment.

If the segment is the first Segment the startoffset will be set to 0.0 . The offset will maximally be moved till the middle of the current or the previous segment

Definition at line 57 of file kis_autogradient_resource.cc.

KisGradientSegment * KisAutogradientResource::removeSegment ( KisGradientSegment segment  ) 

Removes the specific segment from the gradient.

Returns:
The segment which will be at the place of the old segment. 0 if the segment is not in the gradient or it is not possible to remove the segment.

Definition at line 179 of file kis_autogradient_resource.cc.

bool KisAutogradientResource::removeSegmentPossible (  )  const

Checks if it's possible to remove an segment(at least two segments in the gradient).

Returns:
true if it's possible to remove an segment

Definition at line 211 of file kis_autogradient_resource.cc.

void KisAutogradientResource::updatePreview (  ) 

Recreates the preview of the gradient.

Definition at line 218 of file kis_autogradient_resource.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys