[Pharo-project] isTransparent
If you want to have fun do Object new setHaltOnce redefine Object>>isTransparent self haltOnce. Beeper beep. ^ false I found a kind of fix by initializing correctly SimpleBorder (my fix is not totally convincing yet since it crashed the image). SimpleBorder is used in BorderedSubpaneDividerMorph Now what is amazing to me is the number of time isTransparent is invoked on Object when just typing text, I think that there is bogus there. If one UI expert can have a look this would be great. Stef
2008/11/21 Stéphane Ducasse <stephane.ducasse@inria.fr>:
If you want to have fun
do
Object new setHaltOnce
redefine
Object>>isTransparent self haltOnce. Beeper beep. ^ false
I found a kind of fix by initializing correctly SimpleBorder (my fix is not totally convincing yet since it crashed the image). SimpleBorder is used in BorderedSubpaneDividerMorph
Now what is amazing to me is the number of time isTransparent is invoked on Object when just typing text, I think that there is bogus there.
If one UI expert can have a look this would be great.
There are many senders of isTransparent . Much of uses showing a conceptually wrong usage of colors. Maybe its faster to write: fillStyle isTransparent ifTrue: [^ self ]. instead of: fillStyle fill: someArea. and then in #fill: it can check if no fill necessary. That's one of the moves which we discussed with Gary, that it is up to fill style to determine how to fill an area. It should play role a full object with own behavior , not just holder of static information like color & gradient. But currently, if you look at uses of colors and gradients - they used as value holders, and this is why all those #isTransparent #isTransulent, instead of simply dispatching into this object and let it decide how to fill / draw things and with what color.
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
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.
Hi Stef, Gwenael once posted this to the inbox: SLICE-Object-isTransparent-GwenaelCasaccio.2 Maybe that fixed the problem? He did not put a note in the bugtracker, though. And this means it got lost, I guess. Marcus On 21.11.2008, at 22:28, Stéphane Ducasse wrote:
If you want to have fun
do
Object new setHaltOnce
redefine
Object>>isTransparent self haltOnce. Beeper beep. ^ false
I found a kind of fix by initializing correctly SimpleBorder (my fix is not totally convincing yet since it crashed the image). SimpleBorder is used in BorderedSubpaneDividerMorph
Now what is amazing to me is the number of time isTransparent is invoked on Object when just typing text, I think that there is bogus there.
If one UI expert can have a look this would be great.
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Marcus Denker -- denker@iam.unibe.ch http://www.iam.unibe.ch/~denker
On Nov 22, 2008, at 10:03 AM, Marcus Denker wrote:
Hi Stef, Gwenael once posted this to the inbox: SLICE-Object-isTransparent-GwenaelCasaccio.2
Yes I asked him to send me the file. Now he told me that he used lasy initialisation which to some extent may solve the problem. Now creating the rioght color is ok but my feeling is that there are too much messages send. So putting a beeper beep is really good to see that something strange is happening. Stef
Maybe that fixed the problem? He did not put a note in the bugtracker, though. And this means it got lost, I guess.
Marcus
On 21.11.2008, at 22:28, Stéphane Ducasse wrote:
If you want to have fun
do
Object new setHaltOnce
redefine
Object>>isTransparent self haltOnce. Beeper beep. ^ false
I found a kind of fix by initializing correctly SimpleBorder (my fix is not totally convincing yet since it crashed the image). SimpleBorder is used in BorderedSubpaneDividerMorph
Now what is amazing to me is the number of time isTransparent is invoked on Object when just typing text, I think that there is bogus there.
If one UI expert can have a look this would be great.
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Marcus Denker -- denker@iam.unibe.ch http://www.iam.unibe.ch/~denker
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Igor Stasenko -
Marcus Denker -
Stéphane Ducasse