Hi -
[Apologies for being off-topic on vm-dev; I've set the reply-to to
squeak-dev]
On 4/21/2011 15:44, Igor Stasenko wrote:
>
> I tried various paint rules
> 24, 34
>
> nothing. A balloon engine seems like completely ignores an alpha channel,
> so i could use it for filling shapes using bitmaps as long as these
> bitmaps fully opaque.
>
> I thought i could use a generic way to render bitmaps, instead of
> using awkward warpBlt...
> but it seems like something in plugin discards/ignores an alpha
> channel of source bitmap.
> I would be happy if this is not true.
It isn't true. Here is an example for transparent bitmap rendering with
the Balloon engine:
"First we create a bitmap with a transparent pattern"
f := Form extent: 100@100 depth: 32.
f getCanvas asBalloonCanvas
fillRectangle: f boundingBox
fillStyle:
((GradientFillStyle colors: {Color transparent. Color white})
origin: 0@0; direction: 0@100).
"Now we're displaying it"
(Display getCanvas asBalloonCanvas)
transformBy: ((MatrixTransform2x3 withAngle: 45));
fillRectangle: (400@0 extent: 400@400)
fillStyle: (BitmapFillStyle fromForm: f)
I'm not sure what you've been playing with but generally speaking you'll
be better off with BalloonCanvas instead of trying to manipulate the
Balloon engine directly.
Cheers,
- Andreas