|
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()
Here is a C++ code example of such an iteration: - Parameters:
-
| 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. |