mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-24 16:27:42 +01:00
Remove PoolPrintFloat, adapt format litteral.
This commit is contained in:
parent
9b85ac2a5b
commit
95f3123235
@ -194,7 +194,7 @@ EFI_STATUS ParseSVGXIcon(NSVGparser *p, INTN Id, CONST CHAR8 *IconName, float S
|
||||
|
||||
float Height = IconImage->height * Scale;
|
||||
float Width = IconImage->width * Scale;
|
||||
// DBG("icon %s width=%ls height=%ls\n", IconName, Width, Height);
|
||||
// DBG("icon %s width=%f height=%f\n", IconName, Width, Height);
|
||||
int iWidth = (int)(Width + 0.5f);
|
||||
int iHeight = (int)(Height + 0.5f);
|
||||
// EG_IMAGE *NewImage = egCreateFilledImage(iWidth, iHeight, TRUE, &MenuBackgroundPixel);
|
||||
@ -276,7 +276,7 @@ EFI_STATUS ParseSVGIcon(NSVGparser *p, INTN Id, CONST CHAR8 *IconName, float Sc
|
||||
}
|
||||
// if (Id == BUILTIN_ICON_BACKGROUND || Id == BUILTIN_ICON_BANNER) {
|
||||
// DBG("IconImage size [%d,%d]\n", (int)IconImage->width, (int)IconImage->height);
|
||||
// DBG("IconImage left corner x=%ls y=%ls\n", PoolPrintFloat(IconImage->realBounds[0]), PoolPrintFloat(IconImage->realBounds[1]));
|
||||
// DBG("IconImage left corner x=%f y=%f\n", IconImage->realBounds[0], IconImage->realBounds[1]);
|
||||
// DumpFloat2("IconImage real bounds", IconImage->realBounds, 4);
|
||||
// }
|
||||
if ((strstr(IconName, "selection_big") != NULL) && (!GlobalConfig.SelectionOnTop)) {
|
||||
@ -364,7 +364,7 @@ EFI_STATUS ParseSVGIcon(NSVGparser *p, INTN Id, CONST CHAR8 *IconName, float Sc
|
||||
|
||||
float Height = IconImage->height * Scale;
|
||||
float Width = IconImage->width * Scale;
|
||||
// DBG("icon %s width=%ls height=%ls\n", IconName, Width, Height);
|
||||
// DBG("icon %s width=%f height=%f\n", IconName, Width, Height);
|
||||
int iWidth = (int)(Width + 0.5f);
|
||||
int iHeight = (int)(Height + 0.5f);
|
||||
EG_IMAGE *NewImage = egCreateFilledImage(iWidth, iHeight, TRUE, &MenuBackgroundPixel);
|
||||
@ -965,7 +965,7 @@ INTN renderSVGtext(EG_IMAGE* TextBufferXY, INTN posX, INTN posY, INTN textType,
|
||||
p->image->realBounds[1] = fontSVG->bbox[1] * Scale;
|
||||
p->image->realBounds[2] = fontSVG->bbox[2] * Scale + x; //last bound
|
||||
p->image->realBounds[3] = fontSVG->bbox[3] * Scale;
|
||||
// DBG("internal Scale=%ls\n", Scale);
|
||||
// DBG("internal Scale=%lf\n", Scale);
|
||||
// DumpFloat2("text bounds", p->image->realBounds, 4);
|
||||
//We made an image, then rasterize it
|
||||
rast = nsvgCreateRasterizer();
|
||||
|
@ -4114,15 +4114,15 @@ float addLetter(NSVGparser* p, CHAR16 letter, float x, float y, float scale, UIN
|
||||
// then apply text transform
|
||||
nsvg__xformMultiply(shape->xform, p->text->xform);
|
||||
|
||||
/*
|
||||
if (letter == L'C') {
|
||||
DBG("bbox0=%ls ", PoolPrintFloat(p->text->font->bbox[0]));
|
||||
DBG("bbox3=%ls \n", PoolPrintFloat(p->text->font->bbox[3]));
|
||||
DumpFloat2("glyph xform:", shape->xform, 6);
|
||||
DBG("stroke-color=%X ", shape->stroke.color);
|
||||
DBG("stroke-width=%ls\n", shape->strokeWidth);
|
||||
}
|
||||
*/
|
||||
|
||||
// if (letter == L'C') {
|
||||
// DBG("bbox0=%f ", p->text->font->bbox[0]);
|
||||
// DBG("bbox3=%f \n", p->text->font->bbox[3]);
|
||||
// DumpFloat2("glyph xform:", shape->xform, 6);
|
||||
// DBG("stroke-color=%X ", shape->stroke.paint.color);
|
||||
// DBG("stroke-width=%f\n", shape->strokeWidth);
|
||||
// }
|
||||
|
||||
//in glyph units
|
||||
shape->bounds[0] = p->text->font->bbox[0] + x/scale; //x + p->font->bbox[0] * scale;
|
||||
shape->bounds[1] = p->text->font->bbox[1] + y/scale; //y + p->font->bbox[1] * scale;
|
||||
@ -4424,8 +4424,7 @@ NSVGparser* nsvgParse(char* input, /* const char* units,*/ float dpi, float opac
|
||||
p->image->width = bounds[2] - bounds[0];
|
||||
p->image->height = bounds[3] - bounds[1];
|
||||
#endif
|
||||
DBG("scaled width=%f height=%ls\n", p->image->width,
|
||||
PoolPrintFloat(p->image->height));
|
||||
DBG("scaled width=%f height=%f\n", p->image->width, p->image->height);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user