Bad use of BitmapFillStyle and
FormCanvas>>fillRectangle:fillStyle:?
Boris Gaertner
Boris.Gaertner at gmx.net
Thu Apr 22 08:15:57 UTC 2004
Good morning, Ken
Can you please try this:
| fs bc |
fs := BitmapFillStyle fromForm: (Form fromBMPFileNamed:
'pic001.bmp').
fs origin: (0 at 0).
" optionally, you may add:
fs direction: 80 at 80.
fs normal: 80 at -80.
--- end of optional addition ----- "
bc := FormCanvas on: Display.
bc fillRectangle: (20 at 20 extent: 200 @ 200)
fillStyle: fs
It works for me on a Squeak #5878 on windows 98, but
as soon as I drop the fs origin: (0 at 0).
I get the failure that you describe. The origin *is*
needed, whereas direction and normal are optional.
I looked at your fix from Jan 27, and I think it is really
related to that problem. I will look at it more carefully
right now and review it.
Greetings, Boris
----- Original Message -----
From: <ken at kencausey.com>
> I'm getting a primitive failure as shown below on attempting to
> FormCanvas>>fillRectangle:fillStyle: with a BitmapFillStyle filled from
> a BMP file with 32x32x32 data. Created via
>
> BitmapFillStyle fromForm: (Form fromBMPFileNamed:
> 'data/textures/32x32/graynoisefloor.bmp')
>
> Can anyone explain what I'm doing wrong? I would be happy to send
> someone the BMP if it helps.
More information about the Squeak-dev
mailing list
|