X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdraw%2Fao_logo.c;h=53b9a3c289400eabde5dcedd0392aadf8545d50b;hb=f9103d13f620cb06642aacdff9dcaf05e87d671f;hp=747332765839ba05bd3da05b4176ecd6a5614685;hpb=936ef3907e956b1a42ad54fe5757bd816b20890f;p=fw%2Faltos diff --git a/src/draw/ao_logo.c b/src/draw/ao_logo.c index 74733276..53b9a3c2 100644 --- a/src/draw/ao_logo.c +++ b/src/draw/ao_logo.c @@ -21,6 +21,18 @@ #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) +void +ao_logo_poly(struct ao_bitmap *dst, + const struct ao_transform *transform, + uint32_t fill, + uint8_t rop) +{ + if (!transform) + transform = &ao_identity; + 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); +} + void ao_logo(struct ao_bitmap *dst, const struct ao_transform *transform, @@ -33,8 +45,7 @@ ao_logo(struct ao_bitmap *dst, 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_logo_poly(dst, 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); }