Creates a 2D drawing canvas embedded in a BGI window. Returns a canvas ID (0 on failure).
BGI GUI
Parameters & Returns
Parameters
xInt
yInt
widthInt
heightInt
parentInt
Returns
Int
Quick Summary
Creates a 2D drawing canvas embedded in a BGI window. Returns a canvas ID (0 on failure).
Technical Exegesis...
Creates a child render surface at (x, y) of size width x height inside the BGI window `parent`. The canvas has its own swap chain on the shared graphics device. Draw into it each frame by making it the active target with bgiSetActiveCanvas, issuing 2D draw calls (b2dCls + b2d* primitives/images/text), then presenting it with bgiFlipCanvas. Requires b2dGraphics() to have been called first. The returned ID shares the gizmo ID space; canvas child windows are destroyed automatically with their parent window.
Creates a child render surface at (x, y) of size width x height inside the BGI window `parent`. The canvas has its own swap chain on the shared graphics device. Draw into it each frame by making it the active target with bgiSetActiveCanvas, issuing 2D draw calls (b2dCls + b2d* primitives/images/text), then presenting it with bgiFlipCanvas. Requires b2dGraphics() to have been called first. The returned ID shares the gizmo ID space; canvas child windows are destroyed automatically with their parent window. See bgiSetActiveCanvas and bgiFlipCanvas for the render flow.