Gambas Documentation - /comp/gb.sdl2/draw

# Draw (gb.sdl2)

This static class allows to draw inside the SDL window during its Draw event.

The Draw methods won't work if your window has the OpenGL flag set. In that case, you have to use the OpenGL API to draw the window contents.

This class is static.

Static properties | Static methods
--- | ---

Return or set the default color used for drawing operations.
Background
Return or set the font used for drawing text.
Font

Start drawing on Device.
Begin
Clear the current drawing device with the specified Color.
Clear
Ends a drawing operation.
End
Fill a rectangle on the current drawing device with the specified color.
FillRect
Fill some number of rectangles on the current drawing device with the specified color.
FillRects
Paint an image on the current drawing device.
Image
Draw a line on the current drawing device using the specified color.
Line
Draw some number of lines on the current drawing device with the specified color.
Lines
Draw a point on the current drawing device using the specified color.
Point
Draw some number of points on the current drawing device with the specified color.
Points
Draw a rectangle on the current drawing device with the specified color.
Rect
Draw some number of rectangles on the current drawing device with the specified color.
Rects
Draw some text on the current drawing device using the current Font.
Text