[squeak-dev] squeak.org - an update
Bert Freudenberg
bert at freudenbergs.de
Tue Mar 12 12:48:12 UTC 2013
On 2013-03-12, at 12:20, Bert Freudenberg <bert at freudenbergs.de> wrote:
> mask := PNGReadWriter formFromFileNamed: 'mask.png'.
> image := Display copy: mask boundingBox.
> mask displayOn: image at: 0 at 0 rule: Form blend.
> image asMorph openInHand.
Hehe, this is fun. A couple more lines and you have a real fuzzy screenshot tool:
mask := PNGReadWriter formFromFileNamed: 'mask.png'.
image := Form fromUser.
scaledMask := Form extent: image extent depth: 32.
mask displayScaledOn: scaledMask.
scaledMask displayOn: image at: 0 at 0 rule: Form blend.
fileName := FileDirectory default nextNameFor: 'screenshot' extension: 'png'.
image asMorph name: fileName; openCenteredInWorld.
Cursor write showWhile: [PNGReadWriter putForm: image onFileNamed: fileName].
- Bert -
More information about the Squeak-dev
mailing list
|