Tscope5
graphics1.c

display size and position, default coordinates

#include <tscope5.h>
int main()
{
double mw, mh;
ts5_set_display_size(mw/2.0, mh/2.0);
double dw, dh;
ts5_get_display_size(1, &dw, &dh);
double dx, dy;
TS5_BITMAP *map = ts5_alloc_bitmap(dw/2.0, dh/2.0);
double bw, bh;
ts5_get_bitmap_size(map, &bw, &bh);
ts5_draw_bitmap(map, 0.0, 0.0);
ts5_printf(0.0, 20.0, "display adapter size: %.0f x %.0f", mw, mh);
ts5_printf(0.0, 0.0, "display size: %5.2f x %5.2f", dw, dh);
ts5_printf(0.0, -20.0, "display position: %5.2f x %5.2f", dx, dy);
ts5_printf(0.0, -40.0, "bitmap size: %5.2f x %5.2f", bw, bh);
ts5_draw_mouse_button(dw/2.0-50.0, -dh/2.0+50.0);
return 0;
}