[Pharo-project] merging images?

Gary Chambers gazzaguru2 at btinternet.com
Fri Jun 10 09:24:05 EDT 2011


Many ways...
If you're not concerned with all being in one form you
could use a CompositeFillStyle made up of ImageFillStyles for each layer.

(Morph new
 fillStyle: (CompositeFillStyle fillStyles: {
  ImageFillStyle form: UITheme current infoIcon.
  (ImageFillStyle form: UITheme current smallWarningIcon)
   origin: 32 @ 32}))
 extent: 48 at 48;
 openInHand

Otherwise

|form|
form := UITheme current infoIcon deepCopy.
form getCanvas
 translucentImage: UITheme current smallWarningIcon at: 32 @ 32.
Display getCanvas
 translucentImage: form at: 50 at 40


Regards, Gary

----- Original Message ----- 
From: "Esteban Lorenzano" <estebanlm at gmail.com>
To: "Pharo Development" <pharo-project at lists.gforge.inria.fr>
Sent: Friday, June 10, 2011 1:41 PM
Subject: [Pharo-project] merging images?


Hi,
I wonder if there is a way to merge two Form objects into a new one?
I'm trying to add "status" to some icons, something like "filter active" an 
icon with a mark, "filter inactive", another mark.
Of course, I can create two different icons, but I thought "it would be nice 
to have this as a general functionality" :)

Cheers,
Esteban 





More information about the Pharo-dev mailing list