Zoom Hollywood display

Discuss GUI programming with the RapaGUI plugin here
Post Reply
User avatar
Clyde
Posts: 198
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Zoom Hollywood display

Post by Clyde » Mon Sep 16, 2019 10:41 pm

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:

Image

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 8 with Windows IDE

User avatar
airsoftsoftwair
Posts: 3208
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Zoom Hollywood display

Post by airsoftsoftwair » Wed Sep 18, 2019 10:14 pm

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.

User avatar
Clyde
Posts: 198
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Zoom Hollywood display

Post by Clyde » Thu Sep 19, 2019 9:24 am

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 8 with Windows IDE

User avatar
Clyde
Posts: 198
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Zoom Hollywood display

Post by Clyde » Fri Sep 20, 2019 2:30 pm

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 8 with Windows IDE

LarsB
Posts: 53
Joined: Sat May 06, 2017 4:37 pm

Re: Zoom Hollywood display

Post by LarsB » Fri Sep 20, 2019 5:01 pm

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.

p-OS
Posts: 112
Joined: Mon Nov 01, 2010 11:56 pm

Re: Zoom Hollywood display

Post by p-OS » Fri Sep 20, 2019 7:12 pm

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.

User avatar
Clyde
Posts: 198
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Zoom Hollywood display

Post by Clyde » Fri Sep 20, 2019 9:32 pm

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 8 with Windows IDE

Post Reply