1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_rendering_StrokeAttributes_idl__
28 #define __com_sun_star_rendering_StrokeAttributes_idl__
30 #ifndef __com_sun_star_rendering_PathCapType_idl__
31 #include
<com
/sun
/star
/rendering
/PathCapType.idl
>
33 #ifndef __com_sun_star_rendering_PathJoinType_idl__
34 #include
<com
/sun
/star
/rendering
/PathJoinType.idl
>
38 module com
{ module sun
{ module star
{ module rendering
{
40 /** This structure contains all attributes required for path stroking.<p>
42 Path stroking is the process of drawing a polygon with a thick
43 pen. The various attributes contained in this structure can be
44 used to customize that process.<p>
48 struct StrokeAttributes
50 /** Defines the width of the stroke, measured in user
53 This value must be positive (or 0.0)
57 //-------------------------------------------------------------------------
59 /** Determines the maximal length of the diagonal in mitered
62 This attribute is only used when
63 <member>StrokeAttributes::JoinType</member> is set to
64 <member>PathJoinType::MITER</member>. Should the length of a
65 corner's diagonal exceed this limit, a bevelled join is used
66 instead. This value must be positive (or 0.0, which is
68 <member>StrokeAttributes::JoinType</member> to
69 <member>PathJoinType::BEVEL</member>.<p>
71 Before performing the actual comparison, implementations will
72 multiply the MiterLimit with the current StrokeWidth, such
73 that, with phi being the angle between the two joining
74 segments, MiterLimit=1/sin(phi/2.0).<p>
78 //-------------------------------------------------------------------------
80 /** Array of ink on and off lengths, measured in user coordinate
83 The first element specifies the length of the first 'on'
84 segment of the dashing, the second element the length of the
85 first 'off' segment, and so forth. Give zero elements here for
86 solid strokes. This array always have an even number of
87 elements, with zero, as usual, counting as even
88 here. Furthermore, each entry in this array must have a value
89 that is positive (or 0.0)<p>
91 sequence
<double> DashArray
;
93 //-------------------------------------------------------------------------
95 /** Array of line widths and spacings for multiple-line
98 The entries here are relative to the
99 <member>StrokeAttributes::StrokeWidth</member> attribute
100 above, i.e. the total width of all lines and spacings will
102 <member>StrokeAttributes::StrokeWidth</member>. The first
103 element specifies the width of the rightmost line, when
104 travelling from the start point of the path to the end
105 point. The second element specifies the space between the
106 first line and the second line, and so forth. If the array
107 ends with a spacing, this spacing is included in the total
108 width of the multiple-line stroke. That is, the stroke becomes
111 sequence
<double> LineArray
;
113 //-------------------------------------------------------------------------
115 /** The start shape of the stroke.<p>
117 The start point is the first point of every polygon of the
118 path poly-polygon.<p>
120 @see <type>PathCapType</type>
124 //-------------------------------------------------------------------------
126 /** The end shape of the stroke.<p>
128 The end point is the last point of every polygon of the path
131 @see <type>PathCapType</type>
135 //-------------------------------------------------------------------------
137 /** The join shape of the stroke.<p>
139 After every sub-stroke, i.e. after every line or curve segment
140 within a single path polygon, a shape of this type is inserted
141 into the stroke to glue the segments together. Please note
142 that distinct polygons within the path poly-polygon are not
143 connected, and therefore also not joined via the shape
146 @see <type>PathJoinType</type>