How makes scroll with a picture?
- Juan Carlos
- Posts: 887
- Joined: Mon Sep 06, 2010 1:02 pm
How makes scroll with a picture?
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.
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
- Juan Carlos
- Posts: 887
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How makes scroll with a picture?
I couldn't see that instruction makes scrolling the picture inside the window.
Re: How makes scroll with a picture?
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.
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.
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How makes scroll with a picture?
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.
- Juan Carlos
- Posts: 887
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How makes scroll with a picture?
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.
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How makes scroll with a picture?
Convert the page into a brush, then use DisplayBrushPart() as described.
- Juan Carlos
- Posts: 887
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How makes scroll with a picture?
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.
I'll try to use the DisplayBrushPart with keys because with mouse is impossible.
Re: How makes scroll with a picture?
Nothing is impossibleJuan Carlos wrote: ↑Wed Oct 10, 2018 2:30 am I'll try to use the DisplayBrushPart with keys because with mouse is impossible.
- Juan Carlos
- Posts: 887
- Joined: Mon Sep 06, 2010 1:02 pm
Re: How makes scroll with a picture?
If you have much free time and books with many good examples all is possible, in my case no.jPV wrote: ↑Wed Oct 10, 2018 6:02 pmNothing is impossibleJuan Carlos wrote: ↑Wed Oct 10, 2018 2:30 am I'll try to use the DisplayBrushPart with keys because with mouse is impossible.