From 1ad72d5276b1876bf218336a1ff47f086a0834c9 Mon Sep 17 00:00:00 2001
From: scuri 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. All marks in all drivers are simulated using other CD primitives, except
-cdPixel.
void cdCanvasPixel(cdCanvas* canvas, int x, int y, long int color); [in C] +void cdCanvasPixel(cdCanvas* canvas, int x, int y, long int color); [in C] void wdCanvasPixel(cdCanvas* canvas, double x, double y, long int color); (WC) [in C] canvas:Pixel(x, y: number, color: lightuserdata) [in Lua] @@ -28,7 +28,7 @@ canvas:wPixel(x, y: number, color: lightuserdata) (WC) [in Lua]
on global attributes of the canvas. It can be very slow on some drivers. Sometimes it is implemented as a rectangle with size 1x1. -void cdCanvasMark(cdCanvas* canvas, int x, int y); [in C] +
void cdCanvasMark(cdCanvas* canvas, int x, int y); [in C] void wdCanvasMark(cdCanvas* canvas, double x, double y); (WC) [in C] canvas:Mark(x, y: number) [in Lua] @@ -36,27 +36,26 @@ canvas:wMark(x, y: number) (WC) [in Lua]
Draws a mark in (x,y) using the current foreground color. It is not possible to use this function between a call to functions - cdBegin and cdEnd + cdCanvasBegin and cdCanvasEnd if the type of mark is set to CD_DIAMOND. If the active driver does not include this primitive, it will be simulated using other primitives - from the library, such as cdLine.
-If you will call function cdMark - or wdMark several times in a + from the library, such as cdCanvasLine.
+If you will call this function several times in a sequence, then it is recommended that the application changes the filling and - line attributes to those used by the cdMark + line attributes to those used by this function:
-cdInteriorStyle(CD_SOLID); -cdLineStyle(CD_CONTINUOUS); -cdLineWidth(1);+cdCanvasInteriorStyle(canvas, CD_SOLID); +cdCanvasLineStyle(canvas, CD_CONTINUOUS); +cdCanvasLineWidth(canvas, 1);This will greatly increase this function's performance. Also in this case, - if the mark is very small, we suggest using the cdPixel + if the mark is very small, we suggest using the cdCanvasPixel function so that the application itself draws the mark. In many cases, this also increases this function's performance.
- +Attributes
-int cdCanvasMarkType(cdCanvas* canvas, int type); [in C] +int cdCanvasMarkType(cdCanvas* canvas, int type); [in C] canvas:MarkType(type: number) -> (old_type: number) [in Lua]
@@ -69,7 +68,7 @@ canvas:MarkType(type: number) -> (old_type: number) [in Lua]Mark Types
-
int cdCanvasMarkSize(cdCanvas* canvas, int size); [in C] +
int cdCanvasMarkSize(cdCanvas* canvas, int size); [in C] double wdCanvasMarkSize(cdCanvas* canvas, double size); (WC) [in C] canvas:MarkSize(size: number) -> (old_size: number) [in Lua] @@ -79,7 +78,7 @@ canvas:wMarkSize(size: number) -> (old_size: number) (WC) [in Lua]
value: 10. Value CD_QUERY simply returns the current value. Valid width interval: >= 1.In WC, it configures the current line width in millimeters.
- +