How makes scroll with a picture?

Find quick help here to get you started with Hollywood
User avatar
Juan Carlos
Posts: 452
Joined: Mon Sep 06, 2010 1:02 pm
Location: Palencia
Contact:

How makes scroll with a picture?

Post by Juan Carlos » Sun Sep 30, 2018 8:23 pm

I have this doubt How makes scroll with a picture inside of litle window but no using the RapaGUI neither MUIRoyale, only with standard Hollywood commands, to move in a little window but with a big picture for example as a picture viewer.

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

Re: How makes scroll with a picture?

Post by airsoftsoftwair » Sun Sep 30, 2018 11:57 pm


User avatar
Juan Carlos
Posts: 452
Joined: Mon Sep 06, 2010 1:02 pm
Location: Palencia
Contact:

Re: How makes scroll with a picture?

Post by Juan Carlos » Fri Oct 05, 2018 5:29 am

I couldn't see that instruction makes scrolling the picture inside the window.

Bugala
Posts: 694
Joined: Sun Feb 14, 2010 7:11 pm

Re: How makes scroll with a picture?

Post by Bugala » Fri Oct 05, 2018 8:49 am

I think he means following idea.

Lets say you have a Brush like this, represented by alphabets:

abcdefgh
abcdefgh

suppose your screen size is only 3x2 letters.

hence, you could display for example only:

abc
abc

now when you move toward right, by using display brushpart, you could now display different part of this picture, resulting:

bcd
bcd

going even more to right, you could displaybrushpart:

cde
cde

by otherwords, it would look like srcolling towards right, although in reality you are just showing different parts of a very big brush.

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

Re: How makes scroll with a picture?

Post by airsoftsoftwair » Fri Oct 05, 2018 11:24 am

Like Bugala said, you just have to figure out which part of the picture is visible and then display that part using DisplayBrushPart(). That's how scrolling works. For some examples, take a look at the "SmoothScroll" example (part of GL Galore and RebelSDL) and the "BeastScroll" example (part of RebelSDL). It's really not difficult.

User avatar
Juan Carlos
Posts: 452
Joined: Mon Sep 06, 2010 1:02 pm
Location: Palencia
Contact:

Re: How makes scroll with a picture?

Post by Juan Carlos » Mon Oct 08, 2018 11:51 am

I need a easy example because I'm workinkg in a portable and easy PDF Viewer from your example and the problem is with the zoom in the page to move for the Brush 2 and you can see all page to maxime zoom.

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

Re: How makes scroll with a picture?

Post by airsoftsoftwair » Tue Oct 09, 2018 11:42 pm

Convert the page into a brush, then use DisplayBrushPart() as described.

User avatar
Juan Carlos
Posts: 452
Joined: Mon Sep 06, 2010 1:02 pm
Location: Palencia
Contact:

Re: How makes scroll with a picture?

Post by Juan Carlos » Wed Oct 10, 2018 2:30 am

I have saw the instructon pdf.OpenDocument doesn't distinguish if it has password protection or if the pdf is bad, I tryed to give the code with a string request but in the password tag doesn't knows it, but open the pdf with the password embebed it works, it strange be.
I'll try to use the DisplayBrushPart with keys because with mouse is impossible.

User avatar
jPV
Posts: 193
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: How makes scroll with a picture?

Post by jPV » Wed Oct 10, 2018 6:02 pm

Juan Carlos wrote:
Wed Oct 10, 2018 2:30 am
I'll try to use the DisplayBrushPart with keys because with mouse is impossible.
Nothing is impossible :)

User avatar
Juan Carlos
Posts: 452
Joined: Mon Sep 06, 2010 1:02 pm
Location: Palencia
Contact:

Re: How makes scroll with a picture?

Post by Juan Carlos » Wed Oct 10, 2018 9:28 pm

jPV wrote:
Wed Oct 10, 2018 6:02 pm
Juan Carlos wrote:
Wed Oct 10, 2018 2:30 am
I'll try to use the DisplayBrushPart with keys because with mouse is impossible.
Nothing is impossible :)
If you have much free time and books with many good examples all is possible, in my case no.

Post Reply