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.

Dark GDK / Texture co-ordinates don't hold in 2D.... necessarily

Author
Message
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 12th Apr 2008 00:08
Can anyone tell me if this is supposed to work this way? I can work around it but it requires some extra effort.

Keep in mind that I'm using my Sprite and Image class for the objects involved. But the results are the same regardless of whether I use them or hard code the numbers for the respective items.

I set up a sprite and match it to an image ( a vertical strip of 11 numerical digits.) I size the sprite and set the texture co-ordinates to cover the upper 1/11 th of the image. This causes it to display the digit '0'. See the following code:




As written, the above works. But if I uncomment the

// mySprite.MoveTo(128, 128);

statement the sprite will stay small but will squeeze in the entire image into that space. In another test, if I re-establish the co-ordinates after the move the intended, partial image remains intact.


Thanks,

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-11-20 07:40:03
Your offset time is: 2024-11-20 07:40:03