mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-27 19:43:06 +00:00
working on scrollbar, wip
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@163 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
18
src/draw.c
18
src/draw.c
@@ -48,6 +48,21 @@ MwLLColor MwParseColor(MwWidget handle, const char* text) {
|
||||
return MwLLAllocColor(handle->lowlevel, r, g, b);
|
||||
}
|
||||
|
||||
MwLLColor MwLightenColor(MwWidget handle, MwLLColor color, int r, int g, int b) {
|
||||
int cr = color->red + r;
|
||||
int cg = color->green + g;
|
||||
int cb = color->blue + b;
|
||||
|
||||
if(cr < 0) cr = 0;
|
||||
if(cg < 0) cg = 0;
|
||||
if(cb < 0) cb = 0;
|
||||
if(cr > 255) cr = 255;
|
||||
if(cg > 255) cg = 255;
|
||||
if(cb > 255) cb = 255;
|
||||
|
||||
return MwLLAllocColor(handle->lowlevel, cr, cg, cb);
|
||||
}
|
||||
|
||||
void MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color) {
|
||||
MwPoint p[4];
|
||||
|
||||
@@ -177,3 +192,6 @@ MwLLPixmap MwLoadImage(MwWidget handle, const char* path) {
|
||||
|
||||
return px;
|
||||
}
|
||||
|
||||
void MwDrawTriangle(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int direction) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user