BBC BASIC for Windows
« convert coords text ,,graphic »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:19pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: convert coords text ,,graphic  (Read 457 times)
leslie griffin
Guest
xx convert coords text ,,graphic
« Thread started on: Jan 27th, 2010, 9:49pm »

mode 14
rem 160,,x,,64...1280..x..1024.........2560.. x..2048
print 2560/160
rem chr x = 16 graph units
print 2048/64
rem chr y = 32 graph units
rem graphic 0,0 is bottom left of screnn
rem text 0,0 is top left of screen
brains gone numb
anyone got a simple formula for converting text to graphic co-ords and vice versa, I tend to use mode 14 alot as detailed above......thx
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: convert coords text ,,graphic
« Reply #1 on: Jan 27th, 2010, 10:18pm »

Quote:
anyone got a simple formula for converting text to graphic co-ords and vice versa

If you're trying to align text and graphics you probably should be using the VDU 5 (write text at graphics cursor) mode, so you can use the same coordinate system for both.

Failing that you can find conversion functions between BBC BASIC graphics units and Windows pixel units here:

http://bb4w.wikispaces.com/Converting+graphics+coordinates

You may be able to use those to convert to text coordinates by dividing by the character width and height values (@vdu%!216 and @vdu%!220).

Richard.
User IP Logged

leslie griffin
Guest
xx Re: convert coords text ,,graphic
« Reply #2 on: Jan 27th, 2010, 10:40pm »

thx for the reply and help.....much appreciated.

leslie griffin.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls