<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <head> <meta http-equiv="Content-Language" content="en-us"> <title>Screenshots C Source Code</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="stylesheet" type="text/css" href="../style.css"> <style type="text/css"> p { margin-top: 0; margin-bottom: 0; font-family: "Courier New", Courier, monospace; } .style1 { color: #0000FF; } .style2 { color: #FF00FF; } .style3 { font-family: Arial, Helvetica, sans-serif; } .style4 { text-align: left; } .style5 { color: #008000; } </style> </head> <body> <h2 align="center" style="text-align:center">Screenshots C Source Code</h2> <p class="style4"><span class="style3">Get the source code here: </span> <a href="../download/simple.zip">simple.zip</a>.</p> <p align="center" class="style4"> </p> <p><font SIZE="3"> <span class="style1">void</span> SimpleDraw</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">cdCanvas</font><font SIZE="3" COLOR="#ff00ff"><b>*</b></font><font SIZE="3"> canvas</font><font SIZE="3" COLOR="#ff00ff"><b>)</p> <p>{</b> </font></p> <div style="margin-left: 1.4em"> <p><font SIZE="3"> </font><font SIZE="3" COLOR="#0000ff">int</font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>;</b> </font></p> <p><font SIZE="3" COLOR="#0000ff">int</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>*</b></font><font SIZE="3">dashes</font><font SIZE="3" COLOR="#ff00ff"><b>;</b> </font></p> <p><font SIZE="3" COLOR="#0000ff">int</font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">8</font><font SIZE="3" COLOR="#ff00ff"><b>];</b> </font></p><p><font SIZE="3" COLOR="#0000ff">double</font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">8</font><font SIZE="3" COLOR="#ff00ff"><b>];</b> </font></p> <p> </p> <p class="style2"><font SIZE="3" COLOR="#008000">/* Get size in pixels to be used for computing coordinates. */</font></p><p><font SIZE="3"> cdCanvasGetSize</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>&</b></font><font SIZE="3">w</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>&</b></font><font SIZE="3">h</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> NULL</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> NULL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Clear the background to be white */</font></p><p><font SIZE="3"> cdCanvasBackground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_WHITE</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasClear</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw a reactangle and a polyline at the bottom-left area,</p> <p> using a thick line with transparency.</p> <p> Notice that transparency is only supported in a few drivers,</p> <p> and line join is not supported in the IMAGERGB driver. */</p></font><p><font SIZE="3"> cdCanvasLineWidth</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">3</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CONTINUOUS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> cdEncodeAlpha</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">CD_DARK_MAGENTA</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">128</font><font SIZE="3" COLOR="#ff00ff"><b>));</b> </font></p><p><font SIZE="3"> cdCanvasRect</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_OPEN_LINES</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">300</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">250</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">320</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">270</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">350</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">260</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">340</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">310</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">210</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p></p><font SIZE="3"> <p></font><font SIZE="3" COLOR="#008000">/* Draw the red diagonal line with a custom line style. </p> <p> Notice that line styles are not supported in the IMAGERGB driver. */</font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_RED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineWidth</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">3</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p><font SIZE="3"> dashes</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>=</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#ff00ff"><b>{</b></font><font SIZE="3" COLOR="#800000">20</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">15</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">5</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">5</font><font SIZE="3" COLOR="#ff00ff"><b>};</b> </font></p><p><font SIZE="3"> cdCanvasLineStyleDashes</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> dashes</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">4</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CUSTOM</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw the blue diagonal line with a pre-defined line style.</p> <p> Notice that the pre-defined line style is dependent on the driver. */</font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_BLUE</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineWidth</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">10</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DOTTED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p> </p> <p><font SIZE="3" COLOR="#008000">/* Reset line style and width */</font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CONTINUOUS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineWidth</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p></p><font SIZE="3"> <p></font><font SIZE="3" COLOR="#008000">/* Draw an arc at bottom-left, and a sector at bottom-right.</p> <p> Notice that counter-clockwise orientation of both. */</font></p><p><font SIZE="3"> cdCanvasInteriorStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_SOLID</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_MAGENTA</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasSector</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_RED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasArc</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw a solid filled rectangle at center. */</font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_YELLOW</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p> <p> </p><font SIZE="3"> <p></font><font SIZE="3" COLOR="#008000">/* Prepare font for text. */</font></p><p><font SIZE="3"> cdCanvasTextAlignment</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CENTER</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasTextOrientation</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">70</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasFont</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#a31515">"Times"</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_BOLD</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">24</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw text at center, with orientation, </p> <p> and draw its bounding box. </p> <p> Notice that in some drivers the bounding box is not precise. */</font></p> <p><font SIZE="3"> cdCanvasGetTextBounds</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#a31515">"cdMin Draw (���)"</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_RED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CLOSED_LINES</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">3</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">4</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">5</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">6</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> irect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">7</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_BLUE</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasText</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#a31515">"cdMin Draw (���)"</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Prepare World Coordinates */</font></p><p><font SIZE="3"> wdCanvasViewport</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3">w</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3">h</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#0000ff">if</font><font SIZE="3"> </font> <font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">w</font><font SIZE="3" COLOR="#ff00ff"><b>></b></font><font SIZE="3">h</font><font SIZE="3" COLOR="#ff00ff"><b>)</b> </font></p><p><font SIZE="3"> wdCanvasWindow</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,(</b></font><font SIZE="3" COLOR="#0000ff">double</font><font SIZE="3" COLOR="#ff00ff"><b>)</b></font><font SIZE="3">w</font><font SIZE="3" COLOR="#ff00ff"><b>/(</b></font><font SIZE="3" COLOR="#0000ff">double</font><font SIZE="3" COLOR="#ff00ff"><b>)</b></font><font SIZE="3">h</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#0000ff">else</font></p><p><font SIZE="3"> wdCanvasWindow</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,(</b></font><font SIZE="3" COLOR="#0000ff">double</font><font SIZE="3" COLOR="#ff00ff"><b>)</b></font><font SIZE="3">h</font><font SIZE="3" COLOR="#ff00ff"><b>/(</b></font><font SIZE="3" COLOR="#0000ff">double</font><font SIZE="3" COLOR="#ff00ff"><b>)</b></font><font SIZE="3">w</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw a filled blue rectangle in WC */</font></p><p><font SIZE="3"> wdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.20</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.30</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.40</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_RED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw the diagonal of that rectangle in WC */</font></p><p><font SIZE="3"> wdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.20</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.40</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.30</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Prepare Vector Text in WC. */</font></p><p><font SIZE="3"> wdCanvasVectorCharSize</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.07</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p> </p> <p><font SIZE="3" COLOR="#008000">/* Draw vector text, and draw its bounding box. </p> <p> We also use this text to show when we are using a contextplus driver. */</font></p> <p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_RED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#0000ff">if</font><font SIZE="3"> </font> <font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">contextplus</font><font SIZE="3" COLOR="#ff00ff"><b>)</b> </font></p><p><font SIZE="3"> wdCanvasGetVectorTextBounds</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#a31515">"WDj-Plus"</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.25</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.35</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#0000ff">else</font></p><p><font SIZE="3"> wdCanvasGetVectorTextBounds</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#a31515">"WDj"</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.25</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.35</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CLOSED_LINES</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> wdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> wdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">3</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> wdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">4</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">5</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> wdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">6</font><font SIZE="3" COLOR="#ff00ff"><b>],</b></font><font SIZE="3"> drect</font><font SIZE="3" COLOR="#ff00ff"><b>[</b></font><font SIZE="3" COLOR="#800000">7</font><font SIZE="3" COLOR="#ff00ff"><b>]);</b> </font></p><p><font SIZE="3"> cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineWidth</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CONTINUOUS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#0000ff">if</font><font SIZE="3"> </font> <font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">contextplus</font><font SIZE="3" COLOR="#ff00ff"><b>)</b> </font></p><p><font SIZE="3"> wdCanvasVectorText</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.25</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.35</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#a31515">"WDj-Plus"</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#0000ff">else</font></p><p><font SIZE="3"> wdCanvasVectorText</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.25</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0.35</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#a31515">"WDj"</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3" COLOR="#008000">/* Reset line width */</font></p> <p><font SIZE="3"> cdCanvasLineWidth</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3" COLOR="#ff00ff"> </font></p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw a filled path at center-right (looks like a weird fish). </p> <p> Notice that in PDF the arc is necessarily a circle arc, and not an ellipse. */</font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_GREEN</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_MOVETO</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_LINETO</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">230</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_LINETO</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">250</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_CURVETO</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* control point for start */</font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">250</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* control point for end */</font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* end point */</font></p><p><font SIZE="3"> cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_CURVETO</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">300</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_LINETO</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">300</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_ARC</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">300</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* center */</font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* width, height */</font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">30</font><font SIZE="3" COLOR="#ff00ff"><b>*</b></font><font SIZE="3" COLOR="#800000">1000</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3" COLOR="#800000">170</font><font SIZE="3" COLOR="#ff00ff"><b>*</b></font><font SIZE="3" COLOR="#800000">1000</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* start angle, end angle (degrees / 1000) */</p> </font> <p><font SIZE="3"> cdCanvasPathSet</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PATH_FILL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p><font SIZE="3"> cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw 3 pixels at center left. */</font></p><p><font SIZE="3"> cdCanvasPixel</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">10</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_RED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasPixel</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">11</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_GREEN</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasPixel</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">12</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_BLUE</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw 4 mark types, distributed near each corner. */</font></p><p><font SIZE="3"> cdCanvasForeground</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_RED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMarkSize</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">30</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMarkType</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_PLUS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMark</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMarkType</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CIRCLE</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMark</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMarkType</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_HOLLOW_CIRCLE</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMark</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMarkType</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DIAMOND</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasMark</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw all the line style possibilities at bottom. </p> <p> Notice that they have some small differences between drivers. */</font></p><p><font SIZE="3"> cdCanvasLineWidth</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">1</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CONTINUOUS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">10</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">10</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DASHED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">20</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">20</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DOTTED</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">30</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">30</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DASH_DOT</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">40</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">40</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLineStyle</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DASH_DOT_DOT</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasLine</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw all the hatch style possibilities in the top-left corner.</p> <p> Notice that they have some small differences between drivers. */</font></p><p><font SIZE="3"> cdCanvasHatch</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_VERTICAL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">60</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasHatch</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_FDIAGONAL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">60</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasHatch</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_BDIAGONAL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">60</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasHatch</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CROSS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">60</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasHatch</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_HORIZONTAL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">250</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">60</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasHatch</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DIAGCROSS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasBox</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">250</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">300</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">60</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw 4 regions, in diamond shape,</p> <p> at top, bottom, left, right, </p> <p> using different interior styles. <font SIZE="3" COLOR="#008000"> */</font></p> <p> </p> <p>/* At top, not filled polygon, notice that the last line style is used. */</font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_CLOSED_LINES</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* At left, hatch filled polygon */</font></p><p><font SIZE="3"> cdCanvasHatch</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_DIAGCROSS</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_FILL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* At right, pattern filled polygon */</font></p><p><font SIZE="3"> cdCanvasPattern</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> STYLE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> STYLE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> pattern</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_FILL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p></p><font SIZE="3"> <p></font><font SIZE="3" COLOR="#008000">/* At bottom, stipple filled polygon */</font></p><p><font SIZE="3"> cdCanvasStipple</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> STYLE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> STYLE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> stipple</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_FILL</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>+</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> w</font><font SIZE="3" COLOR="#ff00ff"><b>/</b></font><font SIZE="3" COLOR="#800000">2</font><font SIZE="3"> </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">50</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p><p><font SIZE="3"> </font><font SIZE="3" COLOR="#008000">/* Draw two beziers at bottom-left */</font></p><p><font SIZE="3"> cdCanvasBegin</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> CD_BEZIER</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p><p><font SIZE="3"> cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">250</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">200</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">180</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">150</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasVertex</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">300</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">100</font><font SIZE="3" COLOR="#ff00ff"><b>);</b></font></p><font SIZE="3"> <p>cdCanvasEnd</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p> <p><font SIZE="3" COLOR="#008000">/* Draw the image on the top-right corner but increasing its actual size, </font></p> <p><span class="style5"> </span><font SIZE="3" COLOR="#008000">and uses the complete image */</font></p><p><font SIZE="3"> cdCanvasPutImageRectRGBA</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> IMAGE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> IMAGE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> red</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> green</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> blue</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> alpha</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font></p> <p> <font SIZE="3"> w </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">400</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> h </font><font SIZE="3" COLOR="#ff00ff"><b>-</b></font><font SIZE="3"> </font> <font SIZE="3" COLOR="#800000">310</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">3</font><font SIZE="3" COLOR="#ff00ff"><b>*</b></font><font SIZE="3">IMAGE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">3</font><font SIZE="3" COLOR="#ff00ff"><b>*</b></font><font SIZE="3">IMAGE_SIZE</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>,</b></font><font SIZE="3"> </font><font SIZE="3" COLOR="#800000">0</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> <p> </p> <p><font SIZE="3" COLOR="#008000">/* Adds a new page, or </p> <p> flushes the file, or</p> <p> flushes the screen, or</p> <p> swap the double buffer. */</font></p><p><font SIZE="3"> cdCanvasFlush</font><font SIZE="3" COLOR="#ff00ff"><b>(</b></font><font SIZE="3">canvas</font><font SIZE="3" COLOR="#ff00ff"><b>);</b> </font></p> </div> <font SIZE="3" COLOR="#ff00ff"><b> <p>}</b> </font></p> </body> </html>