Krita Source Code Documentation
Loading...
Searching...
No Matches
FreehandStrokeStrategy::Data Class Reference

#include <freehand_stroke.h>

+ Inheritance diagram for FreehandStrokeStrategy::Data:

Public Types

enum  DabType {
  POINT , LINE , CURVE , POLYLINE ,
  POLYGON , RECT , ELLIPSE , PAINTER_PATH ,
  QPAINTER_PATH , QPAINTER_PATH_FILL
}
 
- Public Types inherited from KisStrokeJobData
enum  Exclusivity { NORMAL , EXCLUSIVE }
 
enum  Sequentiality { CONCURRENT , SEQUENTIAL , BARRIER , UNIQUELY_CONCURRENT }
 

Public Member Functions

KisStrokeJobDatacreateLodClone (int levelOfDetail) override
 
 Data (int _strokeInfoId, const KisPaintInformation &_pi)
 
 Data (int _strokeInfoId, const KisPaintInformation &_pi1, const KisPaintInformation &_pi2)
 
 Data (int _strokeInfoId, const KisPaintInformation &_pi1, const QPointF &_control1, const QPointF &_control2, const KisPaintInformation &_pi2)
 
 Data (int _strokeInfoId, DabType _type, const QPainterPath &_path)
 
 Data (int _strokeInfoId, DabType _type, const QPainterPath &_path, const QPen &_pen, const KoColor &_customColor)
 
 Data (int _strokeInfoId, DabType _type, const QRectF &_rect)
 
 Data (int _strokeInfoId, DabType _type, const vQPointF &_points)
 
- Public Member Functions inherited from KisStrokeJobData
Exclusivity exclusivity ()
 
bool isBarrier () const
 
bool isCancellable () const
 
bool isExclusive () const
 
bool isSequential () const
 
 KisStrokeJobData (Sequentiality sequentiality=SEQUENTIAL, Exclusivity exclusivity=NORMAL)
 
int levelOfDetailOverride () const
 
Sequentiality sequentiality ()
 
void setCancellable (bool value)
 
void setLevelOfDetailOverride (int value)
 
virtual ~KisStrokeJobData ()
 

Public Attributes

QPointF control1
 
QPointF control2
 
KoColor customColor
 
QPainterPath path
 
QPen pen
 
KisPaintInformation pi1
 
KisPaintInformation pi2
 
vQPointF points
 
QRectF rect
 
int strokeInfoId
 
DabType type
 

Private Member Functions

 Data (const Data &rhs, int levelOfDetail)
 

Additional Inherited Members

- Protected Member Functions inherited from KisStrokeJobData
 KisStrokeJobData (const KisStrokeJobData &rhs)
 

Detailed Description

Definition at line 34 of file freehand_stroke.h.

Member Enumeration Documentation

◆ DabType

Constructor & Destructor Documentation

◆ Data() [1/8]

FreehandStrokeStrategy::Data::Data ( int _strokeInfoId,
const KisPaintInformation & _pi )
inline

Definition at line 49 of file freehand_stroke.h.

52 strokeInfoId(_strokeInfoId),
53 type(POINT), pi1(_pi)
54 {}
KisStrokeJobData(Sequentiality sequentiality=SEQUENTIAL, Exclusivity exclusivity=NORMAL)

◆ Data() [2/8]

FreehandStrokeStrategy::Data::Data ( int _strokeInfoId,
const KisPaintInformation & _pi1,
const KisPaintInformation & _pi2 )
inline

Definition at line 56 of file freehand_stroke.h.

60 strokeInfoId(_strokeInfoId),
61 type(LINE), pi1(_pi1), pi2(_pi2)
62 {}

◆ Data() [3/8]

FreehandStrokeStrategy::Data::Data ( int _strokeInfoId,
const KisPaintInformation & _pi1,
const QPointF & _control1,
const QPointF & _control2,
const KisPaintInformation & _pi2 )
inline

Definition at line 64 of file freehand_stroke.h.

70 strokeInfoId(_strokeInfoId),
71 type(CURVE), pi1(_pi1), pi2(_pi2),
72 control1(_control1), control2(_control2)
73 {}

◆ Data() [4/8]

FreehandStrokeStrategy::Data::Data ( int _strokeInfoId,
DabType _type,
const vQPointF & _points )
inline

Definition at line 75 of file freehand_stroke.h.

