Roassal and custom morphs

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

Roassal and custom morphs

kilon.alios
Am I correct to assume that I can easily embed Roassal visualizations inside morphs ? Also where is the official documentation ? is this still it ?

http://agilevisualization.com/#book
Reply | Threaded
Open this post in threaded view
|

Re: Roassal and custom morphs

Peter Uhnak


On Tue, Nov 10, 2015 at 9:56 PM, Dimitris Chloupis <[hidden email]> wrote:
Am I correct to assume that I can easily embed Roassal visualizations inside morphs ? Also where is the official documentation ? is this still it ?

http://agilevisualization.com/#book

Yes.

Roassal itself is embedded inside a TRMorph, which is a ...morph. :)

For example:

[[[
|container button view es e|

view := RTView new.
container := BorderedMorph new.
(button := PluggableButtonMorph new)
label: 'I am a morph';
actionBlock: [ (view elements, view edges) do: [ :each | each color: Color random. each signalUpdate ] ].

es := RTBox new color: Color black; size: 50; elementsOn: #(1 2).
e := RTLine new color: Color black; edgeFrom: es first to: es second.
view addAll: es; add: e.
es second translateBy: 100 @ 200.

container addMorph: view canvas buildMorph.
container addMorph: button.

container openInWindow.
]]]

Peter

Reply | Threaded
Open this post in threaded view
|

Re: Roassal and custom morphs

abergel
Excellent example :-)

Alexandre


> On Nov 10, 2015, at 6:25 PM, Peter Uhnák <[hidden email]> wrote:
>
>
>
> On Tue, Nov 10, 2015 at 9:56 PM, Dimitris Chloupis <[hidden email]> wrote:
> Am I correct to assume that I can easily embed Roassal visualizations inside morphs ? Also where is the official documentation ? is this still it ?
>
> http://agilevisualization.com/#book
>
> Yes.
>
> Roassal itself is embedded inside a TRMorph, which is a ...morph. :)
>
> For example:
>
> [[[
> |container button view es e|
>
> view := RTView new.
> container := BorderedMorph new.
> (button := PluggableButtonMorph new)
> label: 'I am a morph';
> actionBlock: [ (view elements, view edges) do: [ :each | each color: Color random. each signalUpdate ] ].
>
> es := RTBox new color: Color black; size: 50; elementsOn: #(1 2).
> e := RTLine new color: Color black; edgeFrom: es first to: es second.
> view addAll: es; add: e.
> es second translateBy: 100 @ 200.
>
> container addMorph: view canvas buildMorph.
> container addMorph: button.
>
> container openInWindow.
> ]]]
>
> Peter
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: Roassal and custom morphs

kilon.alios
Yeap this is perfect . I even tried it with a simple transparent Morph openInWorld and it draws Roassal elements in transparent background , exactly as I wanted because I play a lot with transparency with my custom GUIs. I also like the elegance of the Roassal API very much, looks like I will be using it for adding some extra dynamic graphics to my custom guis so I dont rely completely on static images. Thank you both :)

On Wed, Nov 11, 2015 at 1:41 AM Alexandre Bergel <[hidden email]> wrote:
Excellent example :-)

Alexandre


> On Nov 10, 2015, at 6:25 PM, Peter Uhnák <[hidden email]> wrote:
>
>
>
> On Tue, Nov 10, 2015 at 9:56 PM, Dimitris Chloupis <[hidden email]> wrote:
> Am I correct to assume that I can easily embed Roassal visualizations inside morphs ? Also where is the official documentation ? is this still it ?
>
> http://agilevisualization.com/#book
>
> Yes.
>
> Roassal itself is embedded inside a TRMorph, which is a ...morph. :)
>
> For example:
>
> [[[
> |container button view es e|
>
> view := RTView new.
> container := BorderedMorph new.
> (button := PluggableButtonMorph new)
>       label: 'I am a morph';
>       actionBlock: [ (view elements, view edges) do: [ :each | each color: Color random. each signalUpdate ] ].
>
> es := RTBox new color: Color black; size: 50; elementsOn: #(1 2).
> e := RTLine new color: Color black; edgeFrom: es first to: es second.
> view addAll: es; add: e.
> es second translateBy: 100 @ 200.
>
> container addMorph: view canvas buildMorph.
> container addMorph: button.
>
> container openInWindow.
> ]]]
>
> Peter
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: Roassal and custom morphs

abergel
Thanks Dimitris for your nice words

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Nov 11, 2015, at 4:10 AM, Dimitris Chloupis <[hidden email]> wrote:

Yeap this is perfect . I even tried it with a simple transparent Morph openInWorld and it draws Roassal elements in transparent background , exactly as I wanted because I play a lot with transparency with my custom GUIs. I also like the elegance of the Roassal API very much, looks like I will be using it for adding some extra dynamic graphics to my custom guis so I dont rely completely on static images. Thank you both :)

On Wed, Nov 11, 2015 at 1:41 AM Alexandre Bergel <[hidden email]> wrote:
Excellent example :-)

Alexandre


> On Nov 10, 2015, at 6:25 PM, Peter Uhnák <[hidden email]> wrote:
>
>
>
> On Tue, Nov 10, 2015 at 9:56 PM, Dimitris Chloupis <[hidden email]> wrote:
> Am I correct to assume that I can easily embed Roassal visualizations inside morphs ? Also where is the official documentation ? is this still it ?
>
> http://agilevisualization.com/#book
>
> Yes.
>
> Roassal itself is embedded inside a TRMorph, which is a ...morph. :)
>
> For example:
>
> [[[
> |container button view es e|
>
> view := RTView new.
> container := BorderedMorph new.
> (button := PluggableButtonMorph new)
>       label: 'I am a morph';
>       actionBlock: [ (view elements, view edges) do: [ :each | each color: Color random. each signalUpdate ] ].
>
> es := RTBox new color: Color black; size: 50; elementsOn: #(1 2).
> e := RTLine new color: Color black; edgeFrom: es first to: es second.
> view addAll: es; add: e.
> es second translateBy: 100 @ 200.
>
> container addMorph: view canvas buildMorph.
> container addMorph: button.
>
> container openInWindow.
> ]]]
>
> Peter
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.