26 #ifndef __VGRADIENT_H__
27 #define __VGRADIENT_H__
34 #include "scribusapi.h"
39 VColorStop(
double r,
double m, QColor c,
double o, QString n,
int s )
51 rampPoint = colorStop.rampPoint;
52 midPoint = colorStop.midPoint;
53 color = colorStop.color;
54 opacity = colorStop.opacity;
55 name = colorStop.name;
56 shade = colorStop.shade;
71 {
return s1.rampPoint == s2.rampPoint; };
93 enum VGradientRepeatMethod
101 VGradient( VGradientType type = linear );
106 bool operator==(
const VGradient& gradient)
const;
108 VGradientType type()
const {
return m_type; }
109 void setType( VGradientType type ) { m_type = type; }
111 VGradientRepeatMethod repeatMethod()
const {
return m_repeatMethod; }
112 void setRepeatMethod( VGradientRepeatMethod repeatMethod ) { m_repeatMethod = repeatMethod; }
114 const QList<VColorStop*>& colorStops()
const;
116 void addStop(
const QColor &color,
double rampPoint,
double midPoint,
double opa, QString name =
"",
int shade = 100 );
117 void setStop(
const QColor &color,
double rampPoint,
double midPoint,
double opa, QString name =
"",
int shade = 100 );
119 void removeStop( uint n );
121 uint Stops()
const {
return m_colorStops.count(); }
125 void filterStops(
void);
127 FPoint origin()
const {
return m_origin; }
128 void setOrigin(
const FPoint &origin ) { m_origin = origin; }
130 FPoint focalPoint()
const {
return m_focalPoint; }
131 void setFocalPoint(
const FPoint &focalPoint ) { m_focalPoint = focalPoint; }
133 FPoint vector()
const {
return m_vector; }
134 void setVector(
const FPoint &vector ) { m_vector = vector; }
136 void transform(
const QTransform& m );
139 QList<VColorStop*> m_colorStops;
145 VGradientType m_type;
146 VGradientRepeatMethod m_repeatMethod : 3;
Definition: vgradient.h:36
Definition: vgradient.h:78
A point with floating point precision.
Definition: fpoint.h:43