08-20-2025, 03:43 PM
Basically just this simple process:
Now note that this has a set of black lines which work as a divider to show our quadrants for us. This is not a glitch and is intentional on my part, just to highlight the flipping/mirroring which we do with _PUTIMAGE in each quadrant.
How'd I get it in there? And how would one remove it?
Correct my endpoints!! I'm using putimage from 0 to _WIDTH and from 0 to _HEIGHT, while the image uses coordinates from 0 to _WIDTH -1, 0 to _HEIGHT -1! I'm deliberately tossing a blank pixel that doesn't exist into my putimage statements here to create that blank line which you see in the center of the quadrants. I doubt you'd actually want that for yourself, so adjust those values by that offset.
For example a screen that is 640 x 480 pixels in size has coordinates from 0 to 639, 0 to 479 and NOT from 0 to 640 and 0 to 480. I'm not adjusting for that 0-offset here and I'm using it for an extra pixel to make those blank lines for highlight of each quadrant. You'll want to take that offset into account for seamless mirroring/flipping.
Unless I'm completely missing what you're trying to do here, somehow.
Code: (Select All)
Randomize Timer
DisplayScreen = _NewImage(1920, 1080, 32) 'make this whatever size you like
ImageScreen = _NewImage(Rnd * 320 + 320, Rnd * 240 + 240, 32) 'my image, which is by definition any size I want it to be -- that's why it's a random size here.
Screen DisplayScreen
_Dest ImageScreen
'Now, let's just draw some pattern on the imagescreen so we can flip/rotate it
For x = 0 To _Width(ImageScreen) Step _Width(ImageScreen) / 8
For y = 0 To _Height(ImageScreen) Step _Height(ImageScreen) / 6
Line (x, y)-Step(_Width(ImageScreen) / 8, _Height(ImageScreen) / 6), _RGB32(Rnd * 256, Rnd * 256, Rnd * 256), BF
Next
Next
_Dest DisplayScreen
'Now let's do our mirroring
'first the original
_PutImage (0, 0)-(_Width / 2, _Height / 2), ImageScreen, DisplayScreen, (0, 0)-(_Width(ImageScreen), _Height(ImageScreen))
'and a SLEEP so we can see it in all its glory
Sleep
'and then let's mirror it on the right and SLEEP to view it
_PutImage (_Width / 2, 0)-(_Width, _Height / 2), ImageScreen, DisplayScreen, (_Width(ImageScreen), 0)-(0, _Height(ImageScreen))
Sleep
'and then let's do the other two quadrants
_PutImage (0, _Height / 2)-(_Width / 2, _Height), ImageScreen, DisplayScreen, (0, _Height(ImageScreen))-(_Width(ImageScreen), 0)
Sleep
_PutImage (_Width / 2, _Height / 2)-(_Width, _Height), ImageScreen, DisplayScreen, (_Width(ImageScreen), _Height(ImageScreen))-(0, 0)
Sleep
Now note that this has a set of black lines which work as a divider to show our quadrants for us. This is not a glitch and is intentional on my part, just to highlight the flipping/mirroring which we do with _PUTIMAGE in each quadrant.
How'd I get it in there? And how would one remove it?
Correct my endpoints!! I'm using putimage from 0 to _WIDTH and from 0 to _HEIGHT, while the image uses coordinates from 0 to _WIDTH -1, 0 to _HEIGHT -1! I'm deliberately tossing a blank pixel that doesn't exist into my putimage statements here to create that blank line which you see in the center of the quadrants. I doubt you'd actually want that for yourself, so adjust those values by that offset.
For example a screen that is 640 x 480 pixels in size has coordinates from 0 to 639, 0 to 479 and NOT from 0 to 640 and 0 to 480. I'm not adjusting for that 0-offset here and I'm using it for an extra pixel to make those blank lines for highlight of each quadrant. You'll want to take that offset into account for seamless mirroring/flipping.
Unless I'm completely missing what you're trying to do here, somehow.


