Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSprayShapeDynamicsOptionData Struct Reference

#include <KisSprayShapeDynamicsOptionData.h>

+ Inheritance diagram for KisSprayShapeDynamicsOptionData:

Public Member Functions

bool read (const KisPropertiesConfiguration *setting)
 
void write (KisPropertiesConfiguration *setting) const
 

Public Attributes

bool enabled
 
quint16 fixedAngle
 
bool fixedRotation
 
bool followCursor
 
qreal followCursorWeight
 
bool followDrawingAngle
 
qreal followDrawingAngleWeight
 
bool randomRotation
 
qreal randomRotationWeight
 
bool randomSize
 

Friends

bool operator== (const KisSprayShapeDynamicsOptionData &lhs, const KisSprayShapeDynamicsOptionData &rhs)
 

Detailed Description

Definition at line 17 of file KisSprayShapeDynamicsOptionData.h.

Member Function Documentation

◆ read()

bool KisSprayShapeDynamicsOptionData::read ( const KisPropertiesConfiguration * setting)

Definition at line 40 of file KisSprayShapeDynamicsOptionData.cpp.

41{
42 // Krita 2.2
43 if (settings->getString(SHAPE_DYNAMICS_VERSION, "2.2") == "2.2") {
44 randomSize = settings->getBool(SPRAYSHAPE_RANDOM_SIZE);
45 // rotation
46 fixedRotation = settings->getBool(SPRAYSHAPE_FIXED_ROTATION);
47 randomRotation = settings->getBool(SPRAYSHAPE_RANDOM_ROTATION);
48 followCursor = settings->getBool(SPRAYSHAPE_FOLLOW_CURSOR);
50 fixedAngle = settings->getInt(SPRAYSHAPE_FIXED_ANGEL);
54 }
55 // Krita latest
56 else {
57 enabled = settings->getBool(SHAPE_DYNAMICS_ENABLED);
58 // particle type size
59 randomSize = settings->getBool(SHAPE_DYNAMICS_RANDOM_SIZE);
60 // rotation dynamics
63 followCursor = settings->getBool(SHAPE_DYNAMICS_FOLLOW_CURSOR);
65 fixedAngle = settings->getInt(SHAPE_DYNAMICS_FIXED_ANGEL);
69 }
70
71 return true;
72}
const QString SHAPE_DYNAMICS_FOLLOW_CURSOR_WEIGHT
const QString SHAPE_DYNAMICS_RANDOM_ROTATION_WEIGHT
const QString SPRAYSHAPE_RANDOM_ROTATION_WEIGHT
const QString SPRAYSHAPE_DRAWING_ANGLE_WEIGHT
const QString SPRAYSHAPE_DRAWING_ANGLE
const QString SHAPE_DYNAMICS_FIXED_ANGEL
const QString SPRAYSHAPE_RANDOM_SIZE
const QString SHAPE_DYNAMICS_FOLLOW_CURSOR
const QString SPRAYSHAPE_FIXED_ANGEL
const QString SHAPE_DYNAMICS_RANDOM_SIZE
const QString SHAPE_DYNAMICS_RANDOM_ROTATION
const QString SHAPE_DYNAMICS_DRAWING_ANGLE_WEIGHT
const QString SPRAYSHAPE_RANDOM_ROTATION
const QString SHAPE_DYNAMICS_ENABLED
const QString SHAPE_DYNAMICS_VERSION
const QString SPRAYSHAPE_FOLLOW_CURSOR_WEIGHT
const QString SHAPE_DYNAMICS_DRAWING_ANGLE
const QString SPRAYSHAPE_FOLLOW_CURSOR
const QString SPRAYSHAPE_FIXED_ROTATION
const QString SHAPE_DYNAMICS_FIXED_ROTATION

