|
resonance 1.0.1
|
#include <vector>#include "rndartt/abitmap.h"#include "rndartt/arect.h"#include "rndartt/arle8reader.h"

Go to the source code of this file.
Classes | |
| class | ACanvas |
| Drawing surface over an ABitmap, with a clip rectangle. More... | |
Enumerations | |
| enum | ACanvasClipCode { kACanvasClipLeft = 1 , kACanvasClipRight = 2 , kACanvasClipAbove = 4 , kACanvasClipBelow = 8 } |
| Bits ACanvas::ClipCode() returns. More... | |
Functions | |
| unsigned short | APackRgb1555From8888 (unsigned int nColor) |
| Pack an 8888 colour into 1555. | |
Variables | |
| constexpr int | kACanvasFractionBits = 8 |
| Fractional bits in the coordinates DrawLine() and DrawTmapRow8U() take. | |
| enum ACanvasClipCode |
Bits ACanvas::ClipCode() returns.
The four bits form a Cohen and Sutherland outcode against the canvas clip rectangle. A point inside the rectangle produces zero.
| unsigned short APackRgb1555From8888 | ( | unsigned int | nColor | ) |
Pack an 8888 colour into 1555.
The alpha bit comes from bit 31 and the low three bits of each channel are dropped. The helper is out of line because eleven call sites across ACanvas8, ACanvas15, and ACanvasLin15 share it, while the same packing inlined into ACanvas15::SetColor32() is written out there instruction for instruction.
| nColor | The 8888 colour. |
|
constexpr |
Fractional bits in the coordinates DrawLine() and DrawTmapRow8U() take.