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
