Menu

#61 Graphics window [r897]

Unstable_(example)
open
None
5
2017-09-25
2017-09-25
No

Hi Jim,

This is a new update. A nice one, I think.


GraphSize behaviour

GraphSize is not CLG. This is why GraphSize always preserve content if the size is the same as old one.
The behavior is now improved and consistent. If the new size is different, the graph size will be modified, but the content will be preserved.
If the new size is smaller, the image will be chopped.
If the new size is bigger, in areas beyond the old size, pixels will be set to 0 (full transparent).


GraphSize - new parameter: scale

GraphSize( width, height)
GraphSize( width, height, scale)

I still remember the time when ZX Spectrum Basic allow a 256 × 192 resolution. But what great games (remember also the limitation: on a 8x8 square there cannot be more than 2 colors)!
https://www.youtube.com/watch?v=JCLMk5sQb3A
To create a simple old game, user need to be able to scale the graphics.
To do this I added the scale parameter to the GraphSize. 1.0 means original size (no scaling), 0,5 is half, 2 is double, and so. You can try also a negative value. In this case, the whole graphics are flipped (the mouse is also flipped to match the graphics).


Graphics window: resize

Because of the nature of graphics window, it can be placed sometimes outside of the screen, without the possibility to drag it back (eg. make graphsize(bigsize)... drag window in left side till it almost exit from view, then graphsize(smallsize)
When graphics window is resized, it will be displayed inside the visible screen range (excluding taskbar). If graphics window is on other screen (other than primary one) then the graphics window should be displayed in visible area on that screen, not on primary screen.


Graphics window: zoom

When user use a high screen resolusion, graphics becomes too small.
Also, when user have a small resolusion, it is necessarly to make graphics window to shrink.
To do this I added a zoom feature to the view menu. It is a setting, so it will be saved as a preference.
Try it!


Both the scaling option of the graphical window and the zoom option do not consume additional memory.

Respectfully,
Florin Oprea

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.