app_server: add gradient stroke support

TODO: HTML5 remote desktop client.

Change-Id: Ie2a32c4a498462578476d29a7000ea0b6f86810b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9625
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
X512
2026-01-04 22:56:43 +00:00
committed by waddlesplash
parent 3f38072551
commit ceaf2dd2d6
18 changed files with 1065 additions and 210 deletions
+9
View File
@@ -224,15 +224,24 @@ enum {
// Graphics calls
AS_STROKE_ARC,
AS_STROKE_ARC_GRADIENT,
AS_STROKE_BEZIER,
AS_STROKE_BEZIER_GRADIENT,
AS_STROKE_ELLIPSE,
AS_STROKE_ELLIPSE_GRADIENT,
AS_STROKE_LINE,
AS_STROKE_LINE_GRADIENT,
AS_STROKE_LINEARRAY,
AS_STROKE_POLYGON,
AS_STROKE_POLYGON_GRADIENT,
AS_STROKE_RECT,
AS_STROKE_RECT_GRADIENT,
AS_STROKE_ROUNDRECT,
AS_STROKE_ROUNDRECT_GRADIENT,
AS_STROKE_SHAPE,
AS_STROKE_SHAPE_GRADIENT,
AS_STROKE_TRIANGLE,
AS_STROKE_TRIANGLE_GRADIENT,
AS_FILL_ARC,
AS_FILL_ARC_GRADIENT,
@@ -113,6 +113,8 @@ public:
status_t WriteDrawShapeGradient(const int32& opCount,
const void* opList, const int32& ptCount,
const void* ptList, const BGradient& gradient, const bool& fill);
status_t WriteStrokeLineGradient(const BPoint& start, const BPoint& end,
const BGradient& gradient);
status_t WriteDrawBitmap(const BRect& srcRect,
const BRect& dstRect, const int32& width,
const int32& height,
@@ -103,6 +103,7 @@ struct picture_player_callbacks {
void (*draw_polygon_gradient)(void* userData, size_t numPoints, const BPoint points[], bool isClosed, BGradient& gradient, bool fill);
void (*draw_shape_gradient)(void* userData, const BShape& shape, BGradient& gradient, bool fill);
void (*set_fill_rule)(void* userData, int32 fillRule);
void (*stroke_line_gradient)(void* userData, const BPoint& start, const BPoint& end, const BGradient& gradient);
};
+2 -1
View File
@@ -37,6 +37,7 @@ enum {
B_PIC_FILL_ARC_GRADIENT = 0x0123,
B_PIC_STROKE_ELLIPSE_GRADIENT = 0x0124,
B_PIC_FILL_ELLIPSE_GRADIENT = 0x0125,
B_PIC_STROKE_LINE_GRADIENT = 0x0126,
B_PIC_ENTER_STATE_CHANGE = 0x0200,
B_PIC_SET_CLIPPING_RECTS = 0x0201,
@@ -77,7 +78,7 @@ enum {
};
const static uint32 kOpsTableSize = 71;
const static uint32 kOpsTableSize = 72;
#endif