How makes scroll with a picture?

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

How makes scroll with a picture?

Post 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.

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

Re: How makes scroll with a picture?

Post by airsoftsoftwair »


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

Re: How makes scroll with a picture?

Post by Juan Carlos »

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

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

Re: How makes scroll with a picture?

Post 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.

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

Re: How makes scroll with a picture?

Post 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.

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

Re: How makes scroll with a picture?

Post 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.

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

Re: How makes scroll with a picture?

Post by airsoftsoftwair »

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

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

Re: How makes scroll with a picture?

Post 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.

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

Re: How makes scroll with a picture?

Post 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 :)

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

Re: How makes scroll with a picture?

Post 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.

Post Reply