* Bug 6777 fixed: gcf().anti_aliasing was poorly documented 58/20658/3
Samuel GOUGEON [Sat, 15 Dec 2018 01:23:45 +0000 (02:23 +0100)]
  http://bugzilla.scilab.org/6777
  anti_aliasing page: http://bugzilla.scilab.org/attachment.cgi?id=4860

Change-Id: Id70bd962f0c8441e57a4083ac4d58d3236157370

scilab/CHANGES.md
scilab/modules/graphics/help/en_US/figure_operations/anti_aliasing.xml [new file with mode: 0644]
scilab/modules/graphics/help/en_US/figure_operations/figure_properties.xml
scilab/modules/graphics/help/en_US/figure_operations/pixel_drawing_mode.xml
scilab/modules/graphics/help/fr_FR/figure_operations/pixel_drawing_mode.xml
scilab/modules/graphics/help/images/anti_aliasing.png [new file with mode: 0644]
scilab/modules/graphics/help/ja_JP/figure_operations/figure_properties.xml

index 92989b5..84b27af 100644 (file)
@@ -423,6 +423,7 @@ Known issues
 * [#6548](http://bugzilla.scilab.org/show_bug.cgi?id=6548): `gamma` did not accept an hypermatrix and could not be overloaded for complex numbers.
 * [#6729](http://bugzilla.scilab.org/show_bug.cgi?id=6729): The compatibility functions `mtlb_int8`, `mtlb_int16`, `mtlb_int32`, `mtlb_uint8`, `mtlb_uint16` and `mtlb_uint32` were not actually Matlab-like. Their documentation was neither correct nor up-to-date. `mtlb_int64` and `mtlb_int64` were missing.
 * [#6737](http://bugzilla.scilab.org/show_bug.cgi?id=6737): mouse events were not correctly reported to an event handler function.
+* [#6777](http://bugzilla.scilab.org/show_bug.cgi?id=6777): `gcf().anti_aliasing` was poorly documented and was not illustrated.
 * [#6939](http://bugzilla.scilab.org/show_bug.cgi?id=6939): `nearfloat("succ",rand(2,2,2))` returned a (2,2) matrix with no error.
 * [#6990](http://bugzilla.scilab.org/show_bug.cgi?id=6990): `or(hm,"r")`, `or(hm,"c")`, `and(hm,"r")` and `and(hm,"c")` generated an error for any hypermatrix hm of booleans, encoded integers, or doubles.
 * [#7107](http://bugzilla.scilab.org/show_bug.cgi?id=7107): The `graphics_entities` page missed listing the console_properties, root_properties, uicontrol_properties, and uimenu_properties. References to `getsystemmetrics` and to `setlookandfeel` were missing in the `See also` section.
diff --git a/scilab/modules/graphics/help/en_US/figure_operations/anti_aliasing.xml b/scilab/modules/graphics/help/en_US/figure_operations/anti_aliasing.xml
new file mode 100644 (file)
index 0000000..7cff3ff
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - Jean-Baptiste SILVY
+ * Copyright (C) 2018 - Samuel GOUGEON
+ *
+ * This file is hereby licensed under the terms of the GNU GPL v2.0,
+ * pursuant to article 5.3.4 of the CeCILL v.2.1.
+ * This file was originally licensed under the terms of the CeCILL v2.1,
+ * and continues to be available under such terms.
+ * For more information, see the COPYING file which you should have received
+ * along with this program.
+ *
+ -->
+<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"
+    xml:lang="en" xml:id="anti_aliasing">
+    <refnamediv>
+        <refname>anti_aliasing</refname>
+        <refpurpose>Figure's property smoothing the stair-like aspect when rendering curves</refpurpose>
+    </refnamediv>
+    <refsection>
+        <title>Description</title>
+        <para>
+            When some curves or parts of curves have a small slope with respect to the horizontal
+            or vertical direction of ranges of screen pixels, their raw rendering shows a
+            stair-like aspect.
+        </para>
+        <para>
+            Figures have an <literal>.anti_aliasing</literal> property that can be used to smooth
+            this rendering effect. Possible values are <literal>'off'</literal>,
+            <literal>'2x'</literal>, <literal>'4x'</literal>, <literal>'8x'</literal>, or
+            <literal>'16x'</literal>.
+        </para>
+        <warning>
+            Enabling the anti-aliasing decreases the rendering speed of graphics. In average,
+            the time spent to build and display graphics varies approximately according to the
+            following factors:
+            <table>
+                <tr>
+                    <th>.anti_aliasing</th><td>off</td><td>2x</td><td>4x</td><td>8x</td><td>16x</td>
+                </tr>
+                <tr>
+                    <th>time spent</th><td>1</td><td>1.4</td><td>2.1</td><td>3.6</td><td>6.6</td>
+                </tr>
+            </table>
+        </warning>
+    </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+x = [0 1];
+y = (0:0.025:1)';
+y = [y y+0.02]';
+
+th = 0:2:360;
+xe = 4*cosd(th); xe = (0.1:0.05:1)' * xe;
+ye = sind(th);   ye = (0.1:0.05:1)' * ye;
+
+usecanvas(%t);
+
+i = 0;
+for aa = ['off' '4x' '16x']
+    f = scf(i);
+    f.axes_size = [300 600];
+    f.figure_position(1) = 100+300*i;
+    f.anti_aliasing = aa;  // <<<<<<<<
+    clf
+    subplot(2,1,1)
+    plot2d(x,y)
+    subplot(2,1,2)
+    plot2d(xe',ye')
+    title(".anti_aliasing = ''"+aa+"''", "fontsize",4);
+    i = i+1;
+end
+    ]]></programlisting>
+        <para>
+            <inlinemediaobject>
+                <imageobject>
+                    <imagedata fileref="../../images/anti_aliasing.png" />
+                </imageobject>
+            </inlinemediaobject>
+        </para>
+    </refsection>
+    <refsection role="see also">
+        <title>See also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="figure_properties">Figure properties</link>
+            </member>
+            <member>
+                <link linkend="usecanvas">usecanvas</link>
+            </member>
+            <member>
+                <link linkend="lighting">lighting</link>
+            </member>
+            <member>
+                <link linkend="pixel_drawing_mode">pixel_drawing_mode</link>
+            </member>
+            <member>
+                <link linkend="system_setproperty">system_setproperty</link>
+            </member>
+        </simplelist>
+    </refsection>
+</refentry>
index 2f5c2bb..694aa93 100644 (file)
  * along with this program.
  *
  -->
-<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"  xml:lang="en" xml:id="figure_properties">
+<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"
+          xml:lang="en" xml:id="figure_properties">
     <refnamediv>
         <refname>figure properties</refname>
         <refpurpose>description of the graphics
                         <varlistentry>
                             <term>anti_aliasing: </term>
                             <listitem>
-                                <para>This property controls the anti-aliasing level used to improve graphic quality.
-                                    If the property is set to "off", anti-aliasing is disable. To enable anti-aliasing
-                                    the property must set to either "2x", "4x", "8x" or "16x". In this case, it stands for the anti-aliasing level.
-                                    For example, "16x" is a higher quality level than "2x".
-                                    Specifying a higher anti-aliasing level improves image quality but also decreases graphic performances.
+                                <para>
+                                  This property controls the anti-aliasing level used to improve
+                                  graphic quality.
+                                  If the property is set to "off", anti-aliasing is disable.
+                                  To enable anti-aliasing, the property must set to either
+                                  "2x", "4x", "8x" or "16x". In this case, it stands for the
+                                  anti-aliasing level.
+                                  For example, "16x" is a higher quality level than "2x".
+                                  Specifying a higher anti-aliasing level improves image quality
+                                  but also decreases graphic performances.
+                                  Please visit the <link linkend="anti_aliasing">dedicated page</link>
+                                  to see specific examples.
                                 </para>
                             </listitem>
                         </varlistentry>
@@ -469,6 +479,9 @@ plot3d(t,t,sin(t)'*cos(t),35,45,'X@Y@Z',[15,2,4]);
                 <link linkend="pixel_drawing_mode">pixel_drawing_mode</link>
             </member>
             <member>
+                <link linkend="anti_aliasing">anti_aliasing</link>
+            </member>
+            <member>
                 <link linkend="colormap">colormap</link>
             </member>
             <member>
index 4543f02..dd668b8 100644 (file)
@@ -204,6 +204,9 @@ xdel(w($-15:$));
                 <link linkend="figure_properties">Figure properties</link>
             </member>
             <member>
+                <link linkend="anti_aliasing">anti_aliasing</link>
+            </member>
+            <member>
                 <link linkend="colordef">colordef</link>
             </member>
             <member>
index 152a7b0..b9a1c5d 100644 (file)
@@ -204,6 +204,9 @@ xdel(w($-15:$));
                 <link linkend="figure_properties">figure_properties</link>
             </member>
             <member>
+                <link linkend="anti_aliasing">anti_aliasing</link>
+            </member>
+            <member>
                 <link linkend="colordef">colordef</link>
             </member>
             <member>
diff --git a/scilab/modules/graphics/help/images/anti_aliasing.png b/scilab/modules/graphics/help/images/anti_aliasing.png
new file mode 100644 (file)
index 0000000..2426d1d
Binary files /dev/null and b/scilab/modules/graphics/help/images/anti_aliasing.png differ
index c4ad9e9..7cb53ef 100644 (file)
                                     例えば, "16x" は "2x"よりも高い品質となります.
                                     より高いアンチエイリアスのレベルを指定することにより画像の品質は改善されますが,
                                     グラフィック性能は低下します.
+                                    Please visit the <link linkend="anti_aliasing">dedicated page</link>
+                                    to see specific examples.
                                 </para>
                             </listitem>
                         </varlistentry>
@@ -540,6 +542,9 @@ plot3d(t,t,sin(t)'*cos(t),35,45,'X@Y@Z',[15,2,4]);
                 <link linkend="pixel_drawing_mode">pixel_drawing_mode</link>
             </member>
             <member>
+                <link linkend="anti_aliasing">anti_aliasing</link>
+            </member>
+            <member>
                 <link linkend="colormap">colormap</link>
             </member>
             <member>