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

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()
<- CanvasGadget() - Gadget Index - CanvasVectorOutput() ->