In my RapaGUI application I want to be able to zoom an included Hollywood display. It should work similar to painting programms like paint.net:
So the main app window should stay the same size, but the inner Hollywood display should be zoomed, so I get scrollbars and can move the view from left to right and top to down and vice versa.
But I have no idea how to do it. I would appreciate some directions. Thanks a lot!
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
It's not exactly easy to do but it is possible. You need to implement all zooming functionality manually and then draw the graphics on a Scrollcanvas widget. Take a look at the Scrollcanvas example that comes with RapaGUI.
Great, thanks for the hint. I will look at the example tonight.
As I cannot have a look at the example right now and what you do there: In order to zoom the actual Hollywood display I would use "ChangeDisplaySize()", wouldn't I?
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
Ok, I had a look at the example. Wow, first I did not understand what happened there. Now I think I know what the deal is. I will think about it and tinker around with it.
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
The scrolling itself causes me some headaches. But when it comes to zooming I found that is alsways good to have the original graphics stored and work with a copy of it. Because when you doing some back and forward zooming, the graphics tend to degenerate. So I am having varibles for the zoom factor, copy always the original graphic to its pendant and applying the zoom factor from the variable.
That of course consumes performance. But less than I thought and its a cando. I dont know if it milders your pain. But in the original Holylwood examples inside IDE there is a Lens example which coudl maybe utilize you with some ideas.
Scrolling should not be a Problem. wehne zooming, just Change Displaysize, but not size in MUI/RapaGui Hollywood.class. And put a ScrollGroup around it.
Thanks a lot for your thoughts, LarsB and p-OS. I thought the same way that p-OS mentioned. I think I will try this first. But Lars' workaround and ideas are very nice and appreicated! I will try that way, too, if the first version does not work.
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc