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