System/Libraries/Graphics2D: Zero-alloc Rect2D
This commit is contained in:
parent
1cc118da6f
commit
76db21a118
1 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
U32 color)
|
||||
{ // Draw a rectangle fill.
|
||||
Context2D* tmpctx = NewContext2D(w, h);
|
||||
Fill2D(tmpctx, color);
|
||||
CopyRect2D(ctx, x, y, tmpctx);
|
||||
DelContext2D(tmpctx);
|
||||
I64 i;
|
||||
for (i = y; i < y + h; i++) {
|
||||
HLine2D(ctx, x, i, x + w, color);
|
||||
}
|
||||
}
|
||||
|
||||
U0 ConsolePrint2D(Context2D* ctx, I64 x, I64 y,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue