Thanks Gary, Cheers, Alexandre
On 23 Feb 2009, at 12:36, Gary Chambers wrote: > The scroller itself provides the transform morph that deals with > offsetting > within the scrollpane. > Canvases are used in the drawing cycle of morphs so a morph of some > kind > (that implements drawOn: and draws the graphics) should be added to > the > scroller of the scrollpane. The transform morph sets the clipping > rectangle > for drawing its submorphs. > > |window pane m| > window := SystemWindow labelled: 'Mondrian Canvas'. > window model: self. > window extent: 640 @ 480. > pane := ScrollPane new. > m := PolygonMorph new > position: 2...@200; > extent: 4...@300. > pane scroller addMorph: m. > window > addMorph: pane > frame: (0 @ 0 corner: 1 @ 1). > window openInWorld. > > > Regards, Gary > > ----- Original Message ----- > From: "Igor Stasenko" <[email protected]> > To: <[email protected]> > Sent: Sunday, February 22, 2009 12:11 PM > Subject: Re: [Pharo-project] Question about Morphic > > >> 2009/2/22 Alexandre Bergel <[email protected]>: >>>> Canvas has the clipping capabilities. >>>> So, you can send a command to render a rectangle (-1000 @ -1000) >>>> corner: (10000 @10000) >>>> but depends on canvas clipping area, it will render only part of >>>> it. >>>> >>>> Also, for displaying morphs withing area with scrolling - use a >>>> TransformMorph to apply clipping & sroll in view. >>>> There are another morphs , ready for use , like ScrollPane >>> >>> I exactly use a ScrollBar. Here is a code excerpt: >>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>> | window pane | >>> window := SystemWindow labelled: 'Mondrian Canvas'. >>> window model: self. >>> window extent: 640 @ 480. >>> pane := ScrollPane new. >>> >>> canvas := MOCanvas on: self root. >>> pane scroller addMorph: canvas. >>> window >>> addMorph: pane >>> frame: (0 @ 0 corner: 1 @ 1). >>> window openInWorld. >>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>> >>> MOCanvas is a subclass of Morph that is resized on some point. >>> >>> Apparently, this incantation does not activate this clipping. >>> >> Well, i'm not sure how to use ScrollPane properly.. >> look for examples of it in other morphs. >> >>> Alexandre >>> >>>> >>>> >>>>> Cheers, >>>>> Alexandre >>>>> -- >>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>>> Alexandre Bergel http://www.bergel.eu >>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Pharo-project mailing list >>>>> [email protected] >>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- >>>>> project >>>>> >>>> >>>> >>>> >>>> -- >>>> Best regards, >>>> Igor Stasenko AKA sig. >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [email protected] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>> >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [email protected] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> >> >> -- >> Best regards, >> Igor Stasenko AKA sig. >> >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
