Morphic component to display images/pictures

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Morphic component to display images/pictures

Peter Uhnak
Hi,

do we have a Morphic/Brick/whatever component for displaying pictures/images in Pharo?

The "best" I found was GTInspector extension on PNG files, which provides scrollbars, however I would like to also have:

1) zooming with mousewheel (now it scrolls vertically)
2) dragging the image around to scroll both vertically and horizontally (now I have to use manually the scrollbars)
3) ideally also buttons like "show 1:1 size", "show fit to window"

Do we have something like that?

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: Morphic component to display images/pictures

Stephan Eggermont-3
On 30/03/17 13:24, Peter Uhnak wrote:
> do we have a Morphic/Brick/whatever component for displaying pictures/images in Pharo?

You can combine something with ImageMorph, ImagePreviewMorph, Form and
TransformMorph. I don't know about mousewheel support, I vaguely
remember something about mousewheel events being tranformed, and
forgot if that was vm- or image-side.

> 1) zooming with mousewheel (now it scrolls vertically)
> 2) dragging the image around to scroll both vertically and horizontally (now I have to use manually the scrollbars)
> 3) ideally also buttons like "show 1:1 size", "show fit to window"



Reply | Threaded
Open this post in threaded view
|

Re: Morphic component to display images/pictures

Stephane Ducasse-3
have a look at the solution of the challenge 2 or 3 in the mooc :)



On Thu, Mar 30, 2017 at 3:37 PM, Stephan Eggermont <[hidden email]> wrote:
On 30/03/17 13:24, Peter Uhnak wrote:
do we have a Morphic/Brick/whatever component for displaying pictures/images in Pharo?

You can combine something with ImageMorph, ImagePreviewMorph, Form and TransformMorph. I don't know about mousewheel support, I vaguely remember something about mousewheel events being tranformed, and
forgot if that was vm- or image-side.


1) zooming with mousewheel (now it scrolls vertically)
2) dragging the image around to scroll both vertically and horizontally (now I have to use manually the scrollbars)
3) ideally also buttons like "show 1:1 size", "show fit to window"




Reply | Threaded
Open this post in threaded view
|

Re: Morphic component to display images/pictures

HilaireFernandes
Just by curiosity: can it be done with Spec ?

Hilaire

Le 31/03/2017 à 08:16, Stephane Ducasse a écrit :
> have a look at the solution of the challenge 2 or 3 in the mooc :)
>

--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Morphic component to display images/pictures

Peter Uhnak
The mooc challenge (no #4) doesn't really address any of the things I am interested in (the result is the same as what inspector can currently do).

Spec has ImageModel, but that doesn't even have scrollbars...

anyway... I am currently refactoring Spec interpreter and after that I would like to improve some things... so maybe I could improve the ImageModel, since we don't have what I want...

Peter


On Sat, Apr 01, 2017 at 09:58:26AM +0200, Hilaire wrote:

> Just by curiosity: can it be done with Spec ?
>
> Hilaire
>
> Le 31/03/2017 à 08:16, Stephane Ducasse a écrit :
> > have a look at the solution of the challenge 2 or 3 in the mooc :)
> >
>
> --
> Dr. Geo
> http://drgeo.eu
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Morphic component to display images/pictures

Stephane Ducasse-3
Cool (for the interpreter refactoring). Let us know when you have something. 
I thought that you wanted to display an image. 


On Sat, Apr 1, 2017 at 11:44 AM, Peter Uhnak <[hidden email]> wrote:
The mooc challenge (no #4) doesn't really address any of the things I am interested in (the result is the same as what inspector can currently do).

Spec has ImageModel, but that doesn't even have scrollbars...

anyway... I am currently refactoring Spec interpreter and after that I would like to improve some things... so maybe I could improve the ImageModel, since we don't have what I want...

Peter


On Sat, Apr 01, 2017 at 09:58:26AM +0200, Hilaire wrote:
> Just by curiosity: can it be done with Spec ?
>
> Hilaire
>
> Le 31/03/2017 à 08:16, Stephane Ducasse a écrit :
> > have a look at the solution of the challenge 2 or 3 in the mooc :)
> >
>
> --
> Dr. Geo
> http://drgeo.eu
>
>