AddPathBox()
Syntax
AddPathBox(x.d, y.d, Width.d, Height.d [, Flags])Description
Add a box to the vector drawing path. This is a convenience function that combines the needed AddPathLine() calls to create a simple box shape.
By default, this function ends the current figure in the path and adds the box as an unconnected and closed figure to the path (i.e. a box that can be filled). This behavior can be changed with the appropriate flags.
Parameters
x.d, y.d Specifies the origin of the box. Width.d, Height.d Specifies the width and height of the box. Flags (optional) This can be a combination of the following values: #PB_Path_Default : No special behavior (default value) #PB_Path_Relative : The positions are relative to the last cursor position. #PB_Path_Connected: The box is connected to the existing path with a line and not automatically a closed figure.
Return value
None.
Example
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) CanvasGadget(0, 0, 0, 400, 200) If StartVectorDrawing(CanvasVectorOutput(0)) AddPathBox(50, 50, 200, 50) AddPathBox(150, 75, 200, 50) VectorSourceColor(RGBA(255, 0, 0, 255)) StrokePath(10) StopVectorDrawing() EndIf Repeat Event = WaitWindowEvent() Until Event = #PB_Event_CloseWindow EndIf
See Also
MovePathCursor(), AddPathLine(), AddPathArc(), AddPathCircle(), AddPathEllipse(), AddPathCurve()
Supported OS
All