Canvas Draw
The following routines are part of Canvas Draw, a vector graphics toolkit with device independent output.
Please refer to the official CD documentation at http://webserver2.tecgraf.puc-rio.br/cd/ as soon as you get lost, which will likely be soon.
The wrapper is nowhere near complete, but fairly easy to extend. This documentation, such as it is, basically a cut and paste from the official documentation, when including updates to the table below, the table of contents, the index, and the F1 lookup and syntax colouring in Edita, easily represents 80% of the effort required for each routine.
DEV: the following needs reorganising into sections along the lines of the original Jeremy Cowgar wrapper (iupX.e)
Hopefully at the same time I can grab some of the overview stuff from CD.htm.
Please refer to the official CD documentation at http://webserver2.tecgraf.puc-rio.br/cd/ as soon as you get lost, which will likely be soon.
The wrapper is nowhere near complete, but fairly easy to extend. This documentation, such as it is, basically a cut and paste from the official documentation, when including updates to the table below, the table of contents, the index, and the F1 lookup and syntax colouring in Edita, easily represents 80% of the effort required for each routine.
DEV: the following needs reorganising into sections along the lines of the original Jeremy Cowgar wrapper (iupX.e)
Hopefully at the same time I can grab some of the overview stuff from CD.htm.
cdCreateCanvas | - | Creates a CD canvas for a virtual visualization surface (VVS). |
cdCanvasActivate | - | Activates a canvas for drawing. |
cdCanvasClear | - | Clears the active canvas using the current background color. |
cdCanvasArc | - | Draw an arc |
cdCanvasBegin | - | Starts defining a polygon to be drawn |
cdCanvasVertex | - | Adds a vertex to the polygon definition |
cdCanvasEnd | - | Ends the polygon’s definition and draws it |
cdCanvasFont | - | Selects a text font. |
cdCanvasGetFont | - | Returns the values of the current font. |
cdCanvasGetAttribute | - | Returns a custom attribute from the driver of the active canvas. |
cdCanvasGetColorPlanes | - | Returns the number of bits per pixel for the specified canvas. |
cdCanvasGetContext | - | Returns the context of a given canvas. |
cdCanvasGetFontDim | - | Returns the font dimensions. |
cdCanvasGetTextBounds | - | Returns the oriented bounding rectangle occupied by a text at a given position. |
cdCanvasGetTextBox | - | Returns the horizontal bounding rectangle occupied by a text at a given position. |
cdCanvasGetTextSize | - | Returns the text size independent from orientation. |
cdCanvasOrigin | - | Allows translating the origin - for instance, to the center of the canvas. |
cdCanvasGetOrigin | - | Returns the origin. |
cdCanvasGetSize | - | Returns the canvas size in pixels and in millimeters. |
cdGetScreenSize | - | Returns the screen size in pixels and in millimeters. |
cdCanvasGetTransform | - | Returns the transformation matrix. If the identity is set, returns NULL. |
cdCanvasGetVectorTextBounds | - | Returns the oriented bounding rectangle occupied by a text at a given position. |
cdCanvasGetVectorTextSize | - | Returns the text size independent from orientation |
cdCanvasLine | - | Draw a line |
cdCanvasSetLineWidth | - | Configures the width of the current line. |
cdCanvasGetLineWidth | - | Retrieves the width of the current line. |
cdCanvasSetLineStyle | - | Configures the style of the current line. |
cdCanvasGetLineStyle | - | Retrieves the style of the current line. |
cdCanvasMM2Pixel | - | Converts sizes in millimeters into pixels (canvas coordinates). |
cdCanvasPixel2MM | - | Converts sizes in pixels (canvas coordinates) into millimeters. |
cdCanvasVectorText | - | Display multiline vector text at the specified position |
cdCanvasPixel | - | Sets pixel (x,y) to color. |
cdCanvasPutImageRectRGB | - | Display a rectangular rgb image |
cdCanvasPutImImage | - | Draws an imImage on any canvas. |
cdCanvasRect | - | Draw a rectangle with no filling |
cdCanvasSetForeground | - | Configures a new current foreground color. |
cdCanvasTransformPoint | - | Applies a transformation to a given point. |
cdCanvasUpdateYAxis | - | Invert the given Y coordinate if the native Y and CD axis orientations differ |
cdCanvasInvertYAxis | - | Invert the given Y coordinate independent of the driver Y axis orientation |
cdCanvasVectorTextDirection | - | Define the text direction |
cdContextCaps | - | Returns the resources available for that context. |
cdGetScreenColorPlanes | - | Returns the number of bits per pixel for the main screen. |
wdCanvasWindow | - | Configures window for world <-> canvas coordinates |
wdCanvasGetWindow | - | Queries the window for world <-> canvas coordinates |
wdCanvasViewport | - | Configures a viewport in the canvas coordinate system |
wdCanvasGetViewport | - | Queries the viewport for world <-> canvas coordinates |
cdKillCanvas | - | Destroys a previously created canvas |