| DrawPaint | ||
| Contents | ||||||
|
||||||
The Capesoft DrawPaint class allows the end user to place objects (such as basic shapes like circles and boxes, images, text etc.) onto a Draw control, and then allow select and manipulate those object visually. For example a box can be placed on the control by clicking with the mouse, and the box can later be selected, resized, the properties changed etc. It allows the order of objects on the control to be change, and any object to be selected simply by clicking on the control with the mouse.
This provides a tremendous amount of functionality without doing a large mount of coding.
Please note that this documentation is under construction and will be expanded on shortly.
![]()
Click on the
(up)
icon to go back to the layer Method Index.
AddItem
(long zOrder=0
Adds an item to the internal queue of items (objects) on the canvas..
Parameters
| zOrder |
Return Values
Returns 1 for success and zero for failure. If the method fails it calls ErrorTrap() with an error description.
Remarks
Use the zOrder to specify an order other than the creation order for displaying the item. The zOrder determines which item is topmost and which is bottommost.
Examples
alphaLayer
= 10 !
choose the layer to use as an alpha layer
if
drawer.LayerMode(layerNum, Draw:withAlpha) = 0 !
layer no alpha transparency
drawer.AddAlpha(layerNum, alphaLayer,
Channel:Red) !
use the red channel in alphaLayer
end
These are the Draw class properties that are useful when working with layers. You can access all these properties directly (they are not private and so you don't need accessor method). Unless otherwise stated you should avoid modifying the properties directly.
The canvas (background) color for the control.
Example:
drawer.SetMode(drawer.activelayer,
Draw:withAlpha, false) !
Turn off the use of an alpha channel for the current layer
drawer.HideLayer(drawer.activeLayer) !
Hide the current layer
See Also:
SetMode( )
![]()
Copyright © 2008 CapeSoft Software (Pty) Ltd