[Cuis] Cuis RectangleLikeMorph (was Re: More...morphic)

Juan Vuletich juan at jvuletich.org
Sat Apr 26 14:01:09 CDT 2014


Hi Hannes,

On 4/26/2014 7:13 AM, H. Hirzel wrote:
> Kent or Juan
>
> Could you please give a bit more details how a Cuis RectangleLikeMorph
> differs from a Squeak Rectangle?

In Cuis:

Object subclass: #Rectangle
"I represent a rectangular area of the screen. Arithmetic functions take 
points as arguments and carry out scaling and translating operations to 
create new instances of me. Rectangle functions create new instances by 
determining intersections of rectangles with rectangles.

Note 1: only rectangles parallel to reference frame (Screen) can be 
represented by this class.
...
"

and

Morph subclass: #RectangleLikeMorph
"Hierarchy for morphs that are rectangle like. Including rectangles with 
rounded corners and such. The idea is that the 'extent' ivar is all 
that's needed to establish our dimensions and shape. Subclasses can add 
things like 'roundedCornerRadious' or such."

So, Cuis Rectangle is very much like Squeak Rectangle. And Cuis 
RectangleLikeMorph is not too unlike Squeak RectangleMorph.

Cheers,
Juan Vuletich




More information about the Cuis mailing list