Reference for the Mosaic class Graphics::StrokePath

Graphics::StrokePath
EndCap
FlipY
FrameSize
JoinPoints
MiterLimit
Offset
Path
Quality
StartCap
Width
Resources::Bitmap
FrameDelay
FrameSize
NoOfFrames
Core::Resource

SEE ALSO

Using the Stroked Path Bitmap object to rasterize the outline of a vector graphic path.

The class Graphics::StrokePath provides a kind of graphic object specialized to stroke a path. The coordinates of the path line segments are provided in a Graphics::Path object assigned to the property Path. The resulting graphic is stored as ALPHA8 bitmap. The size of this bitmap is determined by the property FrameSize. Since the class descends from Resources::Bitmap, the resulting objects can be used as regular 'bitmaps'. The object can, for example, be used as mask bitmap in the Views::FilterImage view.

The thickness of the stroked path is controlled by the property Width. With the properties StartCap and EndCap the appearance of the path ends, if the path is opened, can be determined. The properties JoinPoints and MiterLimit control the appearance of path corners, the join points between path line segments.

With the property FlipY and Offset you can control the orientation and the origin position of the path coordinate system. Finally, the property Quality determines whether the paths is rasterized with or without antialiasing.

property Graphics::PathCap EndCap = Graphics::PathCap.Flat;

The property 'EndCap' determines how to rasterize the area at the end of every opened path. Following values are possible:

property bool FlipY = false;

The property 'FlipY' controls the vertical orientation and the position of the origin of the coordinate system of the Path assigned to this graphic object.

If this property is 'false', the coordinates provided within the Path object are assumed as being relative to the top-left corner of the resulting graphic's area with the Y-axis pointing downwards. If the property FlipY is 'true', the coordinates are relative to the bottom-left corner with the positive Y-axis pointing upwards. Please note, the origin position can additionally be moved by using the property Offset. The size of the graphic's area is determined by the property FrameSize.

property point FrameSize;

The property 'FrameSize' determines the size in pixel of a bitmap represented by this graphic object. At the runtime the bitmap will store an ALPHA8 graphic resulting from the rasterization of the path provided in Path.

property Graphics::PathJoin JoinPoints = Graphics::PathJoin.Bevel;

The property 'JoinPoints' determines how to rasterize the areas where two path segments join together. Following values are possible:

property float MiterLimit = 3.0;

The property 'MiterLimit' determines the maximum ratio between the resulting length of the miter and the half of the thickness (Width) of the stroked path. If this limit is exceeded, the affected corner is rasterized wth the Bevel mode instead of Miter.

property point Offset = <0,0>;

The property 'Offset' specifies an additional displacement to add to the coordinates provided within the Path object when the path is rasterized on the screen. Changing this property allows the graphic object to scroll the rasterized image of the path.

property Graphics::Path Path = null;

The property 'Path' refers to an object containing the coordinates of the path to fill. From the path data the graphic object rasters line segments with the thickness specified in the property Width. At the runtime, when the content of the associated path object changes, the graphic object is updated automatically.

The coordinates provided within the path object are assumed as being relative to the top-left corner of the resulting graphic's area with the Y-axis pointing downwards. If the property FlipY is 'true', the coordinates are relative to the bottom-left corner with the positive Y-axis pointing upwards. This origin can additionally be moved by using the property Offset. The size of the graphic's area is determined by the property FrameSize.

property bool Quality = true;

The property 'Quality' determines whether the path rasterization should be performed with an additional antialiasing. The usage of the antialiasing produces better and smooth outputs. Without antialiasing the edges of the path appear with steps. Depending on the underlying graphics system, an active antialiasing may impact the resulting performance. Therefore it's up to you to decide which part of the GUI should appear with the higher quality. To activate the antialiasing assign 'true' to this property.

property Graphics::PathCap StartCap = Graphics::PathCap.Flat;

The property 'StartCap' determines how to rasterize the area at the begin of every opened path. Following values are possible:

property float Width = 1.0;

The property 'Width' determines the thickness of the path to stroke. It is expressed in pixel.