CanvasOutput()
Syntax
OutputID = CanvasOutput(#Gadget)Description
Returns the OutputID of a CanvasGadget to perform 2D rendering operation on it.
Parameters
#Gadget The gadget to draw on. This must be a CanvasGadget().
Return value
Returns the output ID or zero if drawing is not possible. This value should be passed directly to the StartDrawing() function to start the drawing operation. The return-value is valid only for one drawing operation and cannot be reused.
Example
... StartDrawing(CanvasOutput(#Gadget)) ; do some drawing stuff here... StopDrawing()
Remarks
The CanvasGadget() does not have an alpha channel so the #PB_2DDrawing_AlphaChannel modes of the DrawingMode() function will have no effect and the #PB_2DDrawing_AllChannels mode will be equivalent to #PB_2DDrawing_Default.
Drawing on a CanvasGadget() is double-buffered. This means that the drawing operations only become visible at the StopDrawing() command to avoid visible flicker during the drawing.
See Also
StartDrawing(), CanvasGadget(), CanvasVectorOutput()
Supported OS
All