X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdraw%2Fao_logo.c;h=d2d778ae34067e3fbe2faccd326429fa40aeda72;hb=c3dff4d7286991888bd79484c19adccc6926afc1;hp=1469ae21fca31ca777b7083448e23dd1565286e9;hpb=fbbb3a06e42ec51d5d0582fe674528bd0e9e13f2;p=fw%2Faltos diff --git a/src/draw/ao_logo.c b/src/draw/ao_logo.c index 1469ae21..d2d778ae 100644 --- a/src/draw/ao_logo.c +++ b/src/draw/ao_logo.c @@ -22,13 +22,19 @@ #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) void -ao_logo(const struct ao_bitmap *dst, - const struct ao_font *font, - uint32_t fill, - uint8_t rop) +ao_logo(const struct ao_bitmap *dst, + const struct ao_transform *transform, + const struct ao_font *font, + uint32_t fill, + uint8_t rop) { - ao_poly(dst, ao_logo_top, ARRAYSIZE(ao_logo_top), 0x00000000, AO_COPY); - ao_poly(dst, ao_logo_bottom, ARRAYSIZE(ao_logo_bottom), 0x00000000, AO_COPY); - ao_text(dst, font, 38, 31, "Altus", 0x00000000, AO_COPY); - ao_text(dst, font, 38, 57, "Metrum", 0x00000000, AO_COPY); + if (!transform) + transform = &ao_identity; + int16_t name_x = ao_t_xi(ao_logo_width, 0.0f, transform); + int16_t name_y1 = ao_t_yi(ao_logo_width, 0.5f, transform); + int16_t name_y2 = ao_t_yi(ao_logo_width, 0.98f, transform); + ao_poly(dst, ao_logo_top, ARRAYSIZE(ao_logo_top), transform, fill, rop); + ao_poly(dst, ao_logo_bottom, ARRAYSIZE(ao_logo_bottom), transform, fill, rop); + ao_text(dst, font, name_x, name_y1, "Altus", fill, rop); + ao_text(dst, font, name_x, name_y2, "Metrum", fill, rop); }