update dev300-m58
[ooovba.git] / offapi / com / sun / star / rendering / StrokeAttributes.idl
blob0c1e57d3b4e246c0c906425c8d72871baea323a5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: StrokeAttributes.idl,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_rendering_StrokeAttributes_idl__
31 #define __com_sun_star_rendering_StrokeAttributes_idl__
33 #ifndef __com_sun_star_rendering_PathCapType_idl__
34 #include <com/sun/star/rendering/PathCapType.idl>
35 #endif
36 #ifndef __com_sun_star_rendering_PathJoinType_idl__
37 #include <com/sun/star/rendering/PathJoinType.idl>
38 #endif
41 module com { module sun { module star { module rendering {
43 /** This structure contains all attributes required for path stroking.<p>
45 Path stroking is the process of drawing a polygon with a thick
46 pen. The various attributes contained in this structure can be
47 used to customize that process.<p>
49 @single #110496#
51 struct StrokeAttributes
53 /** Defines the width of the stroke, measured in user
54 coordinate space.
56 This value must be positive (or 0.0)
57 */
58 double StrokeWidth;
60 //-------------------------------------------------------------------------
62 /** Determines the maximal length of the diagonal in mitered
63 corners.<p>
65 This attribute is only used when
66 <member>StrokeAttributes::JoinType</member> is set to
67 <member>PathJoinType::MITER</member>. Should the length of a
68 corner's diagonal exceed this limit, a bevelled join is used
69 instead. This value must be positive (or 0.0, which is
70 equivalent to setting
71 <member>StrokeAttributes::JoinType</member> to
72 <member>PathJoinType::BEVEL</member>.<p>
74 Before performing the actual comparison, implementations will
75 multiply the MiterLimit with the current StrokeWidth, such
76 that, with phi being the angle between the two joining
77 segments, MiterLimit=1/sin(phi/2.0).<p>
79 double MiterLimit;
81 //-------------------------------------------------------------------------
83 /** Array of ink on and off lengths, measured in user coordinate
84 space.<p>
86 The first element specifies the length of the first 'on'
87 segment of the dashing, the second element the length of the
88 first 'off' segment, and so forth. Give zero elements here for
89 solid strokes. This array always have an even number of
90 elements, with zero, as usual, counting as even
91 here. Furthermore, each entry in this array must have a value
92 that is positive (or 0.0)<p>
94 sequence<double> DashArray;
96 //-------------------------------------------------------------------------
98 /** Array of line widths and spacings for multiple-line
99 strokes.<p>
101 The entries here are relative to the
102 <member>StrokeAttributes::StrokeWidth</member> attribute
103 above, i.e. the total width of all lines and spacings will
104 always equal
105 <member>StrokeAttributes::StrokeWidth</member>. The first
106 element specifies the width of the rightmost line, when
107 travelling from the start point of the path to the end
108 point. The second element specifies the space between the
109 first line and the second line, and so forth. If the array
110 ends with a spacing, this spacing is included in the total
111 width of the multiple-line stroke. That is, the stroke becomes
112 asymmetric.<p>
114 sequence<double> LineArray;
116 //-------------------------------------------------------------------------
118 /** The start shape of the stroke.<p>
120 The start point is the first point of every polygon of the
121 path poly-polygon.<p>
123 @see <type>PathCapType</type>
125 byte StartCapType;
127 //-------------------------------------------------------------------------
129 /** The end shape of the stroke.<p>
131 The end point is the last point of every polygon of the path
132 poly-polygon.<p>
134 @see <type>PathCapType</type>
136 byte EndCapType;
138 //-------------------------------------------------------------------------
140 /** The join shape of the stroke.<p>
142 After every sub-stroke, i.e. after every line or curve segment
143 within a single path polygon, a shape of this type is inserted
144 into the stroke to glue the segments together. Please note
145 that distinct polygons within the path poly-polygon are not
146 connected, and therefore also not joined via the shape
147 specified here.<p>
149 @see <type>PathJoinType</type>
151 byte JoinType;
155 }; }; }; };
157 #endif