#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,
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);
}
.y_scale = 48, .y_off = 0,
};
+static const struct ao_transform show_transform = {
+ .x_scale = 36, .x_off = 100,
+ .y_scale = 36, .y_off = 0,
+};
+
#define BIG_FONT BitstreamVeraSans_Roman_58_font
#define VOLT_FONT BitstreamVeraSans_Roman_58_font
#define SMALL_FONT BitstreamVeraSans_Roman_12_font
_ao_lco_show_info(void)
{
info_y = INFO_START_Y;
+ ao_logo_poly(&fb, &show_transform, AO_BLACK, AO_COPY);
_ao_lco_info("%s", ao_product);
_ao_lco_info("Version: %s", ao_version);
_ao_lco_info("Serial: %d", ao_serial_number);