Let the other namespaces in!
[shapes.git] / doc / parts / dynamic / graphic.sxml
blob18196916adbdf155dc82a9c1db92ddc3e53f9bac
1 <!-- This file is part of Shapes.                                           -->
2 <!--                                                                        -->
3 <!-- Shapes is free software: you can redistribute it and/or modify         -->
4 <!-- it under the terms of the GNU General Public License as published by   -->
5 <!-- the Free Software Foundation, either version 3 of the License, or      -->
6 <!-- any later version.                                                     -->
7 <!--                                                                        -->
8 <!-- Shapes is distributed in the hope that it will be useful,              -->
9 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of         -->
10 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          -->
11 <!-- GNU General Public License for more details.                           -->
12 <!--                                                                        -->
13 <!-- You should have received a copy of the GNU General Public License      -->
14 <!-- along with Shapes.  If not, see <http://www.gnu.org/licenses/>.        -->
15 <!--                                                                        -->
16 <!-- Copyright 2008, 2010 Henrik Tidefelt                                   -->
18 <section id="dynamic/graphic">
19 <title>Graphics</title>
20 <top>
21         <p>The bindings in this section are closely related to the <em>graphics state parameters</em> in <str-PDF />.</p>
22         <p>Many of these dynamic variables can be set to a <named-type name="Void" /> value, which means that painted objects do not specify the property for themselves, but inherit the property from the context where they appear.  This feature is a low-level <str-PDF /> trick, and the effects may be (or at least seem) unpredictable.</p>
23 </top>
25 <dynamic-variable name="width">
26         <type><union-type><named-type name="Length" /> <named-type name="Void" /></union-type></type>
27         <default><physical><scalar>1</scalar><unit>bp</unit></physical></default>
28         <constraint><self /> ≥ <physical><scalar>0</scalar><unit>bp</unit></physical></constraint>
29         <description>
30                 <p>Intended to be used as the width when paths are stroked.  A value of <physical><scalar>0</scalar><unit>bp</unit></physical> has a special meaning in <str-PDF />, being that the stroke shall be as thin as possible without dissappearing on the rendering device.  On high resolution printers, this may result in a line which is very hard to read, while such a line shall allways be clearly visible on a computer screen.</p>
31                 <p>Note that if the width is inherited from the context, it will not be possible to compute a correct bounding box of a stroked object.</p>
32         </description>
33 </dynamic-variable>
35 <dynamic-variable name="stroking">
36         <type><union-type><named-type name="Color" /> <named-type name="Void" /></union-type></type>
37         <default><value name="GRAY_BLACK" /></default>
38         <description>
39                 <p>Color used when paths are stroked.</p>
40         </description>
41         <see-also>
42                 <dynamic name="strokingalpha" />
43         </see-also>
44 </dynamic-variable>
46 <dynamic-variable name="nonstroking">
47         <type><union-type><named-type name="Color" /> <named-type name="Void" /></union-type></type>
48         <default><value name="GRAY_BLACK" /></default>
49         <description>
50                 <p>Color used when paths are filled (or, more generally, anything but stroked).  (The name is inherited from <str-PDF />.)</p>
51         </description>
52         <see-also>
53                 <dynamic name="nonstrokingalpha" />
54         </see-also>
55 </dynamic-variable>
57 <dynamic-variable name="cap">
58         <type><union-type><named-type name="CapStyle" /> <named-type name="Void" /></union-type></type>
59         <default><value name="CAP_BUTT" /></default>
60         <description>
61                 <p>Line cap style.</p>
62         </description>
63 </dynamic-variable>
65 <dynamic-variable name="join">
66         <type><union-type><named-type name="JoinStyle" /> <named-type name="Void" /></union-type></type>
67         <default><value name="JOIN_MITER" /></default>
68         <description>
69                 <p>Line join style.</p>
70         </description>
71         <see-also>
72                 <dynamic name="miterlimit" />
73         </see-also>
74 </dynamic-variable>
76 <dynamic-variable name="miterlimit">
77         <type><union-type><named-type name="Float" /> <named-type name="Void" /></union-type></type>
78         <default><eq>10</eq></default>
79         <constraint><self /> ≥ <eq>1</eq></constraint>
80         <description>
81                 <p>Miter limit value to use when <dynamic name="join" /> is <value name="JOIN_MITER" />.</p>
82         </description>
83 </dynamic-variable>
85 <dynamic-variable name="dash">
86         <type><union-type><named-type name="Dash" /> <named-type name="Void" /></union-type></type>
87         <default><inline>[dashpattern]</inline></default>
88         <description>
89                 <p>Dash pattern to use for strokes.  (The default value gives solid lines.)</p>
90         </description>
91         <see-also>
92                 <value name="dashpattern" />
93         </see-also>
94 </dynamic-variable>
96 <dynamic-variable name="strokingalpha">
97         <type><union-type><named-type name="Alpha" /> <named-type name="Void" /></union-type></type>
98         <default><inline>[shape 1]</inline></default>
99         <description>
100                 <p>Alpha settings for stroking operations.</p>
101         </description>
102         <see-also>
103                 <value name="alphashape" /> <value name="alphaopacity" /> <dynamic name="stroking" />
104         </see-also>
105 </dynamic-variable>
107 <dynamic-variable name="nonstrokingalpha">
108         <type><union-type><named-type name="Alpha" /> <named-type name="Void" /></union-type></type>
109         <default><inline>[shape 1]</inline></default>
110         <description>
111                 <p>Alpha settings for nonstroking operations.</p>
112         </description>
113         <see-also>
114                 <value name="alphashape" /> <value name="alphaopacity" /> <dynamic name="nonstroking" />
115         </see-also>
116 </dynamic-variable>
118 <dynamic-variable name="blend">
119         <type><union-type><named-type name="BlendMode" /> <named-type name="Void" /></union-type></type>
120         <default><value name="BLEND_NORMAL" /></default>
121         <description>
122                 <p>Blend mode.</p>
123         </description>
124 </dynamic-variable>
126 <dynamic-variable name="blendspace">
127         <type><named-type name="ColorSpace" /></type>
128         <default><em>(inherited)</em></default>
129         <description>
130                 <p>Color space for blending.</p>
131         </description>
132 </dynamic-variable>
134 <dynamic-variable name="spot">
135         <type><named-type name="Drawable" /></type>
136         <default><inline>dynamic [spot (0m,0m)]</inline></default>
137         <constraint><em>Cannot be changed!</em></constraint>
138         <description>
139                 <p>A function call with fixed arguments (or no arguments at all) is like a dynamic variable, and then a dynamic variable is generally preferred over the function call since using a dynamic variable emphasizes the dynamic nature of the expression.  Since the need for a spot at the origin (which can then be transformed to any desired position) is so frequent, this dynamic variable is simply an alternative to calling <value name="spot" /> with the origin as argument.</p>
140                 <p>The value of this dynamic variable will depend on other dynamic variables, compare <value name="spot" />.</p>
141         </description>
142 </dynamic-variable>
144 </section>