Changeset View
Changeset View
Standalone View
Standalone View
plugins/paintops/hatching/hatching_brush.h
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 47 | private: | |||
---|---|---|---|---|---|
69 | 69 | | |||
70 | /** X coordinate of the point that determines the base line */ | 70 | /** X coordinate of the point that determines the base line */ | ||
71 | double origin_x; | 71 | double origin_x; | ||
72 | 72 | | |||
73 | /** Y coordinate of the point that determines the base line */ | 73 | /** Y coordinate of the point that determines the base line */ | ||
74 | double origin_y; | 74 | double origin_y; | ||
75 | 75 | | |||
76 | /** Intercept of the base line */ | 76 | /** Intercept of the base line */ | ||
77 | double baseLineIntercept; | 77 | double baseLineIntercept {0}; | ||
78 | 78 | | |||
79 | /** Intercept of the first line _found to_ pass or be neighbour of a line | 79 | /** Intercept of the first line _found to_ pass or be neighbour of a line | ||
80 | * that passes through the hatching area, this line is used as a base | 80 | * that passes through the hatching area, this line is used as a base | ||
81 | * to start iterating with HatchingBrush::iterateLines() | 81 | * to start iterating with HatchingBrush::iterateLines() | ||
82 | */ | 82 | */ | ||
83 | double hotIntercept; | 83 | double hotIntercept {0}; | ||
84 | 84 | | |||
85 | /** Intercept of each line as it is scanned, this value changes constantly */ | 85 | /** Intercept of each line as it is scanned, this value changes constantly */ | ||
86 | double scanIntercept; | 86 | double scanIntercept {0}; | ||
87 | 87 | | |||
88 | /** X position of the first vertical line _found to_ pass or be neighbour | 88 | /** X position of the first vertical line _found to_ pass or be neighbour | ||
89 | * of a line that passes through the hatching area, this line is used as | 89 | * of a line that passes through the hatching area, this line is used as | ||
90 | * a base to start iterating with HatchingBrush::iterateVerticalLines() | 90 | * a base to start iterating with HatchingBrush::iterateVerticalLines() | ||
91 | */ | 91 | */ | ||
92 | double verticalHotX; | 92 | double verticalHotX; | ||
93 | 93 | | |||
94 | /** X position of the vertical lines as they are scanned, this value changes constantly */ | 94 | /** X position of the vertical lines as they are scanned, this value changes constantly */ | ||
95 | double verticalScanX; | 95 | double verticalScanX; | ||
96 | 96 | | |||
97 | /** Angle of the lines expressed algebraically, as in slope*x + intercept = y */ | 97 | /** Angle of the lines expressed algebraically, as in slope*x + intercept = y */ | ||
98 | double slope; | 98 | double slope {0}; | ||
99 | 99 | | |||
100 | /** Unused variable, distance separating non-vertical lines in the X axis*/ | 100 | /** Unused variable, distance separating non-vertical lines in the X axis*/ | ||
101 | double dx; | 101 | double dx {0}; | ||
102 | 102 | | |||
103 | /** Distance separating non-vertical lines in the Y axis*/ | 103 | /** Distance separating non-vertical lines in the Y axis*/ | ||
104 | double dy; | 104 | double dy {0}; | ||
105 | 105 | | |||
106 | /** Intercept of the line that extends from the mouse cursor position, calculated from | 106 | /** Intercept of the line that extends from the mouse cursor position, calculated from | ||
107 | * the point (x, y) of the cursor and 'slope' | 107 | * the point (x, y) of the cursor and 'slope' | ||
108 | */ | 108 | */ | ||
109 | double cursorLineIntercept; | 109 | double cursorLineIntercept {0}; | ||
110 | 110 | | |||
111 | /** Function that begins exploring the field from hotIntercept and | 111 | /** Function that begins exploring the field from hotIntercept and | ||
112 | * moves in the direction of dy (forward==true) or -dy (forward==false) | 112 | * moves in the direction of dy (forward==true) or -dy (forward==false) | ||
113 | * to draw all the lines it finds to KisPaintDeviceSP 'dev' | 113 | * to draw all the lines it finds to KisPaintDeviceSP 'dev' | ||
114 | */ | 114 | */ | ||
115 | void iterateLines(bool forward, int lineindex, bool oneline); | 115 | void iterateLines(bool forward, int lineindex, bool oneline); | ||
116 | 116 | | |||
117 | /** Function that begins exploring the field from verticalHotX and | 117 | /** Function that begins exploring the field from verticalHotX and | ||
Show All 17 Lines |