Compare commits

..

No commits in common. "84ad1b0d6b219f25ad00493d4cdbeda5d1966efc" and "3c336b5e954ccef8b075f96d38ee65319ebe6242" have entirely different histories.

2 changed files with 8 additions and 22 deletions

View file

@ -74,17 +74,10 @@ static int ft2_MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const c
int oy = y + (ttf->face->height * ttf->px / ttf->face->units_per_EM) - ttf->face->glyph->bitmap_top + cy + (ttf->face->descender * ttf->px / ttf->face->units_per_EM);
unsigned char* opx = &px[(oy * tw + ox) * 4];
if(opx[3] == 0) {
opx[0] = color->common.red;
opx[1] = color->common.green;
opx[2] = color->common.blue;
opx[3] = bmp->buffer[cy * bmp->pitch + cx];
} else {
opx[0] = (opx[0] / color->common.red) / 255;
opx[1] = (opx[1] / color->common.green) / 255;
opx[2] = (opx[2] / color->common.blue) / 255;
opx[3] = bmp->buffer[cy * bmp->pitch + cx];
}
opx[0] = color->common.red;
opx[1] = color->common.green;
opx[2] = color->common.blue;
opx[3] = bmp->buffer[cy * bmp->pitch + cx];
}
}

View file

@ -53,17 +53,10 @@ static int stbtt_MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const
int oy = y + ceil(ttf->ascent * ttf->scale) + y0 + cy;
unsigned char* opx = &px[(oy * tw + ox) * 4];
if(opx[3] == 0) {
opx[0] = color->common.red;
opx[1] = color->common.green;
opx[2] = color->common.blue;
opx[3] = out[cy * ow + cx];
} else {
opx[0] = (opx[0] / color->common.red) / 255;
opx[1] = (opx[1] / color->common.green) / 255;
opx[2] = (opx[2] / color->common.blue) / 255;
opx[3] = out[cy * ow + cx];
}
opx[0] = color->common.red;
opx[1] = color->common.green;
opx[2] = color->common.blue;
opx[3] = out[cy * ow + cx];
}
}