Posts: 660
Threads: 142
Joined: Apr 2022
Reputation:
58
So is it me, my screen, an optical resolution, or how _putimage works that leads to me not actually getting square pixels with this little bit of code? The red dots created at 15,15 and 16,16 in the sample image just aren't the same size when I run this code:
Code: (Select All) Screen _NewImage(200, 200, 32)
_FullScreen _SquarePixels
rawtile& = _NewImage(32, 32, 32)
_Dest rawtile&
Line (0, 14)-(31, 17), _RGB32(100, 100, 100), BF
Line (14, 0)-(17, 31), _RGB32(100, 100, 100), BF
Line (0, 15)-(31, 16), _RGB32(255, 255, 255), BF
Line (15, 0)-(16, 31), _RGB32(255, 255, 255), BF
PSet (15, 15), _RGB32(250, 0, 0)
PSet (16, 16), _RGB32(250, 0, 0)
_Dest 0
_PutImage (51, 51), rawtile&
_PutImage (51, 100), rawtile&
_PutImage (101, 100), rawtile&
_PutImage (100, 51), rawtile&
Posts: 3,932
Threads: 175
Joined: Apr 2022
Reputation:
216
03-09-2023, 05:51 PM
(This post was last modified: 03-09-2023, 05:51 PM by bplus.)
_FullScreen will distort your image to the ratio of width by height of screen.
To reduce distortion try _NewImage setup to same ratio of width by height of your screen.
b = b + ...
Posts: 660
Threads: 142
Joined: Apr 2022
Reputation:
58
(03-09-2023, 05:51 PM)bplus Wrote: _FullScreen will distort your image to the ratio of width by height of screen.
To reduce distortion try _NewImage setup to same ratio of width by height of your screen.
Thanks. It just isn't stretching those pixels consistently. I can live with little rectangles as long as they are consistent.
Posts: 3,932
Threads: 175
Joined: Apr 2022
Reputation:
216
(03-09-2023, 05:58 PM)James D Jarvis Wrote: (03-09-2023, 05:51 PM)bplus Wrote: _FullScreen will distort your image to the ratio of width by height of screen.
To reduce distortion try _NewImage setup to same ratio of width by height of your screen.
Thanks. It just isn't stretching those pixels consistently. I can live with little rectangles as long as they are consistent.
Well I just tried my own advice, it might be a shade better but that upper right cross pixel still looks pretty bad on my system.
b = b + ...
Posts: 660
Threads: 142
Joined: Apr 2022
Reputation:
58
Something just seems out of whack somehow. If they all distorted equally, no big deal. If they all distorted based on where they fell in regard to the starting pixel it would makes enough sense, I just can't tell if that's happening.
Posts: 660
Threads: 142
Joined: Apr 2022
Reputation:
58
The cause for my pixel perfection is wanting to line up the pieces that make this if I rotate the pieces:
This image is a composited source image between a simple maze drawing algorithm and then a tile-based display (where each pixel is a tile on the final game screen. Everything lines up fine if I don't rotate anything but when I introduce rotation, even when restricted to 0,90,180, and 270 I can't then do pixel manipulation reliably (so far).
|