More samples in the graphic help pages Note that they are automatically generated...
[scilab.git] / scilab / modules / graphics / help / en_US / pixel_drawing_mode.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) 2010 - DIGITEO - Pierre Lando <pierre.lando@scilab.org>
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" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="pixel_drawing_mode">
14   <info>
15     <pubdate>$LastChangedDate$</pubdate>
16   </info>
17   <refnamediv>
18     <refname>pixel_drawing_mode</refname>
19     <refpurpose>bitwise pixel rendering functions.</refpurpose>
20   </refnamediv>
21   <refsection>
22     <title>Description</title>
23     <para>      
24       Here, the color encoding is RGB.
25       The pixel drawing mode is a <link linkend="figure_properties">figure property</link> that
26       specifies a bitwise operation applied on any figure pixel between the incoming color and the already existing color on the figure.
27       The result of this operation will be the new pixel color.
28       
29       
30       <literal>src</literal> is the incoming color of the pixel.
31       <literal>prv</literal> is the previus color of the pixel (which is already drawn).
32       <literal>res</literal> is the resulting color of the pixel (which will be drawn).
33       
34       Possible values for <literal>pixel_drawing_mode</literal> are:
35     </para>
36     <informaltable border="1">
37       <tr>
38         <td>value</td>
39         <td>bitwise operation</td>
40         <td>comments</td>
41       </tr>
42       <tr>
43         <td>0</td>
44         <td>CLEAR</td>
45         <td>Result color is black</td>
46       </tr>
47       <tr>
48         <td>1</td>
49         <td>AND</td>
50         <td>res = src AND prv</td>
51       </tr>
52       <tr>
53         <td>2</td>
54         <td>AND REVERSE</td>
55         <td>res = src AND (NOT prv)</td>
56       </tr>
57       <tr>
58         <td>3</td>
59         <td>COPY</td>
60         <td>res = src, default value</td>
61       </tr>
62       <tr>
63         <td>4</td>
64         <td>AND INVERTED</td>
65         <td>res = (NOT src) AND prv</td>
66       </tr>
67       <tr>
68         <td>5</td>
69         <td>NOOP</td>
70         <td>res = prv</td>
71       </tr>
72       <tr>
73         <td>6</td>
74         <td>XOR</td>
75         <td>res = src XOR prv</td>
76       </tr>
77       <tr>
78         <td>7</td>
79         <td>OR</td>
80         <td>res = src OR prv</td>
81       </tr>
82       <tr>
83         <td>8</td>
84         <td>NOR</td>
85         <td>res = NOT (src OR prv)</td>
86       </tr>
87       <tr>
88         <td>9</td>
89         <td>EQUIV</td>
90         <td>res = (NOT src) XOR prv</td>
91       </tr>
92       <tr>
93         <td>10</td>
94         <td>INVERT</td>
95         <td>res = NOT prv</td>
96       </tr>
97       <tr>
98         <td>11</td>
99         <td>OR REVERSE</td>
100         <td>res = src OR (NOT prv)</td>
101       </tr>
102       <tr>
103         <td>12</td>
104         <td>COPY INVERTED</td>
105         <td>res = NOT src</td>
106       </tr>
107       <tr>
108         <td>13</td>
109         <td>OR INVERTED</td>
110         <td>res = (NOT src) OR prv</td>
111       </tr>
112       <tr>
113         <td>14</td>
114         <td>NAND</td>
115         <td>res = NOT (src AND prv)</td>
116       </tr>
117       <tr>
118         <td>15</td>
119         <td>SET</td>
120         <td>Result color is white</td>
121       </tr>
122     </informaltable>
123   </refsection>
124 </refentry>