Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: rendering ::

struct StrokeAttributes
Description
This structure contains all attributes required for path stroking.

Path stroking is the process of drawing a polygon with a thick pen. The various attributes contained in this structure can be used to customize that process.

@single #110496#


Elements' Summary
StrokeWidth Defines the width of the stroke, measured in user coordinate space. This value must be positive (or 0.0)  
MiterLimit Determines the maximal length of the diagonal in mitered corners. 
DashArray Array of ink on and off lengths, measured in user coordinate space. 
LineArray Array of line widths and spacings for multiple-line strokes. 
StartCapType The start shape of the stroke. 
EndCapType The end shape of the stroke. 
JoinType The join shape of the stroke. 
Elements' Details
StrokeWidth
double StrokeWidth;
Description
Defines the width of the stroke, measured in user coordinate space. This value must be positive (or 0.0)
MiterLimit
double MiterLimit;
Description
Determines the maximal length of the diagonal in mitered corners.

This attribute is only used when StrokeAttributes::JoinType is set to PathJoinType::MITER. Should the length of a corner's diagonal exceed this limit, a bevelled join is used instead. This value must be positive (or 0.0, which is equivalent to setting StrokeAttributes::JoinType to PathJoinType::BEVEL.

Before performing the actual comparison, implementations will multiply the MiterLimit with the current StrokeWidth, such that, with phi being the angle between the two joining segments, MiterLimit=1/sin(phi/2.0).

DashArray
sequence< double > DashArray;
Description
Array of ink on and off lengths, measured in user coordinate space.

The first element specifies the length of the first 'on' segment of the dashing, the second element the length of the first 'off' segment, and so forth. Give zero elements here for solid strokes. This array always have an even number of elements, with zero, as usual, counting as even here. Furthermore, each entry in this array must have a value that is positive (or 0.0)

LineArray
sequence< double > LineArray;
Description
Array of line widths and spacings for multiple-line strokes.

The entries here are relative to the StrokeAttributes::StrokeWidth attribute above, i.e. the total width of all lines and spacings will always equal StrokeAttributes::StrokeWidth. The first element specifies the width of the rightmost line, when travelling from the start point of the path to the end point. The second element specifies the space between the first line and the second line, and so forth. If the array ends with a spacing, this spacing is included in the total width of the multiple-line stroke. That is, the stroke becomes asymmetric.

StartCapType
byte StartCapType;
Description
The start shape of the stroke.

The start point is the first point of every polygon of the path poly-polygon.

See also
PathCapType
EndCapType
byte EndCapType;
Description
The end shape of the stroke.

The end point is the last point of every polygon of the path poly-polygon.

See also
PathCapType
JoinType
byte JoinType;
Description
The join shape of the stroke.

After every sub-stroke, i.e. after every line or curve segment within a single path polygon, a shape of this type is inserted into the stroke to glue the segments together. Please note that distinct polygons within the path poly-polygon are not connected, and therefore also not joined via the shape specified here.

See also
PathJoinType
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.