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