Tscope5
graphics2.c

display size and position, relative coordinate scale

#include <tscope5.h>
int main()
{
ts5_set_coordinate_scale(TS5_RELATIVE_COORDINATES);
double mw, mh;
double dw, dh;
ts5_get_display_size(1, &dw, &dh);
double dx, dy;
TS5_BITMAP *map = ts5_alloc_bitmap(0.5, 0.5);
double bw, bh;
ts5_get_bitmap_size(map, &bw, &bh);
ts5_draw_bitmap(map, 0.0, 0.0);
ts5_printf(0.0, 0.2, "display adapter size: %.0f x %.0f", mw, mh);
ts5_printf(0.0, 0.0, "display size: %.0f x %.0f", dw, dh);
ts5_printf(0.0, -0.2, "display position: %.0f x %.0f", dx, dy);
ts5_printf(0.0, -0.4, "bitmap size: %.0f x %.0f", bw, bh);
return 0;
}