h o m e | d o c u m e n t a t i o n | c l a s s h i e r a r c h y |
#include <StrokeShader.h>
Inheritance diagram for StrokeShader:
it = ioStroke.strokeVerticesBegin() while it.isEnd() == 0: att = it.getObject().attribute() ## perform here any attribute modification it.increment()
for(StrokeInternal::StrokeVertexIterator v=ioStroke.strokeVerticesBegin(), vend=ioStroke.strokeVerticesEnd(); v!=vend; ++v){ StrokeAttribute& att = v->attribute(); // perform any attribute modification here... }
Public Member Functions | |
StrokeShader () | |
virtual | ~StrokeShader () |
virtual string | getName () const |
virtual void | shade (Stroke &ioStroke) const |
StrokeShader | ( | ) | [inline] |
Default constructor.
virtual ~StrokeShader | ( | ) | [inline, virtual] |
Destructor.
virtual string getName | ( | ) | const [inline, virtual] |
Returns the string corresponding to the shader's name.
Reimplemented in ConstantThicknessShader, ConstantColorShader, streamShader, and fstreamShader.
virtual void shade | ( | Stroke & | ioStroke | ) | const [inline, virtual] |
The shading method. This method must be overloaded by inherited classes. The shading method is designed to modify any Stroke's attribute such as Thickness, Color, Geometry, Texture, Blending mode... The basic way to achieve this operation consists in iterating over the StrokeVertices of the Stroke and to modify each one's StrokeAttribute. Here is a python code example of such an iteration:
it = ioStroke.strokeVerticesBegin() while it.isEnd() == 0: att = it.getObject().attribute() ## perform here any attribute modification it.increment()
for(StrokeInternal::StrokeVertexIterator v=ioStroke.strokeVerticesBegin(), vend=ioStroke.strokeVerticesEnd(); v!=vend; ++v){ StrokeAttribute& att = v->attribute(); // perform any attribute modification here... }
ioStroke | The stroke we wish to shade. this Stroke is modified by the Shader (which typically modifies the Stroke's attribute's values such as Color, Thickness, Geometry...) |
Reimplemented in ConstantThicknessShader, IncreasingThicknessShader, ConstrainedIncreasingThicknessShader, ThicknessVariationPatternShader, ThicknessNoiseShader, ConstantColorShader, IncreasingColorShader, ColorVariationPatternShader, ColorNoiseShader, TextureAssignerShader, StrokeTextureShader, BackboneStretcherShader, SamplingShader, BezierCurveShader, PolygonalizationShader, GuidingLinesShader, TipRemoverShader, streamShader, fstreamShader, CalligraphicShader, and SpatialNoiseShader.