Add more images and improves the examples
[scilab.git] / scilab / modules / graphics / help / en_US / geometric_shapes / xarc.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) ENPC - Jean-Philippe Chancelier
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="xarc">
14     <refnamediv>
15         <refname>xarc</refname>
16         <refpurpose> draw a part of an ellipse</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>xarc(x,y,w,h,a1,a2)</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>x,y,w,h</term>
27                 <listitem>
28                     <para>four real values defining a rectangle.</para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>a1,a2</term>
33                 <listitem>
34                     <para>real values defining a sector.</para>
35                 </listitem>
36             </varlistentry>
37         </variablelist>
38     </refsection>
39     <refsection>
40         <title>Description</title>
41         <para>
42             <literal>xarc</literal> draws a part of an ellipse contained in the rectangle 
43             <literal>(x,y,w,h)</literal> (upper-left point, width, height), and in the sector 
44             defined by 
45             the angle <literal>alpha1</literal> and the angle <literal>alpha1+alpha2</literal>. 
46             <literal>alpha1</literal> and <literal>alpha2</literal> are 
47             given respectively by <literal>a1/64</literal> degrees and <literal>a2/64</literal> degrees.
48             This function uses the current graphics color and user coordinates.
49         </para>
50     </refsection>
51     <refsection>
52         <title>Sample</title>
53         <scilab:image>
54             plot2d(0,0,-1,"031"," ",[-2,-2,2,2])
55             xset("color",3)
56             xarc(-1,1,2,2,0,90*64)
57             xarc(-1.5,1.5,3,3,0,360*64)
58         </scilab:image>
59     </refsection>
60     <refsection>
61         <title>Examples</title>
62         <programlisting role="example"><![CDATA[
63 // isoview scaling
64 plot2d(0,0,-1,"031"," ",[-2,-2,2,2])
65 xset("color",3)
66 xarc(-1,1,2,2,0,90*64)
67 xarc(-1.5,1.5,3,3,0,360*64)
68  ]]></programlisting>
69         
70         <programlisting role="example"><![CDATA[
71
72   rect=[-1,-1,1,1]
73   plot2d(0,0,0,rect=rect,frameflag=3,axesflag=5)
74   xrpoly([0,0],3,1)
75   xarc(-1,1,2,2,0,64*360)
76   xarc(-1,1,2,2,0,64*360)
77   xstring(1,0.1,'A')//label A
78   xstring(-0.5,0.9,'B')//label B
79   xstring(-0.5,-1,'C')//label C 
80  ]]></programlisting>
81         <scilab:image>
82             
83             rect=[-1,-1,1,1]
84             plot2d(0,0,0,rect=rect,frameflag=3,axesflag=5)
85             xrpoly([0,0],3,1)
86             xarc(-1,1,2,2,0,64*360)
87             xarc(-1,1,2,2,0,64*360)
88             xstring(1,0.1,'A')//label A
89             xstring(-0.5,0.9,'B')//label B
90             xstring(-0.5,-1,'C')//label C 
91             
92         </scilab:image>
93     </refsection>
94     <refsection role="see also">
95         <title>See Also</title>
96         <simplelist type="inline">
97             <member>
98                 <link linkend="xarcs">xarcs</link>
99             </member>
100             <member>
101                 <link linkend="xfarc">xfarc</link>
102             </member>
103             <member>
104                 <link linkend="xfarcs">xfarcs</link>
105             </member>
106         </simplelist>
107     </refsection>
108 </refentry>