Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Help with DrawLine, DrawBox etc.

Author
Message
Diegs
9
Years of Service
User Offline
Joined: 27th Oct 2015
Location:
Posted: 2nd Nov 2015 23:14
Hi to all ...
I tried to use the command DrawBox, but if I change the SetViewZoom( zoom# ) the sprite is scaled but the Box (or Line or elipse) remain in the original size.

I use AppGameKit trial version and i don't know if in final release they work fine!

Sorry for my bad english, I'm Italian!

This is my code test:

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Nov 2015 05:55
The draw commands are always relative to the screen. So a line that is 100 units long on the screen will always be 100 units long on the screen, even if you have zoomed in 100x.
You have to calculate it manually.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 3rd Nov 2015 10:09
ScreenToWorldX ( x )
ScreenToWorldY ( y )
WorldToScreenX ( x )
WorldToScreenY ( y )
AGK (Steam) V2 Beta .. : Windows 10 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-11-25 15:23:38
Your offset time is: 2024-11-25 15:23:38