1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_rendering_StrokeAttributes_idl__
24#define __com_sun_star_rendering_StrokeAttributes_idl__
25
26module com { module sun { module star { module rendering {
27
28/** This structure contains all attributes required for path stroking.<p>
29
30    Path stroking is the process of drawing a polygon with a thick
31    pen. The various attributes contained in this structure can be
32    used to customize that process.<p>
33
34    @single #110496#
35 */
36published struct StrokeAttributes
37{
38    /** Defines the width of the stroke, measured in user
39        coordinate space.
40
41        This value must be positive (or 0.0)
42     */
43    double                  StrokeWidth;
44
45    //-------------------------------------------------------------------------
46
47    /** Determines the maximal length of the diagonal in mitered
48        corners.<p>
49
50        This attribute is only used when
51        <member>StrokeAttributes::JoinType</member> is set to
52        <member>PathJoinType::MITER</member>. Should the length of a
53        corner's diagonal exceed this limit, a bevelled join is used
54        instead. This value must be positive (or 0.0, which is
55        equivalent to setting
56        <member>StrokeAttributes::JoinType</member> to
57        <member>PathJoinType::BEVEL</member>.<p>
58
59        Before performing the actual comparison, implementations will
60        multiply the MiterLimit with the current StrokeWidth, such
61        that, with phi being the angle between the two joining
62        segments, MiterLimit=1/sin(phi/2.0).<p>
63     */
64    double				MiterLimit;
65
66    //-------------------------------------------------------------------------
67
68    /** Array of ink on and off lengths, measured in user coordinate
69        space.<p>
70
71        The first element specifies the length of the first 'on'
72        segment of the dashing, the second element the length of the
73        first 'off' segment, and so forth. Give zero elements here for
74        solid strokes. This array always have an even number of
75        elements, with zero, as usual, counting as even
76        here. Furthermore, each entry in this array must have a value
77        that is positive (or 0.0)<p>
78     */
79    sequence<double>	DashArray;
80
81    //-------------------------------------------------------------------------
82
83    /** Array of line widths and spacings for multiple-line
84        strokes.<p>
85
86        The entries here are relative to the
87        <member>StrokeAttributes::StrokeWidth</member> attribute
88        above, i.e. the total width of all lines and spacings will
89        always equal
90        <member>StrokeAttributes::StrokeWidth</member>. The first
91        element specifies the width of the rightmost line, when
92        travelling from the start point of the path to the end
93        point. The second element specifies the space between the
94        first line and the second line, and so forth. If the array
95        ends with a spacing, this spacing is included in the total
96        width of the multiple-line stroke. That is, the stroke becomes
97        asymmetric.<p>
98     */
99    sequence<double>	LineArray;
100
101    //-------------------------------------------------------------------------
102
103    /** The start shape of the stroke.<p>
104
105        The start point is the first point of every polygon of the
106        path poly-polygon.<p>
107
108        @see <type>PathCapType</type>
109     */
110    byte				StartCapType;
111
112    //-------------------------------------------------------------------------
113
114    /** The end shape of the stroke.<p>
115
116        The end point is the last point of every polygon of the path
117        poly-polygon.<p>
118
119        @see <type>PathCapType</type>
120     */
121    byte				EndCapType;
122
123    //-------------------------------------------------------------------------
124
125    /** The join shape of the stroke.<p>
126
127        After every sub-stroke, i.e. after every line or curve segment
128        within a single path polygon, a shape of this type is inserted
129        into the stroke to glue the segments together. Please note
130        that distinct polygons within the path poly-polygon are not
131        connected, and therefore also not joined via the shape
132        specified here.<p>
133
134        @see <type>PathJoinType</type>
135     */
136    byte				JoinType;
137
138};
139
140}; }; }; };
141
142#endif
143