diff --git a/docs/develop/interface/BPicture_specifications.html b/docs/develop/interface/BPicture_specifications.html index a7019eb34b..a17b9a80b1 100644 --- a/docs/develop/interface/BPicture_specifications.html +++ b/docs/develop/interface/BPicture_specifications.html @@ -2,7 +2,6 @@ BPicture specifications - @@ -10,7 +9,8 @@ content="BPicture specifications for OpenBeOS"> -Picture data
+Picture +data

The data of a BPicture is composed of instructions.

@@ -29,15 +29,14 @@ These instructions have a small header, which looks as follows:
size The size of the data -
-After this header the data follows. There are two exceptions: EnterStateChange -and EnterFontState. These are used to enclose state and font changes. For -ExitStateChange and ExitFontState there are no instructions, this is not needed -as we know the size of the instruction block in the header of the Enter* -functions.
+After this header the data follows. There are two exceptions: +EnterStateChange and EnterFontState. These are used to enclose state and +font changes. For ExitStateChange and ExitFontState there are no +instructions, this is not needed as we know the size of the instruction +block in the header of the Enter* functions.

These are the known instructions at the moment:

@@ -149,7 +148,7 @@ bool isClosed
FillPolygon
- 4 + point data size + 4 + point data size int32 numPoints
BPoint *points
@@ -161,13 +160,13 @@ BPoint *points
shape data size
- shape data, see below + shape data, see below - 0x010E - FillShape - shape data size - shape data, see below + 0x010E + FillShape + shape data size + shape data, see below 0x010F
@@ -183,7 +182,7 @@ float deltay
- 0x0110 + 0x0110 DrawPixels
52 + pixel data size
@@ -198,6 +197,17 @@ int32 flags
pixel data
+ + 0x0112
+ + DrawPicture
+ + 12
+ + BPoint where?
+????
+ + 0x0113 StrokeArc
@@ -251,8 +261,19 @@ float arcTheta 0x0201 SetClippingRects - TODO - TODO + 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
@@ -275,11 +296,11 @@ float arcTheta 0x0205
- SetClippingRects
+ SetClippingRects + 0 + This is a shorter instruction for 0 clipping +rects.
- TODO
- - TODO 0x0300
@@ -377,6 +398,17 @@ float miterLimit
size of font instructions font instructions + + 0x030A
+ + SetBlendingMode
+ + 4
+ + source_alpha alphaSrcMode
+alpha_function alphaFncMode
+ + 0x0380
@@ -466,7 +498,6 @@ char style int32 flags
-
@@ -476,29 +507,22 @@ There are a few undocumented instructions:
style="text-align: left;" width="100%"> - 30A
- - ????
+ 0x0388
+ SetFontBPP 4
- some state change - - - 388
- - ????
- - 4
- - some font change
- + int32 bpp
-Also, not all instructions where checked yet. The SetClippingRects and DrawPixels -data has still to be documented.
+Also, not all instructions where checked yet. The SetClippingRects and +DrawPixels data has still to be documented.
+
+Regarding DrawPicture and ClipToPicture, it seems the pictures to draw +are not inside the flattened data, instead they are stored as messages +in the BMessage in a field called "piclib".

Shape data

@@ -514,13 +538,13 @@ The shape data contained in a BPicture is stored as follows:
- int32 *instructions
+ uint32 *instructions
- Each instruction looks like:
-First byte is the instruction id, MoveTo is not coded as a seperate instruction, -but as a bitflag of the next instruction 0x80 see the table below.
+ Each instruction looks +like:
+First byte is the instruction id
The next three bytes is the amount of points used*
- + @@ -531,10 +555,9 @@ The next three bytes is the amount of points used*
+ BPoint *points points
-
- @@ -553,51 +576,78 @@ The next three bytes is the amount of points used*
- 0x0B + 0x80 MoveTo - 1
+ + + 0x10 LineTo point count in instruction
-
+ + 0x90 MoveTo LineTo point count in instruction + 1 -
+ + 0x20 BezierTo point count in instruction - point count is always multiple of 3
+ + 0xA0 MoveTo BezierTo point count in instruction + 1 - point count is always multiple of 3 + + + - 0x70 + 0x40 Close - 0
- -
+ 0 + +
-