summaryrefslogtreecommitdiff
path: root/html/en/func/marks.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/en/func/marks.html')
-rw-r--r--html/en/func/marks.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/html/en/func/marks.html b/html/en/func/marks.html
new file mode 100644
index 0000000..b68db35
--- /dev/null
+++ b/html/en/func/marks.html
@@ -0,0 +1,85 @@
+<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+
+<head>
+<meta http-equiv="Content-Language" content="en-us">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Marks</title>
+<link rel="stylesheet" type="text/css" href="../../style.css">
+</head>
+
+<body>
+
+<h2 align="center">Marks</h2>
+
+ <p>A mark is a punctual representation. It can have different sizes and types.
+ All types are affected only by mark attributes and by the foreground color.</p>
+<p>All marks in all drivers are simulated using other CD primitives, except
+<strong>cdPixel</strong>.</p>
+
+<hr>
+<pre class="function"><span class="mainFunction">void <a name="cdPixel">cdCanvasPixel</a>(cdCanvas* canvas, int x, int y, long int color); [in C]</span>
+void wdCanvasPixel(cdCanvas* canvas, double x, double y, long int color); (WC) [in C]
+
+canvas:Pixel(x, y: number, color: lightuserdata) [in Lua]
+canvas:wPixel(x, y: number, color: lightuserdata) (WC) [in Lua]</pre>
+
+ <p>Configures the pixel <b>(x,y)</b> with the color defined by <b>color</b>. It is the smallest element of the canvas. It depends only
+ on global attributes of the canvas.</p>
+
+<pre class="function"><span class="mainFunction">void <a name="cdMark">cdCanvasMark</a>(cdCanvas* canvas, int x, int y); [in C]</span>
+void wdCanvasMark(cdCanvas* canvas, double x, double y); (WC) [in C]
+
+canvas:Mark(x, y: number) [in Lua]
+canvas:wMark(x, y: number) (WC) [in Lua]</pre>
+
+ <p>Draws a mark in <b><b>(x,y)</b> </b>using the current foreground color.
+ It is not possible to use this function between a call to functions
+ <font><b>cdBegin</b></font> and <font><b>cdEnd</b></font>
+ if the type of mark is set to <b>CD_DIAMOND</b>. If the active driver
+ does not include this primitive, it will be simulated using other primitives
+ from the library, such as <strong><font>cdLine</font></strong>.</p>
+ <p>If you will call function <strong><font>cdMark</font></strong>
+ or <strong><font>wdMark</font></strong> several times in a
+ sequence, then it is recommended that the application changes the filling and
+ line attributes to those used by the <strong><font>cdMark</font></strong>
+ function:</p>
+
+<pre>cdInteriorStyle(CD_SOLID);
+cdLineStyle(CD_CONTINUOUS);
+cdLineWidth(1);</pre>
+
+ <p>This will greatly increase this function's performance. Also in this case,
+ if the mark is very small, we suggest using the <font>cdPixel</font>
+ function so that the application itself draws the mark. In many cases, this
+ also increases this function's performance.</p>
+
+<h3>Attributes</h3>
+<pre class="function"><span class="mainFunction">int <a name="cdMarkType">cdCanvasMarkType</a>(cdCanvas* canvas, int type); [in C]</span>
+
+canvas:MarkType(type: number) -&gt; (old_type: number) [in Lua]</pre>
+
+ <p>Configures the current mark type for: <b>CD_PLUS</b>, <b>
+ CD_STAR</b>, <b>CD_CIRCLE</b>, <b>CD_X</b>, <b>
+ CD_BOX</b>, <b>CD_DIAMOND</b>, <b>CD_HOLLOW_CIRCLE</b>,
+ <b>CD_HOLLOW_BOX</b> or <b>CD_HOLLOW_DIAMOND</b>. Returns
+ the previous value. Default value: <b>CD_STAR</b>. Value <b><b>
+ CD_QUERY</b> </b>simply returns the current value.</p>
+ <p align="center"><font size="4">Mark Types</font><br>
+ <img src="../../img/marks.gif" border="2" width="148" height="193"></p>
+
+<pre class="function"><span class="mainFunction">int <a name="cdMarkSize">cdCanvasMarkSize</a>(cdCanvas* canvas, int size); [in C]</span>
+double wdCanvasMarkSize(cdCanvas* canvas, double size); (WC) [in C]
+
+canvas:MarkSize(size: number) -&gt; (old_size: number) [in Lua]
+canvas:wMarkSize(size: number) -&gt; (old_size: number) (WC) [in Lua]</pre>
+
+ <p>Configures the mark size in pixels. Returns the previous value. Default
+ value: 10. Value <b><b>CD_QUERY</b> </b>simply returns the current value.
+ Valid width interval: &gt;= 1.</p>
+ <p>In WC, it configures the current line width in millimeters.&nbsp;</p>
+
+
+</body>
+
+</html>