double getwidth(double size) { double height = aa_imgheight(context) / size; double width = height * (double) aa_imgwidth(context) * 0.75 / aa_imgheight(context) * aa_mmheight(context) / aa_mmwidth(context); return (width); }
void centerprinth(int x, int y, double size, int color, char *text, int mode) { if (!mode || !dual) { double width = aa_imgwidth(context) / size; double height = width * (double) aa_imgheight(context) * 1.333 / aa_imgwidth(context) * aa_mmwidth(context) / aa_mmheight(context); print(x - (width * strlen(text)) / 2, y - height / 2, width, height, font, color, text); } else { if (mode & 1) { double width = aa_imgwidth(context) / size / 2; double height = width * (double) aa_imgheight(context) * 1.333 / aa_imgwidth(context) * aa_mmwidth(context) / aa_mmheight(context); print(x / 2 - (width * strlen(text)) / 2, y - height / 2, width, height, font, color, text); } if (mode & 1) { double width = aa_imgwidth(context) / size / 2; double height = width * (double) aa_imgheight(context) * 1.333 / aa_imgwidth(context) * aa_mmwidth(context) / aa_mmheight(context); print(aa_imgwidth(context) / 2 + x / 2 - (width * strlen(text)) / 2, y - height / 2, width, height, font, color, text); } } }
static float get_pixelheight(int height) { return (aa_mmheight(context)); }