how many rows in a locked region
William Labbett

Hi,

I've not been programming using allegro for a while. I've forgotten a lot but I'm getting on alright except I've got question I didn't have before.

When using an ALLEGRO_LOCKED_REGION I know that the pitch isn't necessarily the
same length as the bitmap due to padding and orientation of bitmap. This has made me wonder whether the ALLEGRO_LOCKED_REGION has the same number of rows
(height) as the ALLEGRO_BITMAP. Is it safe to assume that when running through
the pixels of a locked region

for(y = 0; y < al_get_bitmap_height(bitmap); ++y)
{
   for(x = 0; x < locked_version_of_bitmap->pitch; ++x)
   {
      


   }
}

will work?

Edgar Reynaldo
William Labbett

Thanks Edgar.

Thread #618456. Printed from Allegro.cc