int16 | id | The instruction id |
int32 | size | The size of the data |
Id |
Name |
Size |
Data |
---|---|---|---|
0x0010 |
MovePenBy |
4 |
BPoint where |
0x0100 |
StrokeLine |
16 |
BPoint start BPoint end |
0x0101 |
StrokeRect |
16 |
BRect rect |
0x0102 |
FillRect |
16 |
BRect rect |
0x0103 |
StrokeRoundRect |
24 | BRect rect BPoint radii |
0x0104 |
FillRoundRect | 24 |
BRect rect BPoint radii |
0x0105 |
StrokeBezier |
32 |
BPoint[4] control |
0x0106 |
FillBezier |
32 |
BPoint[4] control |
0x010B |
StrokePolygon |
4 + point data size + 1 |
int32 numPoints BPoint *points bool isClosed |
0x010C |
FillPolygon |
4 + point data size | int32 numPoints BPoint *points |
0x010D |
StrokeShape |
shape data size |
shape data, see below |
0x010E | FillShape | shape data size | shape data, see below |
0x010F |
DrawString |
4 + string data size + 8 |
strlen char *string float deltax float deltay |
0x0110 | DrawPixels |
56 + pixel data size |
BRect src BRect dest int32 width int32 height int32 bytesPerRow int32 pixelFormat int32 flags int32 length of pixel data pixel data |
0x0112 |
DrawPicture |
12 |
BPoint where? ???? |
0x0113 | StrokeArc |
24 |
BPoint center BPoint radii float startTheta float arcTheta |
0x0114 |
FillArc |
24 |
BPoint center BPoint radii float startTheta float arcTheta |
0x0115 |
StrokeEllipse |
16 |
BRect rect |
0x0116 | FillEllipse | 16 |
BRect rect |
0x0200 |
EnterStateChange |
size of state instructions |
state instructions |
0x0201 | SetClippingRects | 16 + size of rects |
clipping_rect bound clipping_rect *rect |
0x0202 | ClipToPicture | 7 + 8 + 1 | zero bytes BPoint pt bool clip_to_inverse_picture |
0x0203 |
PushState |
0 |
|
0x0204 | PopState | 0 |
|
0x0205 |
SetClippingRects | 0 | This is a shorter instruction for 0 clipping
rects. |
0x0300 |
SetOrigin |
8 |
BPoint pt |
0x0301 |
SetPenLocation |
8 |
BPoint pt |
0x0302 |
SetDrawingMode |
2 |
drawing_mode mode |
0x0303 | SetLineMode |
2 + 2 + 4 |
cap_mode capMode join_mode joinMode float miterLimit |
0x0304 |
SetPenSize | 4 |
float size |
0x0305 |
SetScale |
4 |
float scale |
0x0306 |
SetForeColor |
4 |
rgb_color color |
0x0307 |
SetBackColor |
4 |
rgb_color color |
0x0308 |
SetStipplePattern |
8 |
pattern p |
0x0309 |
EnterFontState |
size of font instructions | font instructions |
0x030A |
SetBlendingMode |
4 |
source_alpha alphaSrcMode alpha_function alphaFncMode |
0x0380 |
SetFontFamily |
4 + string data size | strlen char *family |
0x0381 |
SetFontStyle |
4 + string data size | strlen char style |
0x0382 |
SetFontSpacing |
4 |
int32 spacing |
0x0383 |
SetFontEncoding |
4 |
int32 encoding |
0x0384 |
SetFontFlags |
4 |
int32 flags |
0x0385 |
SetFontSize |
4 |
float size |
0x0386 |
SetFontRotate |
4 |
float rotation |
0x0387 |
SetFontShear |
4 |
float shear(is 0 instead of 90?) |
0x0389 |
SetFontFace |
4 |
int32 flags |
0x0388 |
SetFontBPP | 4 |
int32 bpp (default 8) |
int32 |
instruction count |
uint32 *instructions |
Each instruction looks
like: First byte is the instruction id The next three bytes is the amount of points used* |
int32 |
point count |
BPoint *points | points |
Id |
Name |
Points* |
Notes |
---|---|---|---|
0x80 | MoveTo |
|
|
0x10 | LineTo | point count in instruction |
|
0x90 | MoveTo LineTo | point count in instruction + 1 |
|
0x20 | BezierTo | point count in instruction |
|
0xA0 | MoveTo BezierTo | point count in instruction + 1 |
|
0x40 | Close | 0 |
|