ZealOS/docs/System/Gr/GrComposites.CC.html
2021-08-17 02:47:37 -04:00

450 lines
46 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V1.00">
<style type="text/css">
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Graphics&quot;</span><span class=cF0>
<a name="l2"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>GrFillPoly3</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> n, </span><span class=cF9>CD3I32</span><span class=cF0> *poly)
<a name="l3"></a>{</span><span class=cF2>//3D. Must be convex.</span><span class=cF0>
<a name="l4"></a></span><span class=cF2>//Returns count of pixs changed</span><span class=cF0>
<a name="l5"></a> </span><span class=cF9>CD3I32</span><span class=cF0> tri[</span><span class=cFE>3</span><span class=cF0>];
<a name="l6"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, x, y, z, res = </span><span class=cFE>0</span><span class=cF0>;
<a name="l7"></a>
<a name="l8"></a> </span><span class=cF1>if</span><span class=cF0> (n &lt; </span><span class=cFE>3</span><span class=cF0>)
<a name="l9"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cFE>0</span><span class=cF0>;
<a name="l10"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>)
<a name="l11"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l12"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>1</span><span class=cF0>; i &lt; n - </span><span class=cFE>1</span><span class=cF0>; i++)
<a name="l13"></a> {
<a name="l14"></a> j = i - </span><span class=cFE>1</span><span class=cF0>;
<a name="l15"></a> </span><span class=cF1>if</span><span class=cF0> (i == </span><span class=cFE>1</span><span class=cF0>)
<a name="l16"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l17"></a> x = poly[j].x;
<a name="l18"></a> y = poly[j].y;
<a name="l19"></a> z = poly[j].z;
<a name="l20"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l21"></a> (*dc-&gt;transform)(dc, &amp;x, &amp;y, &amp;z);
<a name="l22"></a> </span><span class=cF5>DCReflect</span><span class=cF0>(dc, &amp;x, &amp;y, &amp;z);
<a name="l23"></a> tri[</span><span class=cFE>0</span><span class=cF0>].x = x;
<a name="l24"></a> tri[</span><span class=cFE>0</span><span class=cF0>].y = y;
<a name="l25"></a> tri[</span><span class=cFE>0</span><span class=cF0>].z = z;
<a name="l26"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l27"></a>
<a name="l28"></a> j++;
<a name="l29"></a> </span><span class=cF1>if</span><span class=cF0> (i == </span><span class=cFE>1</span><span class=cF0>)
<a name="l30"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l31"></a> x = poly[j].x;
<a name="l32"></a> y = poly[j].y;
<a name="l33"></a> z = poly[j].z;
<a name="l34"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l35"></a> (*dc-&gt;transform)(dc, &amp;x, &amp;y, &amp;z);
<a name="l36"></a> </span><span class=cF5>DCReflect</span><span class=cF0>(dc, &amp;x, &amp;y, &amp;z);
<a name="l37"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l38"></a> tri[</span><span class=cFE>1</span><span class=cF0>].x = x;
<a name="l39"></a> tri[</span><span class=cFE>1</span><span class=cF0>].y = y;
<a name="l40"></a> tri[</span><span class=cFE>1</span><span class=cF0>].z = z;
<a name="l41"></a>
<a name="l42"></a> j++;
<a name="l43"></a> x = poly[j].x;
<a name="l44"></a> y = poly[j].y;
<a name="l45"></a> z = poly[j].z;
<a name="l46"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l47"></a> (*dc-&gt;transform)(dc, &amp;x, &amp;y, &amp;z);
<a name="l48"></a> </span><span class=cF5>DCReflect</span><span class=cF0>(dc, &amp;x, &amp;y, &amp;z);
<a name="l49"></a> tri[</span><span class=cFE>2</span><span class=cF0>].x = x;
<a name="l50"></a> tri[</span><span class=cFE>2</span><span class=cF0>].y = y;
<a name="l51"></a> tri[</span><span class=cFE>2</span><span class=cF0>].z = z;
<a name="l52"></a>
<a name="l53"></a> res += </span><span class=cF5>GrFillTri0</span><span class=cF0>(dc, &amp;tri[</span><span class=cFE>0</span><span class=cF0>], &amp;tri[</span><span class=cFE>1</span><span class=cF0>], &amp;tri[</span><span class=cFE>2</span><span class=cF0>]);
<a name="l54"></a> }
<a name="l55"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l56"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_JUST_MIRROR</span><span class=cF0>)
<a name="l57"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l58"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>1</span><span class=cF0>; i &lt; n - </span><span class=cFE>1</span><span class=cF0>; i++)
<a name="l59"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l60"></a> j = i - </span><span class=cFE>1</span><span class=cF0>;
<a name="l61"></a> </span><span class=cF1>if</span><span class=cF0> (i == </span><span class=cFE>1</span><span class=cF0>)
<a name="l62"></a> {
<a name="l63"></a> x = poly[j].x;
<a name="l64"></a> y = poly[j].y;
<a name="l65"></a> z = poly[j].z;
<a name="l66"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l67"></a> (*dc-&gt;transform)(dc, &amp;x, &amp;y, &amp;z);
<a name="l68"></a> tri[</span><span class=cFE>0</span><span class=cF0>].x = x;
<a name="l69"></a> tri[</span><span class=cFE>0</span><span class=cF0>].y = y;
<a name="l70"></a> tri[</span><span class=cFE>0</span><span class=cF0>].z = z;
<a name="l71"></a> }
<a name="l72"></a>
<a name="l73"></a> j++;
<a name="l74"></a> </span><span class=cF1>if</span><span class=cF0> (i == </span><span class=cFE>1</span><span class=cF0>)
<a name="l75"></a> {
<a name="l76"></a> x = poly[j].x;
<a name="l77"></a> y = poly[j].y;
<a name="l78"></a> z = poly[j].z;
<a name="l79"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l80"></a> (*dc-&gt;transform)(dc, &amp;x, &amp;y, &amp;z);
<a name="l81"></a> }
<a name="l82"></a> tri[</span><span class=cFE>1</span><span class=cF0>].x = x;
<a name="l83"></a> tri[</span><span class=cFE>1</span><span class=cF0>].y = y;
<a name="l84"></a> tri[</span><span class=cFE>1</span><span class=cF0>].z = z;
<a name="l85"></a>
<a name="l86"></a> j++;
<a name="l87"></a> x = poly[j].x;
<a name="l88"></a> y = poly[j].y;
<a name="l89"></a> z = poly[j].z;
<a name="l90"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l91"></a> (*dc-&gt;transform)(dc, &amp;x, &amp;y, &amp;z);
<a name="l92"></a> tri[</span><span class=cFE>2</span><span class=cF0>].x = x;
<a name="l93"></a> tri[</span><span class=cFE>2</span><span class=cF0>].y = y;
<a name="l94"></a> tri[</span><span class=cFE>2</span><span class=cF0>].z = z;
<a name="l95"></a>
<a name="l96"></a> res += </span><span class=cF5>GrFillTri0</span><span class=cF0>(dc, &amp;tri[</span><span class=cFE>0</span><span class=cF0>], &amp;tri[</span><span class=cFE>1</span><span class=cF0>], &amp;tri[</span><span class=cFE>2</span><span class=cF0>]);
<a name="l97"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l98"></a>
<a name="l99"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l100"></a>}
<a name="l101"></a>
<a name="l102"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>GrRectB</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> x1, </span><span class=cF9>I64</span><span class=cF0> y1, </span><span class=cF9>I64</span><span class=cF0> x2, </span><span class=cF9>I64</span><span class=cF0> y2)
<a name="l103"></a>{</span><span class=cF2>//2D. Two point. Clipping but not transformation.</span><span class=cF0>
<a name="l104"></a> </span><span class=cF1>if</span><span class=cF0> (x2 &lt; x1)
<a name="l105"></a> </span><span class=cF5>SwapI64</span><span class=cF0>(&amp;x1, &amp;x2);
<a name="l106"></a> </span><span class=cF1>if</span><span class=cF0> (y2 &lt; y1)
<a name="l107"></a> </span><span class=cF5>SwapI64</span><span class=cF0>(&amp;y1, &amp;y2);
<a name="l108"></a>
<a name="l109"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>GrRect</span><span class=cF0>(dc, x1, y1, x2 - x1 + </span><span class=cFE>1</span><span class=cF0>, y2 - y1 + </span><span class=cFE>1</span><span class=cF0>);
<a name="l110"></a>}
<a name="l111"></a>
<a name="l112"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>GrRect3</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> x, </span><span class=cF9>I64</span><span class=cF0> y, </span><span class=cF9>I64</span><span class=cF0> z, </span><span class=cF9>I64</span><span class=cF0> w, </span><span class=cF9>I64</span><span class=cF0> h)
<a name="l113"></a>{</span><span class=cF2>//3D. Width Height. Clipping and transformation.</span><span class=cF0>
<a name="l114"></a> </span><span class=cF9>CD3I32</span><span class=cF0> poly[</span><span class=cFE>4</span><span class=cF0>];
<a name="l115"></a>
<a name="l116"></a> poly[</span><span class=cFE>0</span><span class=cF0>].x = x;
<a name="l117"></a> poly[</span><span class=cFE>0</span><span class=cF0>].y = y;
<a name="l118"></a> poly[</span><span class=cFE>0</span><span class=cF0>].z = z;
<a name="l119"></a> poly[</span><span class=cFE>1</span><span class=cF0>].x = x + w;
<a name="l120"></a> poly[</span><span class=cFE>1</span><span class=cF0>].y = y;
<a name="l121"></a> poly[</span><span class=cFE>1</span><span class=cF0>].z = z;
<a name="l122"></a> poly[</span><span class=cFE>2</span><span class=cF0>].x = x + w;
<a name="l123"></a> poly[</span><span class=cFE>2</span><span class=cF0>].y = y + h;
<a name="l124"></a> poly[</span><span class=cFE>2</span><span class=cF0>].z = z;
<a name="l125"></a> poly[</span><span class=cFE>3</span><span class=cF0>].x = x;
<a name="l126"></a> poly[</span><span class=cFE>3</span><span class=cF0>].y = y + h;
<a name="l127"></a> poly[</span><span class=cFE>3</span><span class=cF0>].z = z;
<a name="l128"></a>
<a name="l129"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>GrFillPoly3</span><span class=cF0>(dc, </span><span class=cFE>4</span><span class=cF0>, poly);
<a name="l130"></a>}
<a name="l131"></a>
<a name="l132"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>GrBorder</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> x1, </span><span class=cF9>I64</span><span class=cF0> y1, </span><span class=cF9>I64</span><span class=cF0> x2, </span><span class=cF9>I64</span><span class=cF0> y2, </span><span class=cF9>I64</span><span class=cF0> step=</span><span class=cFE>1</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF1>start</span><span class=cF0>=</span><span class=cFE>0</span><span class=cF0>)
<a name="l133"></a>{</span><span class=cF2>//2D. Transformation with thick.</span><span class=cF0>
<a name="l134"></a></span><span class=cF2>//Can be used with ROPF_DITHER+WHITE&lt;&lt;16+BLACK for dotted rect.</span><span class=cF0>
<a name="l135"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y1, </span><span class=cFE>0</span><span class=cF0>, step, </span><span class=cF1>start</span><span class=cF0>);
<a name="l136"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x2, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>, step, </span><span class=cF1>start</span><span class=cF0>);
<a name="l137"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x2, y2, </span><span class=cFE>0</span><span class=cF0>, x1, y2, </span><span class=cFE>0</span><span class=cF0>, step, </span><span class=cF1>start</span><span class=cF0>);
<a name="l138"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y2, </span><span class=cFE>0</span><span class=cF0>, x1, y1, </span><span class=cFE>0</span><span class=cF0>, step, </span><span class=cF1>start</span><span class=cF0>);
<a name="l139"></a>}
<a name="l140"></a>
<a name="l141"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>GrArrow3</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> x1, </span><span class=cF9>I64</span><span class=cF0> y1, </span><span class=cF9>I64</span><span class=cF0> z1, </span><span class=cF9>I64</span><span class=cF0> x2, </span><span class=cF9>I64</span><span class=cF0> y2, </span><span class=cF9>I64</span><span class=cF0> z2, </span><span class=cF1>F64</span><span class=cF0> w=</span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>75</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> step=</span><span class=cFE>1</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF1>start</span><span class=cF0>=</span><span class=cFE>0</span><span class=cF0>)
<a name="l142"></a>{</span><span class=cF2>//3D. Transformation with thick.</span><span class=cF0>
<a name="l143"></a> </span><span class=cF9>I64</span><span class=cF0> _x1, _y1, _z1, _x2, _y2, _z2, dx, dy;
<a name="l144"></a> </span><span class=cF1>F64</span><span class=cF0> d;
<a name="l145"></a> </span><span class=cF1>Bool</span><span class=cF0> res = </span><span class=cF3>FALSE</span><span class=cF0>, was_transform = </span><span class=cF3>FALSE</span><span class=cF0>, was_symmetry = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l146"></a>
<a name="l147"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l148"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l149"></a> (*dc-&gt;transform)(dc, &amp;x1, &amp;y1, &amp;z1);
<a name="l150"></a> (*dc-&gt;transform)(dc, &amp;x2, &amp;y2, &amp;z2);
<a name="l151"></a> dc-&gt;flags &amp;= ~</span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>;
<a name="l152"></a> was_transform = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l153"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l154"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>)
<a name="l155"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l156"></a> _x1 = x1;
<a name="l157"></a> _y1 = y1;
<a name="l158"></a> _z1 = z1;
<a name="l159"></a> </span><span class=cF5>DCReflect</span><span class=cF0>(dc, &amp;_x1, &amp;_y1, &amp;_z1);
<a name="l160"></a> _x2 = x2;
<a name="l161"></a> _y2 = y2;
<a name="l162"></a> _z2 = z2;
<a name="l163"></a> </span><span class=cF5>DCReflect</span><span class=cF0>(dc, &amp;_x2, &amp;_y2, &amp;_z2);
<a name="l164"></a> dc-&gt;flags &amp;= ~</span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>;
<a name="l165"></a> res=</span><span class=cF5>Line</span><span class=cF0>(dc, _x1, _y1, _z1, _x2, _y2, _z2, &amp;</span><span class=cF5>GrPlot3</span><span class=cF0>, step, </span><span class=cF1>start</span><span class=cF0>);
<a name="l166"></a> dx = _x2 - _x1;
<a name="l167"></a> dy = _y2 - _y1;
<a name="l168"></a> </span><span class=cF1>if</span><span class=cF0> (d = </span><span class=cF5>Sqrt</span><span class=cF7>(</span><span class=cF0>dx * dx + dy * dy</span><span class=cF7>)</span><span class=cF0>)
<a name="l169"></a> {
<a name="l170"></a> d = w * dc-&gt;thick / d;
<a name="l171"></a> res |= </span><span class=cF5>Line</span><span class=cF0>(dc, _x2 - dx * d + dy * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, _y2 - dy * d - dx * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, _z2, _x2, _y2, _z2, &amp;</span><span class=cF5>GrPlot3</span><span class=cF0>, step);
<a name="l172"></a> res |= </span><span class=cF5>Line</span><span class=cF0>(dc, _x2 - dx * d - dy * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, _y2 - dy * d + dx * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, _z2, _x2, _y2, _z2, &amp;</span><span class=cF5>GrPlot3</span><span class=cF0>, step);
<a name="l173"></a> }
<a name="l174"></a> was_symmetry = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l175"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_JUST_MIRROR</span><span class=cF0>)
<a name="l176"></a> </span><span class=cF1>goto</span><span class=cF0> gr_done;
<a name="l177"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l178"></a> res |= </span><span class=cF5>Line</span><span class=cF0>(dc, x1, y1, z1, x2, y2, z2, &amp;</span><span class=cF5>GrPlot3</span><span class=cF0>, step, </span><span class=cF1>start</span><span class=cF0>);
<a name="l179"></a> dx = x2 - x1;
<a name="l180"></a> dy = y2 - y1;
<a name="l181"></a> </span><span class=cF1>if</span><span class=cF0> (d = </span><span class=cF5>Sqrt</span><span class=cF7>(</span><span class=cF0>dx * dx + dy * dy</span><span class=cF7>)</span><span class=cF0>)
<a name="l182"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l183"></a> d = w * dc-&gt;thick / d;
<a name="l184"></a> res |= </span><span class=cF5>Line</span><span class=cF0>(dc, x2 - dx * d + dy * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, y2 - dy * d - dx * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, z2, x2, y2, z2, &amp;</span><span class=cF5>GrPlot3</span><span class=cF0>, step);
<a name="l185"></a> res |= </span><span class=cF5>Line</span><span class=cF0>(dc, x2 - dx * d - dy * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, y2 - dy * d + dx * d + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>5</span><span class=cF0>, z2, x2, y2, z2, &amp;</span><span class=cF5>GrPlot3</span><span class=cF0>, step);
<a name="l186"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l187"></a>gr_done:
<a name="l188"></a> </span><span class=cF1>if</span><span class=cF0> (was_transform)
<a name="l189"></a> dc-&gt;flags |= </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>;
<a name="l190"></a> </span><span class=cF1>if</span><span class=cF0> (was_symmetry)
<a name="l191"></a> dc-&gt;flags |= </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>;
<a name="l192"></a>
<a name="l193"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l194"></a>}
<a name="l195"></a>
<a name="l196"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Graphics/Char;Char/Graphics&quot;</span><span class=cF0>
<a name="l197"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>GrTextBox3</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> x1, </span><span class=cF9>I64</span><span class=cF0> y1, </span><span class=cF9>I64</span><span class=cF0> z1, </span><span class=cF1>U8</span><span class=cF0> *s, </span><span class=cF9>I64</span><span class=cF0> border=</span><span class=cFE>2</span><span class=cF0>)
<a name="l198"></a>{</span><span class=cF2>//3D. Transformation. DCF_SYMMETRY is silly.</span><span class=cF0>
<a name="l199"></a> </span><span class=cF1>U8</span><span class=cF0> *ptr;
<a name="l200"></a> </span><span class=cF9>I64</span><span class=cF0> ch, res, w, w_max, h;
<a name="l201"></a>
<a name="l202"></a> </span><span class=cF1>if</span><span class=cF0> (!s)
<a name="l203"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l204"></a> ptr = s;
<a name="l205"></a> w = </span><span class=cFE>0</span><span class=cF0>;
<a name="l206"></a> w_max = </span><span class=cFE>0</span><span class=cF0>;
<a name="l207"></a> h = </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>;
<a name="l208"></a>
<a name="l209"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l210"></a> (*dc-&gt;transform)(dc, &amp;x1, &amp;y1, &amp;z1);
<a name="l211"></a> </span><span class=cF1>while</span><span class=cF0> (ch = *ptr++)
<a name="l212"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l213"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'\t'</span><span class=cF0>)
<a name="l214"></a> w = </span><span class=cF5>CeilU64</span><span class=cF0>(w + </span><span class=cF3>FONT_WIDTH</span><span class=cF0>, </span><span class=cF3>FONT_WIDTH</span><span class=cF0> * </span><span class=cFE>8</span><span class=cF0>);
<a name="l215"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'\n'</span><span class=cF0>)
<a name="l216"></a> {
<a name="l217"></a> </span><span class=cF1>if</span><span class=cF0> (w &gt; w_max)
<a name="l218"></a> w_max = w;
<a name="l219"></a> w = </span><span class=cFE>0</span><span class=cF0>;
<a name="l220"></a> h += </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>;
<a name="l221"></a> }
<a name="l222"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l223"></a> w += </span><span class=cF3>FONT_WIDTH</span><span class=cF0>;
<a name="l224"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l225"></a> </span><span class=cF1>if</span><span class=cF0> (w &gt; w_max)
<a name="l226"></a> w_max = w;
<a name="l227"></a> res = </span><span class=cF5>GrPrint</span><span class=cF0>(dc, x1, y1, </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, s);
<a name="l228"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1 - border, y1 - border, x1 + w_max + border, y1 - border);
<a name="l229"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1 - border, y1 + h + border, x1 + w_max + border, y1 + h + border);
<a name="l230"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1 - border, y1 - border, x1 - border, y1 + h + border);
<a name="l231"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1 + w_max + border, y1 - border, x1 + w_max + border, y1 + h + border);
<a name="l232"></a>
<a name="l233"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>ToBool</span><span class=cF0>(res);
<a name="l234"></a>}
<a name="l235"></a>
<a name="l236"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>DIAMOND_SLOPE_MAX</span><span class=cF0> </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>75</span><span class=cF0>
<a name="l237"></a>
<a name="l238"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>GrTextDiamond3</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> x1, </span><span class=cF9>I64</span><span class=cF0> y1, </span><span class=cF9>I64</span><span class=cF0> z1, </span><span class=cF1>U8</span><span class=cF0> *_s, </span><span class=cF9>I64</span><span class=cF0> border=</span><span class=cFE>2</span><span class=cF0>)
<a name="l239"></a>{</span><span class=cF2>//3D. Transformation. DCF_SYMMETRY is silly.</span><span class=cF0>
<a name="l240"></a> </span><span class=cF1>Bool</span><span class=cF0> first = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l241"></a> </span><span class=cF1>U8</span><span class=cF0> ch, *ptr, *ptr_end, *st, *s;
<a name="l242"></a> </span><span class=cF9>I64</span><span class=cF0> res = </span><span class=cFE>0</span><span class=cF0>, y, dx, dy, dx_old, dy_old, w, h = </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>;
<a name="l243"></a> </span><span class=cF1>F64</span><span class=cF0> m;
<a name="l244"></a>
<a name="l245"></a> </span><span class=cF1>if</span><span class=cF0> (!_s)
<a name="l246"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l247"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l248"></a> (*dc-&gt;transform)(dc, &amp;x1, &amp;y1, &amp;z1);
<a name="l249"></a>
<a name="l250"></a> ptr = s = </span><span class=cF5>StrNew</span><span class=cF0>(_s);
<a name="l251"></a> </span><span class=cF1>while</span><span class=cF0> (ch = *ptr)
<a name="l252"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l253"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'\r'</span><span class=cF0>||ch == </span><span class=cF6>'\t'</span><span class=cF0>)
<a name="l254"></a> *ptr = </span><span class=cF3>CH_SPACE</span><span class=cF0>;
<a name="l255"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF6>'\n'</span><span class=cF0>)
<a name="l256"></a> {
<a name="l257"></a> *ptr = </span><span class=cFE>0</span><span class=cF0>;
<a name="l258"></a> h += </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>;
<a name="l259"></a> }
<a name="l260"></a> ptr++;
<a name="l261"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l262"></a> ptr_end = ptr + </span><span class=cFE>1</span><span class=cF0>;
<a name="l263"></a>
<a name="l264"></a> y = y1 - h &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l265"></a> dx = </span><span class=cF3>FONT_WIDTH</span><span class=cF0> + border; </span><span class=cF2>//Minimum</span><span class=cF0>
<a name="l266"></a> dy = </span><span class=cF3>FONT_HEIGHT</span><span class=cF0> + border + h &gt;&gt; </span><span class=cFE>1</span><span class=cF0>; </span><span class=cF2>//Minimum</span><span class=cF0>
<a name="l267"></a> ptr = s;
<a name="l268"></a> </span><span class=cF1>while</span><span class=cF0> (ptr != ptr_end)
<a name="l269"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l270"></a> st = ptr;
<a name="l271"></a> </span><span class=cF1>while</span><span class=cF0> (*ptr++);
<a name="l272"></a> </span><span class=cF5>StrUtil</span><span class=cF0>(st, </span><span class=cF3>SUF_REM_LEADING</span><span class=cF0> | </span><span class=cF3>SUF_REM_TRAILING</span><span class=cF0>);
<a name="l273"></a>
<a name="l274"></a> w = (</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF3>FONT_WIDTH</span><span class=cF0>) &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l275"></a> </span><span class=cF1>if</span><span class=cF0> (first)
<a name="l276"></a> {
<a name="l277"></a> res |= </span><span class=cF5>GrPrint</span><span class=cF0>(dc, x1 - w, y, </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, st);
<a name="l278"></a> first = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l279"></a> }
<a name="l280"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l281"></a> res |= </span><span class=cF5>GrPrint</span><span class=cF0>(dc, x1 - w, y, </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, st);
<a name="l282"></a> </span><span class=cF1>if</span><span class=cF0> (w)
<a name="l283"></a> {
<a name="l284"></a> w += border;
<a name="l285"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l286"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l287"></a> dx_old = dx;
<a name="l288"></a> dy_old = dy;
<a name="l289"></a> m = </span><span class=cF5>ToF64</span><span class=cF0>(dx) / dy;
<a name="l290"></a> </span><span class=cF1>if</span><span class=cF0> (m &lt; </span><span class=cFE>1</span><span class=cF0> / </span><span class=cF3>DIAMOND_SLOPE_MAX</span><span class=cF0>)
<a name="l291"></a> {
<a name="l292"></a> dy = </span><span class=cF5>MaxI64</span><span class=cF0>(dy, </span><span class=cF5>Ceil</span><span class=cF7>(</span><span class=cF3>DIAMOND_SLOPE_MAX</span><span class=cF0> * dx</span><span class=cF7>)</span><span class=cF0>);
<a name="l293"></a> m = </span><span class=cFE>1</span><span class=cF0> / </span><span class=cF3>DIAMOND_SLOPE_MAX</span><span class=cF0>;
<a name="l294"></a> }
<a name="l295"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (m &gt; </span><span class=cF3>DIAMOND_SLOPE_MAX</span><span class=cF0>)
<a name="l296"></a> {
<a name="l297"></a> dy = </span><span class=cF5>MaxI64</span><span class=cF0>(dy, </span><span class=cF5>Ceil</span><span class=cF7>(</span><span class=cF0>dx / </span><span class=cF3>DIAMOND_SLOPE_MAX</span><span class=cF7>)</span><span class=cF0>);
<a name="l298"></a> m = </span><span class=cF3>DIAMOND_SLOPE_MAX</span><span class=cF0>;
<a name="l299"></a> }
<a name="l300"></a> dx = </span><span class=cF5>MaxI64</span><span class=cF0>(dx, w + </span><span class=cF5>Ceil</span><span class=cF7>(</span><span class=cF0>m * </span><span class=cF5>AbsI64</span><span class=cF0>(y - y1)</span><span class=cF7>)</span><span class=cF0>);
<a name="l301"></a> dx = </span><span class=cF5>MaxI64</span><span class=cF0>(dx, w + </span><span class=cF5>Ceil</span><span class=cF7>(</span><span class=cF0>m * </span><span class=cF5>AbsI64</span><span class=cF0>(y + </span><span class=cF3>FONT_HEIGHT</span><span class=cF0> - y1)</span><span class=cF7>)</span><span class=cF0>);
<a name="l302"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l303"></a> </span><span class=cF1>while</span><span class=cF0> (dx != dx_old || dy != dy_old);
<a name="l304"></a> }
<a name="l305"></a> y += </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>;
<a name="l306"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l307"></a> </span><span class=cF5>Free</span><span class=cF0>(s);
<a name="l308"></a>
<a name="l309"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1, y1 - dy, x1 + dx, y1);
<a name="l310"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1 + dx, y1, x1, y1 + dy);
<a name="l311"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1, y1 + dy, x1 - dx, y1);
<a name="l312"></a> res |= </span><span class=cF5>GrLine</span><span class=cF0>(dc, x1 - dx, y1, x1, y1 - dy);
<a name="l313"></a>
<a name="l314"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>ToBool</span><span class=cF0>(res);
<a name="l315"></a>}
<a name="l316"></a>
<a name="l317"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Graphics/Mesh&quot;</span><span class=cF0>
<a name="l318"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>Gr3Mesh</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> vertex_count, </span><span class=cF9>CD3I32</span><span class=cF0> *p, </span><span class=cF9>I64</span><span class=cF0> tri_count, </span><span class=cF9>CMeshTri</span><span class=cF0> *tri)
<a name="l319"></a>{</span><span class=cF2>//Returns count of pixs changed.</span><span class=cF0>
<a name="l320"></a> </span><span class=cF9>CColorROPU32</span><span class=cF0> old_color = dc-&gt;color;
<a name="l321"></a> </span><span class=cF9>I64</span><span class=cF0> i, x, y, z, res = </span><span class=cFE>0</span><span class=cF0>;
<a name="l322"></a> </span><span class=cF9>CD3I32</span><span class=cF0> *pt, *pt_sym, *p_sym, *dst;
<a name="l323"></a> </span><span class=cF9>CMeshTri</span><span class=cF0> *tri_sym = tri;
<a name="l324"></a>
<a name="l325"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>)
<a name="l326"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l327"></a> dst = pt = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CD3I32</span><span class=cF7>)</span><span class=cF0> * vertex_count);
<a name="l328"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; vertex_count; i++, p++, dst++)
<a name="l329"></a> {
<a name="l330"></a> x = p-&gt;x;
<a name="l331"></a> y = p-&gt;y;
<a name="l332"></a> z = p-&gt;z;
<a name="l333"></a> (*dc-&gt;transform)(dc, &amp;x, &amp;y, &amp;z);
<a name="l334"></a> dst-&gt;x = x;
<a name="l335"></a> dst-&gt;y = y;
<a name="l336"></a> dst-&gt;z = z;
<a name="l337"></a> }
<a name="l338"></a> p = pt;
<a name="l339"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l340"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l341"></a> pt = </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l342"></a>
<a name="l343"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>)
<a name="l344"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l345"></a> dst = pt_sym = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CD3I32</span><span class=cF7>)</span><span class=cF0> * vertex_count);
<a name="l346"></a> p_sym = p;
<a name="l347"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; vertex_count; i++, p_sym++, dst++)
<a name="l348"></a> {
<a name="l349"></a> x = p_sym-&gt;x;
<a name="l350"></a> y = p_sym-&gt;y;
<a name="l351"></a> z = p_sym-&gt;z;
<a name="l352"></a> </span><span class=cF5>DCReflect</span><span class=cF0>(dc, &amp;x, &amp;y, &amp;z);
<a name="l353"></a> dst-&gt;x = x;
<a name="l354"></a> dst-&gt;y = y;
<a name="l355"></a> dst-&gt;z = z;
<a name="l356"></a> }
<a name="l357"></a> p_sym = pt_sym;
<a name="l358"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; tri_count; i++, tri_sym++)
<a name="l359"></a> {
<a name="l360"></a> (*dc-&gt;lighting)(dc, &amp;p_sym[tri_sym-&gt;nums[</span><span class=cFE>0</span><span class=cF0>]], &amp;p_sym[tri_sym-&gt;nums[</span><span class=cFE>2</span><span class=cF0>]], &amp;p_sym[tri_sym-&gt;nums[</span><span class=cFE>1</span><span class=cF0>]], tri_sym-&gt;color);
<a name="l361"></a> res += </span><span class=cF5>GrFillTri0</span><span class=cF0>(dc, &amp;p_sym[tri_sym-&gt;nums[</span><span class=cFE>0</span><span class=cF0>]], &amp;p_sym[tri_sym-&gt;nums[</span><span class=cFE>2</span><span class=cF0>]], &amp;p_sym[tri_sym-&gt;nums[</span><span class=cFE>1</span><span class=cF0>]]);
<a name="l362"></a> }
<a name="l363"></a> </span><span class=cF5>Free</span><span class=cF0>(pt_sym);
<a name="l364"></a> </span><span class=cF1>if</span><span class=cF0> (dc-&gt;flags &amp; </span><span class=cF3>DCF_JUST_MIRROR</span><span class=cF0>)
<a name="l365"></a> </span><span class=cF1>goto</span><span class=cF0> mesh_done;
<a name="l366"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l367"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; tri_count; i++, tri++)
<a name="l368"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l369"></a> (*dc-&gt;lighting)(dc, &amp;p[tri-&gt;nums[</span><span class=cFE>0</span><span class=cF0>]], &amp;p[tri-&gt;nums[</span><span class=cFE>1</span><span class=cF0>]], &amp;p[tri-&gt;nums[</span><span class=cFE>2</span><span class=cF0>]], tri-&gt;color);
<a name="l370"></a> res += </span><span class=cF5>GrFillTri0</span><span class=cF0>(dc, &amp;p[tri-&gt;nums[</span><span class=cFE>0</span><span class=cF0>]], &amp;p[tri-&gt;nums[</span><span class=cFE>1</span><span class=cF0>]], &amp;p[tri-&gt;nums[</span><span class=cFE>2</span><span class=cF0>]]);
<a name="l371"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l372"></a>mesh_done:
<a name="l373"></a> dc-&gt;color = old_color;
<a name="l374"></a> </span><span class=cF5>Free</span><span class=cF0>(pt);
<a name="l375"></a>
<a name="l376"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l377"></a>}
<a name="l378"></a>
<a name="l379"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DrawWaitMouse</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc, </span><span class=cF9>I64</span><span class=cF0> x, </span><span class=cF9>I64</span><span class=cF0> y)
<a name="l380"></a>{</span><span class=cF2>//This is a callback. See </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/Graphics/Grid.CC.html#l1"><span class=cF4>::/Demo/Graphics/Grid.CC</span></a><span class=cF2>.</span><span class=cF0>
<a name="l381"></a> </span><span class=cF9>I64</span><span class=cF0> old_pen_width = dc-&gt;thick;
<a name="l382"></a> </span><span class=cF9>CColorROPU32</span><span class=cF0> old_color = dc-&gt;color;
<a name="l383"></a>
<a name="l384"></a> dc-&gt;thick = </span><span class=cFE>3</span><span class=cF0>;
<a name="l385"></a> dc-&gt;color = </span><span class=cF3>LTRED</span><span class=cF0>;
<a name="l386"></a> </span><span class=cF5>GrCircle3</span><span class=cF0>(dc, x, y, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>7</span><span class=cF0>);
<a name="l387"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x - </span><span class=cFE>6</span><span class=cF0>, y + </span><span class=cFE>6</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, x + </span><span class=cFE>6</span><span class=cF0>, y - </span><span class=cFE>6</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
<a name="l388"></a> dc-&gt;color = </span><span class=cF3>RED</span><span class=cF0>;
<a name="l389"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc, x, y, </span><span class=cFE>7</span><span class=cF0>);
<a name="l390"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc, x - </span><span class=cFE>6</span><span class=cF0>, y + </span><span class=cFE>6</span><span class=cF0>, x + </span><span class=cFE>6</span><span class=cF0>, y - </span><span class=cFE>6</span><span class=cF0>);
<a name="l391"></a> dc-&gt;thick = old_pen_width;
<a name="l392"></a> dc-&gt;color = old_color;
<a name="l393"></a>}
<a name="l394"></a>
<a name="l395"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Graphics/GR Files;Graphics/Screen&quot;</span><span class=cF0>
<a name="l396"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>GRScreenCaptureRead</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *filename, </span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cFB>gr</span><span class=cF0>.dc, </span><span class=cF9>I64</span><span class=cF0> x=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> y=</span><span class=cFE>0</span><span class=cF0>)
<a name="l397"></a>{</span><span class=cF2>//GrBlot ZealOS GR File to dc, x, y.</span><span class=cF0>
<a name="l398"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc2;
<a name="l399"></a>
<a name="l400"></a> </span><span class=cF1>if</span><span class=cF0> (dc2 = </span><span class=cF5>GRRead</span><span class=cF7>(</span><span class=cF0>filename</span><span class=cF7>)</span><span class=cF0>)
<a name="l401"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l402"></a> dc-&gt;color = </span><span class=cF3>ROP_EQU</span><span class=cF0>;
<a name="l403"></a> </span><span class=cF5>GrBlot</span><span class=cF0>(dc, x, y, dc2);
<a name="l404"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc2);
<a name="l405"></a>
<a name="l406"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l407"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l408"></a>
<a name="l409"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l410"></a>}
<a name="l411"></a>
<a name="l412"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>GRScreenCaptureWrite</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *filename, </span><span class=cF1>Bool</span><span class=cF0> include_zoom=</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l413"></a>{</span><span class=cF2>//Capture screen to a ZealOS GR File.</span><span class=cF0>
<a name="l414"></a> </span><span class=cF9>I64</span><span class=cF0> size;
<a name="l415"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc = </span><span class=cF5>DCScreenCapture</span><span class=cF0>(include_zoom);
<a name="l416"></a>
<a name="l417"></a> size = </span><span class=cF5>GRWrite</span><span class=cF0>(filename, dc, </span><span class=cF3>DCSF_PALETTE_GET</span><span class=cF0>);
<a name="l418"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc);
<a name="l419"></a>
<a name="l420"></a> </span><span class=cF1>return</span><span class=cF0> size;
<a name="l421"></a>}
</span></pre></body>
</html>