thing
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@42 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
224b13fb60
commit
b20c81b46e
11 changed files with 189 additions and 2 deletions
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue