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