mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-10 21:19:55 +02:00
System/Libraries/Graphics2D: Zero-alloc Rect2D
This commit is contained in:
@@ -975,10 +975,10 @@ U0 HGradientRect2D(Context2D* ctx, I64 x, I64 y, I64 w, I64 h, U32 from,
|
|||||||
U0 Rect2D(Context2D* ctx, I64 x, I64 y, I64 w, I64 h,
|
U0 Rect2D(Context2D* ctx, I64 x, I64 y, I64 w, I64 h,
|
||||||
U32 color)
|
U32 color)
|
||||||
{ // Draw a rectangle fill.
|
{ // Draw a rectangle fill.
|
||||||
Context2D* tmpctx = NewContext2D(w, h);
|
I64 i;
|
||||||
Fill2D(tmpctx, color);
|
for (i = y; i < y + h; i++) {
|
||||||
CopyRect2D(ctx, x, y, tmpctx);
|
HLine2D(ctx, x, i, x + w, color);
|
||||||
DelContext2D(tmpctx);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
U0 ConsolePrint2D(Context2D* ctx, I64 x, I64 y,
|
U0 ConsolePrint2D(Context2D* ctx, I64 x, I64 y,
|
||||||
|
|||||||
Reference in New Issue
Block a user