Page 1 of 3

How makes scroll with a picture?

Posted: Sun Sep 30, 2018 8:23 pm
by Juan Carlos
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.

Re: How makes scroll with a picture?

Posted: Sun Sep 30, 2018 11:57 pm
by airsoftsoftwair

Re: How makes scroll with a picture?

Posted: Fri Oct 05, 2018 5:29 am
by Juan Carlos
I couldn't see that instruction makes scrolling the picture inside the window.

Re: How makes scroll with a picture?

Posted: Fri Oct 05, 2018 8:49 am
by Bugala
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.

Re: How makes scroll with a picture?

Posted: Fri Oct 05, 2018 11:24 am
by airsoftsoftwair
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.

Re: How makes scroll with a picture?

Posted: Mon Oct 08, 2018 11:51 am
by Juan Carlos
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.

Re: How makes scroll with a picture?

Posted: Tue Oct 09, 2018 11:42 pm
by airsoftsoftwair
Convert the page into a brush, then use DisplayBrushPart() as described.

Re: How makes scroll with a picture?

Posted: Wed Oct 10, 2018 2:30 am
by Juan Carlos
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.

Re: How makes scroll with a picture?

Posted: Wed Oct 10, 2018 6:02 pm
by jPV
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 :)

Re: How makes scroll with a picture?

Posted: Wed Oct 10, 2018 9:28 pm
by Juan Carlos
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.