CanvasVectorOutput()

Syntax

VectorOutputID = CanvasVectorOutput(#Gadget [, Unit])
Description
Returns the OutputID of a CanvasGadget to perform vector drawing operations on it.

Parameters

#Gadget The gadget to draw on. This must be a CanvasGadget().
Unit (optional) Specifies the unit used for measuring distances on the drawing output. The default unit for canvas gadgets is #PB_Unit_Pixel.
  #PB_Unit_Pixel     : Values are measured in pixels
  #PB_Unit_Point     : Values are measured in points (1/72 inch)
  #PB_Unit_Inch      : Values are measured in inches
  #PB_Unit_Millimeter: Values are measured in millimeters

Return value

Returns the output ID or zero if drawing is not possible. This value should be passed directly to the StartVectorDrawing() function to start the drawing operation. The return-value is valid only for one drawing operation and cannot be reused.

Example

  ...
  StartVectorDrawing(CanvasVectorOutput(#Gadget))
    ; do some drawing stuff here...
  StopVectorDrawing()

Remarks

Drawing on a CanvasGadget() is double-buffered. This means that the drawing operations only become visible at the StopVectorDrawing() command to avoid visible flicker during the drawing.

See Also

StartVectorDrawing(), CanvasGadget(), CanvasOutput()

Supported OS

All

<- CanvasOutput() - Gadget Index - CheckBoxGadget() ->