DRAW LIBRARY
============
A high‑performance 2D drawing library for QB64‑PE, providing fast routines for shapes, lines, images, text rendering, and geometric transformations.
FEATURES
INSTALLATION
COMMAND INDEX
CIRCLES & ELLIPSES
Philosophy
The Draw Library is built around a few core principles:
EXAMPLE
LICENSE
This library is free to use, modify, and distribute in any QB64PE project.
Attribution is appreciated but not required.
AUTHOR
Created by Steve, with a focus on clarity, performance, and developer‑friendly design.
============
A high‑performance 2D drawing library for QB64‑PE, providing fast routines for shapes, lines, images, text rendering, and geometric transformations.
FEATURES
- Fast filled shapes using scanline algorithms
- Thick lines, triangles, quads, and rounded rectangles
- Rotated and scaled image rendering
- Rotated and filled ellipses
- Arc and ring‑arc support
- Text‑to‑image rendering
- Clean naming conventions
- No dependencies beyond QB64‑PE
INSTALLATION
- Place the library file in your project folder.
- Add this line at the top of your program:
'$INCLUDE:'Draw Library.QLB'
- Compile and run.
COMMAND INDEX
CIRCLES & ELLIPSES
- Draw.Circle.Fill
- Draw.Circle.Thick
- Draw.Ellipse.Filled
- Draw.Ellipse.Arc.Fill
- Draw.Ellipse.Ring.Arc.Fill
- Draw.Ellipse.Tilt
- Draw.Ellipse.Tilt.Fill
- Draw.Ring.Arc.Fill
- Draw.Arc.Fill
- Draw.Line.Angle
- Draw.Line.Thick
- Draw.Triangle
- Draw.Triangle.Fill
- Draw.Triangle.Thick
- Draw.Quad
- Draw.Quad.Fill
- Draw.Quad.Thick
- Draw.Rect.Rounded
- Draw.Rect.Rounded.Fill
- Draw.Image
- Draw.Text.To.Image&
Philosophy
The Draw Library is built around a few core principles:
- 1. Consistency
- Every command follows the same naming pattern:
Code: (Select All)Draw.<Shape>.<Variant>
- Every command follows the same naming pattern:
- 2. Performance
- Wherever possible, routines use:
_MAPTRIANGLE for fast GPU‑accelerated fills
_MEM for direct pixel writes
Integer math for speed and stability
- Wherever possible, routines use:
- 3. Compatibility
- All routines work in:
Any 32‑bit screen mode
Any resolution
Any aspect ratio
- All routines work in:
- 4. Simplicity
- The API is designed to be intuitive:
No global state
No hidden dependencies
No required initialization
- The API is designed to be intuitive:
EXAMPLE
Code: (Select All)
'$INCLUDE:'Draw Library.QLB'
SCREEN _NEWIMAGE(800, 600, 32)
Draw.Circle.Fill 400, 300, 100, _RGB32(255, 140, 0)
img& = _LOADIMAGE("ship.png", 32)
Draw.Image img&, 400, 300, 1, 1, 45, 0
LICENSE
This library is free to use, modify, and distribute in any QB64PE project.
Attribution is appreciated but not required.
AUTHOR
Created by Steve, with a focus on clarity, performance, and developer‑friendly design.


![[Image: threat-detected.png]](https://i.ibb.co/gcJPSp8/threat-detected.png)