Author Topic: Device Independent Graphics  (Read 1847 times)


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Device Independent Graphics
« on: May 06, 2011, 04:46 PM »
Basic Version 3.6 makes it much easier for you to write graphics programs that will work on any resolution screen.  This is accomplished by the addition of a new graphics command.

SetScale Xsize, Ysize

This command allows you to choose the screen resolution that you will be working with.  Intended to be executed just following a Graphics On command, SetScale causes all graphics command coordinates to be scaled from your chosen resolution to the actual resolution of the screen.

SetScale can be added to existing graphics programs that only work on one resolution to make them work on any resolution. Simply add a SetScale command which sets the screen resolution to the resolution the program was designed to run on.  That's it.  Your program will now work on any size screen.

ScreenX(), ScreenY() and Touch x,y will all return coordinates that match the coordinates set by the SetScale command.  SetScale only affects coordinates when the graphics mode is On.

« Last Edit: May 06, 2011, 07:34 PM by Chuck »