One more example to illustrate things:

drawOn: aCanvas
        "Put the painting on the display"

        color isTransparent ifFalse: [
                aCanvas fillRectangle: bounds color: color
        ].
        paintingForm ifNotNil: [
                aCanvas paintImage: paintingForm at: bounds origin].

could look like:

drawOn: aCanvas
        "Put the painting on the display"

       color fillRectangle: bounds on: aCanvas

        paintingForm ifNotNil: [
                aCanvas paintImage: paintingForm at: bounds origin].


See the difference? In latter case, a color could be any object, and
the way how it fills the requested area could be anything.
While in former case, it is assumed that color is instance of Color
and have some notion about transparency.

-- 
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to