Blender  V2.93
StrokeLayer.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
22 #include "StrokeLayer.h"
23 #include "Canvas.h"
24 #include "Stroke.h"
25 
26 namespace Freestyle {
27 
29 {
30  clear();
31 }
32 
33 void StrokeLayer::ScaleThickness(float iFactor)
34 {
35  for (StrokeLayer::stroke_container::iterator s = _strokes.begin(), send = _strokes.end();
36  s != send;
37  ++s) {
38  (*s)->ScaleThickness(iFactor);
39  }
40 }
41 
42 void StrokeLayer::Render(const StrokeRenderer *iRenderer)
43 {
44  for (StrokeLayer::stroke_container::iterator s = _strokes.begin(), send = _strokes.end();
45  s != send;
46  ++s) {
47  (*s)->Render(iRenderer);
48  }
49 }
50 
52 {
53  for (StrokeLayer::stroke_container::iterator s = _strokes.begin(), send = _strokes.end();
54  s != send;
55  ++s) {
56  (*s)->RenderBasic(iRenderer);
57  }
58 }
59 
61 {
62  for (stroke_container::iterator s = _strokes.begin(), send = _strokes.end(); s != send; ++s) {
63  delete *s;
64  }
65  _strokes.clear();
66 }
67 
68 } /* namespace Freestyle */
Class to define a canvas designed to draw style modules.
Class to define a layer of strokes.
Classes to define a stroke.
void Render(const StrokeRenderer *iRenderer)
Definition: StrokeLayer.cpp:42
stroke_container _strokes
Definition: StrokeLayer.h:39
void RenderBasic(const StrokeRenderer *iRenderer)
Definition: StrokeLayer.cpp:51
void ScaleThickness(float iFactor)
Definition: StrokeLayer.cpp:33
inherits from class Rep
Definition: AppCanvas.cpp:32