Re: [AD] two things

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Isn't al_create_sub_bitmap() supposed to clip w and h parameters to parent's
> width/height? I know there have been some changes regarding that.
>
The change is that the clipping doesn't occur now until the drawing
operation. So a sub-bitmap originating at (-32,0) with dimensions of
(64,64) will be treated as a proper 64x64 bitmap. Any drawing that
would land outside of the parent will be clipped.

So you'll (usually) get different behavior than before, but it's more
intuitive this way and acts more like other off-screen drawing
operations. If you want to clip to the parent at time of creation
(previous behavior), you can always do that manually.

I left it with a couple of known issues:

* OpenGL and D3D work fine, except in the scenario when the source is
a sub-bitmap positioned off of the parent. In that case, the outside
pixels are stretched outwards to fill what should be a void.

* Memory sub-bitmaps (probably) don't work when the current
transformation is not the identity matrix and they originate
out-of-bounds. I didn't test or update that part.

--
Matthew Leverton




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/