References enabled, fixedAngle, fixedRotation, followCursor, followCursorWeight, followDrawingAngle, followDrawingAngleWeight, KisPropertiesConfiguration::getBool(), KisPropertiesConfiguration::getDouble(), KisPropertiesConfiguration::getInt(), KisPropertiesConfiguration::getString(), randomRotation, randomRotationWeight, randomSize, SHAPE_DYNAMICS_DRAWING_ANGLE, SHAPE_DYNAMICS_DRAWING_ANGLE_WEIGHT, SHAPE_DYNAMICS_ENABLED, SHAPE_DYNAMICS_FIXED_ANGEL, SHAPE_DYNAMICS_FIXED_ROTATION, SHAPE_DYNAMICS_FOLLOW_CURSOR, SHAPE_DYNAMICS_FOLLOW_CURSOR_WEIGHT, SHAPE_DYNAMICS_RANDOM_ROTATION, SHAPE_DYNAMICS_RANDOM_ROTATION_WEIGHT, SHAPE_DYNAMICS_RANDOM_SIZE, SHAPE_DYNAMICS_VERSION, SPRAYSHAPE_DRAWING_ANGLE, SPRAYSHAPE_DRAWING_ANGLE_WEIGHT, SPRAYSHAPE_FIXED_ANGEL, SPRAYSHAPE_FIXED_ROTATION, SPRAYSHAPE_FOLLOW_CURSOR, SPRAYSHAPE_FOLLOW_CURSOR_WEIGHT, SPRAYSHAPE_RANDOM_ROTATION, SPRAYSHAPE_RANDOM_ROTATION_WEIGHT, and SPRAYSHAPE_RANDOM_SIZE.

◆ write()

void KisSprayShapeDynamicsOptionData::write ( KisPropertiesConfiguration * setting) const

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const KisSprayShapeDynamicsOptionData & lhs,
const KisSprayShapeDynamicsOptionData & rhs )
friend

Definition at line 19 of file KisSprayShapeDynamicsOptionData.h.

19 {
20 return lhs.enabled == rhs.enabled
21 && lhs.randomSize == rhs.randomSize
22 && lhs.fixedRotation == rhs.fixedRotation
23 && lhs.randomRotation == rhs.randomRotation
24 && lhs.followCursor == rhs.followCursor
26 && lhs.fixedAngle == rhs.fixedAngle
30 }

Member Data Documentation

◆ enabled

bool KisSprayShapeDynamicsOptionData::enabled

Definition at line 32 of file KisSprayShapeDynamicsOptionData.h.

◆ fixedAngle

quint16 KisSprayShapeDynamicsOptionData::fixedAngle

Definition at line 40 of file KisSprayShapeDynamicsOptionData.h.

◆ fixedRotation

bool KisSprayShapeDynamicsOptionData::fixedRotation

Definition at line 36 of file KisSprayShapeDynamicsOptionData.h.

◆ followCursor

bool KisSprayShapeDynamicsOptionData::followCursor

Definition at line 38 of file KisSprayShapeDynamicsOptionData.h.

◆ followCursorWeight

qreal KisSprayShapeDynamicsOptionData::followCursorWeight

Definition at line 42 of file KisSprayShapeDynamicsOptionData.h.

◆ followDrawingAngle

bool KisSprayShapeDynamicsOptionData::followDrawingAngle

Definition at line 39 of file KisSprayShapeDynamicsOptionData.h.

◆ followDrawingAngleWeight

qreal KisSprayShapeDynamicsOptionData::followDrawingAngleWeight

Definition at line 43 of file KisSprayShapeDynamicsOptionData.h.

◆ randomRotation

bool KisSprayShapeDynamicsOptionData::randomRotation

Definition at line 37 of file KisSprayShapeDynamicsOptionData.h.

◆ randomRotationWeight

qreal KisSprayShapeDynamicsOptionData::randomRotationWeight

Definition at line 41 of file KisSprayShapeDynamicsOptionData.h.

◆ randomSize

bool KisSprayShapeDynamicsOptionData::randomSize

Definition at line 34 of file KisSprayShapeDynamicsOptionData.h.


The documentation for this struct was generated from the following files: