1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_rendering_StrokeAttributes_idl__
28#define __com_sun_star_rendering_StrokeAttributes_idl__
29
30module com { module sun { module star { module rendering {
31
32/** This structure contains all attributes required for path stroking.<p>
33
34    Path stroking is the process of drawing a polygon with a thick
35    pen. The various attributes contained in this structure can be
36    used to customize that process.<p>
37
38    @single #110496#
39 */
40published struct StrokeAttributes
41{
42    /** Defines the width of the stroke, measured in user
43        coordinate space.
44
45        This value must be positive (or 0.0)
46     */
47    double                  StrokeWidth;
48
49    //-------------------------------------------------------------------------
50
51    /** Determines the maximal length of the diagonal in mitered
52        corners.<p>
53
54        This attribute is only used when
55        <member>StrokeAttributes::JoinType</member> is set to
56        <member>PathJoinType::MITER</member>. Should the length of a
57        corner's diagonal exceed this limit, a bevelled join is used
58        instead. This value must be positive (or 0.0, which is
59        equivalent to setting
60        <member>StrokeAttributes::JoinType</member> to
61        <member>PathJoinType::BEVEL</member>.<p>
62
63        Before performing the actual comparison, implementations will
64        multiply the MiterLimit with the current StrokeWidth, such
65        that, with phi being the angle between the two joining
66        segments, MiterLimit=1/sin(phi/2.0).<p>
67     */
68    double				MiterLimit;
69
70    //-------------------------------------------------------------------------
71
72    /** Array of ink on and off lengths, measured in user coordinate
73        space.<p>
74
75        The first element specifies the length of the first 'on'
76        segment of the dashing, the second element the length of the
77        first 'off' segment, and so forth. Give zero elements here for
78        solid strokes. This array always have an even number of
79        elements, with zero, as usual, counting as even
80        here. Furthermore, each entry in this array must have a value
81        that is positive (or 0.0)<p>
82     */
83    sequence<double>	DashArray;
84
85    //-------------------------------------------------------------------------
86
87    /** Array of line widths and spacings for multiple-line
88        strokes.<p>
89
90        The entries here are relative to the
91        <member>StrokeAttributes::StrokeWidth</member> attribute
92        above, i.e. the total width of all lines and spacings will
93        always equal
94        <member>StrokeAttributes::StrokeWidth</member>. The first
95        element specifies the width of the rightmost line, when
96        travelling from the start point of the path to the end
97        point. The second element specifies the space between the
98        first line and the second line, and so forth. If the array
99        ends with a spacing, this spacing is included in the total
100        width of the multiple-line stroke. That is, the stroke becomes
101        asymmetric.<p>
102     */
103    sequence<double>	LineArray;
104
105    //-------------------------------------------------------------------------
106
107    /** The start shape of the stroke.<p>
108
109        The start point is the first point of every polygon of the
110        path poly-polygon.<p>
111
112        @see <type>PathCapType</type>
113     */
114    byte				StartCapType;
115
116    //-------------------------------------------------------------------------
117
118    /** The end shape of the stroke.<p>
119
120        The end point is the last point of every polygon of the path
121        poly-polygon.<p>
122
123        @see <type>PathCapType</type>
124     */
125    byte				EndCapType;
126
127    //-------------------------------------------------------------------------
128
129    /** The join shape of the stroke.<p>
130
131        After every sub-stroke, i.e. after every line or curve segment
132        within a single path polygon, a shape of this type is inserted
133        into the stroke to glue the segments together. Please note
134        that distinct polygons within the path poly-polygon are not
135        connected, and therefore also not joined via the shape
136        specified here.<p>
137
138        @see <type>PathJoinType</type>
139     */
140    byte				JoinType;
141
142};
143
144}; }; }; };
145
146#endif
147