mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-06 09:29:44 +00:00
thing
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@42 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
24
src/draw.c
24
src/draw.c
@@ -115,3 +115,27 @@ void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert) {
|
||||
rect->width -= border * 2;
|
||||
rect->height -= border * 2;
|
||||
}
|
||||
|
||||
void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor color){
|
||||
int i, x, y, sx, sy;
|
||||
MwRect r;
|
||||
|
||||
sx = point->x;
|
||||
sy = point->y;
|
||||
|
||||
for(i = 0; text[i] != 0; i++){
|
||||
for(y = 0; y < 14; y++){
|
||||
for(x = 0; x < 7; x++){
|
||||
r.x = sx + x;
|
||||
r.y = sy + y;
|
||||
r.width = 1;
|
||||
r.height = 1;
|
||||
|
||||
if(MwFontData[(unsigned char)text[i]].data[y] & (1 << (7 - x))){
|
||||
MwDrawRect(handle, &r, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
sx += 7;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user