fix coloring
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@476 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
4618fee8d5
commit
06807b6779
1 changed files with 7 additions and 5 deletions
|
|
@ -88,7 +88,6 @@ static int ttf_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int
|
|||
int tw, th;
|
||||
MwRect r;
|
||||
MwLLPixmap p;
|
||||
int i;
|
||||
int ax, lsb;
|
||||
int x = 0;
|
||||
if(ttf == NULL) return 1;
|
||||
|
|
@ -126,11 +125,14 @@ static int ttf_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int
|
|||
if(a != 0) {
|
||||
a /= 255;
|
||||
|
||||
a = 1 - a;
|
||||
opx[0] = base->red * (1 - a);
|
||||
opx[1] = base->green * (1 - a);
|
||||
opx[2] = base->blue * (1 - a);
|
||||
|
||||
opx[0] += color->red * a;
|
||||
opx[1] += color->green * a;
|
||||
opx[2] += color->blue * a;
|
||||
|
||||
opx[0] = base->red * a;
|
||||
opx[1] = base->green * a;
|
||||
opx[2] = base->blue * a;
|
||||
opx[3] = 255;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue