moosetechnology / Moose

MOOSE - Platform for software and data analysis.
https://moosetechnology.github.io/moose-wiki
MIT License
136 stars 34 forks source link

ROCenteredLabel #839

Closed seandenigris closed 9 years ago

seandenigris commented 9 years ago

Originally reported on Google Code with ID 839

I required text to be centered within a circle, so I created ROCenteredLabel. I think
it would be generally useful. Would you consider adding it to Roassal? 

Reported by benjamin.t.coman on 2012-09-17 14:17:09


seandenigris commented 9 years ago
I just noticed the fileout didn't include the class definition.  Probably obvious but
for completeness...

ROLabel subclass: #ROCenteredLabel
    instanceVariableNames: ''
    classVariableNames: ''
    poolDictionaries: ''
    category: 'Roassal-Core'

Reported by benjamin.t.coman on 2012-09-17 14:20:43

seandenigris commented 9 years ago
whoops - remove redundant 'oldOffset' tempVar

Reported by benjamin.t.coman on 2012-09-17 14:28:18

seandenigris commented 9 years ago
Thanks Ben!
This is an excellent contribution!

I've improved the label implementation. ROLabel is now a subclass of ROAbstractLabel.
ROCenteredLabel is a subclass of ROAbstractLabel instead of ROLabel.
I also refactored the tests. The Mondrian builder offers #withCenteredText and #withCenteredText:
An example in Mondrian/Basic has been added.

-=-=-=-=-=-=-=-=-=-=-=-=
    view shape rectangle; withCenteredText;  width: 180.
    view node: 'centered text'.

    view shape rectangle; withText;  width: 180.
    view node: 'left text'.
-=-=-=-=-=-=-=-=-=-=-=-=

Excellent piece of work!

Reported by alexandre.bergel on 2012-09-20 15:13:05

seandenigris commented 9 years ago
In Roassal 1.125

Reported by alexandre.bergel on 2012-09-20 15:15:04

seandenigris commented 9 years ago

Reported by tudor@tudorgirba.com on 2013-03-03 13:03:28