◆ Data() [5/8]

FreehandStrokeStrategy::Data::Data ( int _strokeInfoId,
DabType _type,
const QRectF & _rect )
inline

Definition at line 83 of file freehand_stroke.h.

◆ Data() [6/8]

FreehandStrokeStrategy::Data::Data ( int _strokeInfoId,
DabType _type,
const QPainterPath & _path )
inline

Definition at line 91 of file freehand_stroke.h.

◆ Data() [7/8]

FreehandStrokeStrategy::Data::Data ( int _strokeInfoId,
DabType _type,
const QPainterPath & _path,
const QPen & _pen,
const KoColor & _customColor )
inline

Definition at line 99 of file freehand_stroke.h.

104 strokeInfoId(_strokeInfoId),
105 type(_type), path(_path),
106 pen(_pen), customColor(_customColor)
107 {}

◆ Data() [8/8]

FreehandStrokeStrategy::Data::Data ( const Data & rhs,
int levelOfDetail )
inlineprivate

Definition at line 114 of file freehand_stroke.h.

115 : KisStrokeJobData(rhs),
116 strokeInfoId(rhs.strokeInfoId),
117 type(rhs.type)
118 {
119 KisLodTransform t(levelOfDetail);
120
121 switch(type) {
122 case Data::POINT:
123 pi1 = t.map(rhs.pi1);
124 break;
125 case Data::LINE:
126 pi1 = t.map(rhs.pi1);
127 pi2 = t.map(rhs.pi2);
128 break;
129 case Data::CURVE:
130 pi1 = t.map(rhs.pi1);
131 pi2 = t.map(rhs.pi2);
132 control1 = t.map(rhs.control1);
133 control2 = t.map(rhs.control2);
134 break;
135 case Data::POLYLINE:
136 points = t.map(rhs.points);
137 break;
138 case Data::POLYGON:
139 points = t.map(rhs.points);
140 break;
141 case Data::RECT:
142 rect = t.map(rhs.rect);
143 break;
144 case Data::ELLIPSE:
145 rect = t.map(rhs.rect);
146 break;
148 path = t.map(rhs.path);
149 break;
151 path = t.map(rhs.path);
152 pen = rhs.pen;
153 break;
155 path = t.map(rhs.path);
156 pen = rhs.pen;
157 customColor = rhs.customColor;
158 break;
159 };
160 }

References control1, control2, customColor, KisLodTransform::map(), path, pen, pi1, pi2, points, and rect.

Member Function Documentation

◆ createLodClone()

KisStrokeJobData * FreehandStrokeStrategy::Data::createLodClone ( int levelOfDetail)
inlineoverridevirtual

Reimplemented from KisStrokeJobData.

Definition at line 109 of file freehand_stroke.h.

109 {
110 return new Data(*this, levelOfDetail);
111 }
Data(int _strokeInfoId, const KisPaintInformation &_pi)

Member Data Documentation

◆ control1

QPointF FreehandStrokeStrategy::Data::control1

Definition at line 167 of file freehand_stroke.h.

◆ control2

QPointF FreehandStrokeStrategy::Data::control2

Definition at line 168 of file freehand_stroke.h.

◆ customColor

KoColor FreehandStrokeStrategy::Data::customColor

Definition at line 174 of file freehand_stroke.h.

◆ path

QPainterPath FreehandStrokeStrategy::Data::path

Definition at line 172 of file freehand_stroke.h.

◆ pen

QPen FreehandStrokeStrategy::Data::pen

Definition at line 173 of file freehand_stroke.h.

◆ pi1

KisPaintInformation FreehandStrokeStrategy::Data::pi1

Definition at line 165 of file freehand_stroke.h.

◆ pi2

KisPaintInformation FreehandStrokeStrategy::Data::pi2

Definition at line 166 of file freehand_stroke.h.

◆ points

vQPointF FreehandStrokeStrategy::Data::points

Definition at line 170 of file freehand_stroke.h.

◆ rect

QRectF FreehandStrokeStrategy::Data::rect

Definition at line 171 of file freehand_stroke.h.

◆ strokeInfoId

int FreehandStrokeStrategy::Data::strokeInfoId

Definition at line 162 of file freehand_stroke.h.

◆ type

DabType FreehandStrokeStrategy::Data::type

Definition at line 164 of file freehand_stroke.h.


The documentation for this class was generated from the following file: