Blender V5.0
StrokeLayer.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11
12#include <deque>
13
14#include "MEM_guardedalloc.h"
15
16namespace Freestyle {
17
18class Stroke;
19class StrokeRenderer;
21 public:
22 typedef std::deque<Stroke *> stroke_container;
23
24 protected:
26
27 public:
29
31 {
32 _strokes = iStrokes;
33 }
34
35 StrokeLayer(const StrokeLayer &iBrother)
36 {
37 _strokes = iBrother._strokes;
38 }
39
40 virtual ~StrokeLayer();
41
43 void ScaleThickness(float iFactor);
44 void Render(const StrokeRenderer *iRenderer);
45 void RenderBasic(const StrokeRenderer *iRenderer);
46
48 void clear();
49
51 inline stroke_container::iterator strokes_begin()
52 {
53 return _strokes.begin();
54 }
55
56 inline stroke_container::iterator strokes_end()
57 {
58 return _strokes.end();
59 }
60
61 inline int strokes_size() const
62 {
63 return _strokes.size();
64 }
65
66 inline bool empty() const
67 {
68 return _strokes.empty();
69 }
70
72 inline void setStrokes(stroke_container &iStrokes)
73 {
74 _strokes = iStrokes;
75 }
76
77 inline void AddStroke(Stroke *iStroke)
78 {
79 _strokes.push_back(iStroke);
80 }
81
82 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeLayer")
83};
84
85} /* namespace Freestyle */
Read Guarded memory(de)allocation.
void Render(const StrokeRenderer *iRenderer)
stroke_container _strokes
Definition StrokeLayer.h:25
stroke_container::iterator strokes_begin()
Definition StrokeLayer.h:51
StrokeLayer(const StrokeLayer &iBrother)
Definition StrokeLayer.h:35
void setStrokes(stroke_container &iStrokes)
Definition StrokeLayer.h:72
StrokeLayer(const stroke_container &iStrokes)
Definition StrokeLayer.h:30
int strokes_size() const
Definition StrokeLayer.h:61
std::deque< Stroke * > stroke_container
Definition StrokeLayer.h:22
void AddStroke(Stroke *iStroke)
Definition StrokeLayer.h:77
stroke_container::iterator strokes_end()
Definition StrokeLayer.h:56
void RenderBasic(const StrokeRenderer *iRenderer)
void ScaleThickness(float iFactor)
inherits from class Rep
Definition AppCanvas.cpp:20