1
0
Fork 0

Draw: Add Lth_DrawRectAndClip

master
Marrub 2016-10-17 19:10:24 -04:00
parent 3e801bda10
commit a0e68bab91
2 changed files with 13 additions and 1 deletions

View File

@ -128,6 +128,7 @@ void Lth_ContextRun(Lth_Context *ctx);
void Lth_ContextClipPush(Lth_Context *ctx, int x, int y, int w, int h);
void Lth_ContextClipPop(Lth_Context *ctx);
void Lth_DrawRectAndClip(Lth_Context *ctx, int x, int y, int w, int h, __fixed alpha);
void Lth_DrawRect(Lth_Context *ctx, int x, int y, int w, int h, __fixed alpha);
void Lth_ControlRun(Lth_Context *ctx, void *control_);

View File

@ -17,7 +17,11 @@
// Extern Functions |
//
void Lth_DrawRect(Lth_Context *ctx, int x, int y, int w, int h, __fixed alpha)
//
// Lth_DrawRectAndClip
//
void Lth_DrawRectAndClip(Lth_Context *ctx, int x, int y, int w, int h,
__fixed alpha)
{
Lth_assert(ctx != NULL);
@ -27,7 +31,14 @@ void Lth_DrawRect(Lth_Context *ctx, int x, int y, int w, int h, __fixed alpha)
for(int iy = 0; iy < h; iy += 128)
Lth_DrawSpriteAlpha(s"lithos_gfx/Base/Black128.png", ctx->hid.cur--,
x + ix, y + iy, alpha);
}
//
// Lth_DrawRect
//
void Lth_DrawRect(Lth_Context *ctx, int x, int y, int w, int h, __fixed alpha)
{
Lth_DrawRectAndClip(ctx, x, y, w, h, alpha);
Lth_ContextClipPop(ctx);
}