Roassal3 question for the morphic pros to get majority of Roassal3 examples working properly. How to center a RSBalloonMorph in the world?

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

Roassal3 question for the morphic pros to get majority of Roassal3 examples working properly. How to center a RSBalloonMorph in the world?

Squeak - Dev mailing list
Hi Folks,

TL;DR;

How do I get a RSBalloonMorph to open up inside the extents of The World?  If we fix this, then the majority of Roassal3 examples are working examples.



For Roassal3

MCHttpRepository
user: ''
password: ''

 I have a class named RSExampleDoits  which has class side methods that allow easy access to the various examples a healthy majority of which are "semi-working".
For example:
rsBasicAnimationExamples

"working"

"semi working"
"the viewport for these is off-World on open."
RSBasicAnimationExamples new  example01Basic  open.
RSBasicAnimationExamples new example02Sequential   open.
RSBasicAnimationExamples new  example03Ramp  open.
RSBasicAnimationExamples new  example05LoopEvent  open.
RSBasicAnimationExamples new   example06Parallel open.


"not working"
RSBasicAnimationExamples new  example04DashAnimation  open.
RSBasicAnimationExamples new example07CornerRadius   open.
The basic problem is that the example shows up mostly off-screen in the World off to the right and must be pulled in by the mouse to see it.

the 'open' and 'createMorph' send are to RSCanvas

ProtoObject #()
      Object #()
            RSObject #()
                  RSObjectWithProperty #('announcer' 'properties')
                        RSCanvas #('shapes' 'fixedShapes' 'camera' 'animations' 'extent' 'color' 'morph' 'clearBackground' 'showRectangles' 'nodes' 'edges')
open
| window |
self createMorph.
window := morph openInWindow.
window extent: 500@500.
morph privateOwner: window.
^ window

createMorph
"Create a Morph that contains myself."
Smalltalk at: #AthensCanvas
ifPresent: [morph := RSAthensMorph new renderer: RSAthensRenderer new; yourself]
ifAbsent: [morph := RSBalloonMorph new renderer: RSBalloonRenderer new; yourself].     <<---THIS IS CALLED.

morph canvas: self.
^ morph







your insights are much appreciated.



Reply | Threaded
Open this post in threaded view
|

FIGURED IT OUT: was Re: Roassal3 question for the morphic pros to get majority of Roassal3 examples working properly. How to center a RSBalloonMorph in the world?

Squeak - Dev mailing list
Hi Folks,


I found the Morph >> position: aPoint method

and then I modified the RSCanvas >> open method to set position:10@10.

I also to the liberty to make the size 1000@1000  .

cheers,

t



---- On Tue, 27 Oct 2020 08:20:35 -0400 gettimothy <[hidden email]> wrote ----

Hi Folks,

TL;DR;

How do I get a RSBalloonMorph to open up inside the extents of The World?  If we fix this, then the majority of Roassal3 examples are working examples.



For Roassal3

MCHttpRepository
user: ''
password: ''

 I have a class named RSExampleDoits  which has class side methods that allow easy access to the various examples a healthy majority of which are "semi-working".
For example:
rsBasicAnimationExamples

"working"

"semi working"
"the viewport for these is off-World on open."
RSBasicAnimationExamples new  example01Basic  open.
RSBasicAnimationExamples new example02Sequential   open.
RSBasicAnimationExamples new  example03Ramp  open.
RSBasicAnimationExamples new  example05LoopEvent  open.
RSBasicAnimationExamples new   example06Parallel open.


"not working"
RSBasicAnimationExamples new  example04DashAnimation  open.
RSBasicAnimationExamples new example07CornerRadius   open.
The basic problem is that the example shows up mostly off-screen in the World off to the right and must be pulled in by the mouse to see it.

the 'open' and 'createMorph' send are to RSCanvas

ProtoObject #()
      Object #()
            RSObject #()
                  RSObjectWithProperty #('announcer' 'properties')
                        RSCanvas #('shapes' 'fixedShapes' 'camera' 'animations' 'extent' 'color' 'morph' 'clearBackground' 'showRectangles' 'nodes' 'edges')
open
| window |
self createMorph.
window := morph openInWindow.
window extent: 500@500.
morph privateOwner: window.
^ window

createMorph
"Create a Morph that contains myself."
Smalltalk at: #AthensCanvas
ifPresent: [morph := RSAthensMorph new renderer: RSAthensRenderer new; yourself]
ifAbsent: [morph := RSBalloonMorph new renderer: RSBalloonRenderer new; yourself].     <<---THIS IS CALLED.

morph canvas: self.
^ morph







your insights are much appreciated.





Reply | Threaded
Open this post in threaded view
|

Re: FIGURED IT OUT: was Re: Roassal3 question for the morphic pros to get majority of Roassal3 examples working properly. How to center a RSBalloonMorph in the world?

marcel.taeumel
Hi Timothy.

How do I get a RSBalloonMorph to open up inside the extents of The World?

morph bounds: (morph bounds translatedToBeWithin: self currentWorld bounds).
morph openInWorld.

Best,
Marcel

Am 27.10.2020 19:20:40 schrieb gettimothy via Squeak-dev <[hidden email]>:

Hi Folks,


I found the Morph >> position: aPoint method

and then I modified the RSCanvas >> open method to set position:10@10.

I also to the liberty to make the size 1000@1000  .

cheers,

t



---- On Tue, 27 Oct 2020 08:20:35 -0400 gettimothy <[hidden email]> wrote ----

Hi Folks,

TL;DR;

How do I get a RSBalloonMorph to open up inside the extents of The World?  If we fix this, then the majority of Roassal3 examples are working examples.



For Roassal3

MCHttpRepository
user: ''
password: ''

 I have a class named RSExampleDoits  which has class side methods that allow easy access to the various examples a healthy majority of which are "semi-working".
For example:
rsBasicAnimationExamples

"working"

"semi working"
"the viewport for these is off-World on open."
RSBasicAnimationExamples new  example01Basic  open.
RSBasicAnimationExamples new example02Sequential   open.
RSBasicAnimationExamples new  example03Ramp  open.
RSBasicAnimationExamples new  example05LoopEvent  open.
RSBasicAnimationExamples new   example06Parallel open.


"not working"
RSBasicAnimationExamples new  example04DashAnimation  open.
RSBasicAnimationExamples new example07CornerRadius   open.
The basic problem is that the example shows up mostly off-screen in the World off to the right and must be pulled in by the mouse to see it.

the 'open' and 'createMorph' send are to RSCanvas

ProtoObject #()
      Object #()
            RSObject #()
                  RSObjectWithProperty #('announcer' 'properties')
                        RSCanvas #('shapes' 'fixedShapes' 'camera' 'animations' 'extent' 'color' 'morph' 'clearBackground' 'showRectangles' 'nodes' 'edges')
open
| window |
self createMorph.
window := morph openInWindow.
window extent: 500@500.
morph privateOwner: window.
^ window

createMorph
"Create a Morph that contains myself."
Smalltalk at: #AthensCanvas
ifPresent: [morph := RSAthensMorph new renderer: RSAthensRenderer new; yourself]
ifAbsent: [morph := RSBalloonMorph new renderer: RSBalloonRenderer new; yourself].     <<---THIS IS CALLED.

morph canvas: self.
^ morph







your insights are much appreciated.