Tscope5
graphics4.c

display size and position, relative coordinate scale + display coordinate system

#include <tscope5.h>
int main()
{
ts5_set_coordinate_scale(TS5_RELATIVE_COORDINATES);
ts5_set_coordinate_system(TS5_DISPLAY_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.25, 0.25);
ts5_printf(0.5, 0.4, "display adapter size: %.0f x %.0f", mw, mh);
ts5_printf(0.5, 0.5, "display size: %.0f x %.0f", dw, dh);
ts5_printf(0.5, 0.6, "display position: %.0f x %.0f", dx, dy);
ts5_printf(0.5, 0.7, "bitmap size: %.0f x %.0f", bw, bh);
return 0;
}