No announcement yet.

Graphic Coordinate Variables: Single Precision versus Long Integer

  • Filter
  • Time
  • Show
Clear All
new posts

  • Graphic Coordinate Variables: Single Precision versus Long Integer

    I'd like to clarify whether all graphic coordinates should be passed as single precision variables, whether they represent pixels or scaled coordinates. For example, the on-line help says that the coordinates for GRAPHIC LINE are passed as single precision variables. However, my experience with other compliers is that scaled coordinates are passed as floating point variables (such as single) while pixel coordinates are passed as integers (or long integers as prefered by PowerBasic).

    The reason for the difference is that scaled coordinates constitute a continuous coordinate system while pixel coordinates specify a particular point. It would be helpful to know whether the Graphic Functions in PowerBasic make this distinction. So far, I've been successful when passing pixel coordinates as long-integers, but I don't know whether I'm taking a performace hit by forcing PowerBasic to convert the coordinates to single-precision before calling the graphic functions.

    John Harvill