“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

Indeed. With bitmap being whatever is returned by al_get_target_bitmap. We only support aligned clipping rectangles, so using the transformations doesn't make sense (e.g. what if someone use a transformation to rotate by 45 degree).

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

"Setting up a screen to go from (0,0)-(1,1)" means that you'll create a transformation which maps input coordinates (like those you pass to al_draw_bitmap) ranging from (0,0)-(1,1) to what the target bitmap's dimensions are (e.g. (0,0)-(800,600)).

I was speaking of setting up a transformation on the back buffer such that a blit or primitive operation call to it would transformed. That would obviously affect your GUI's drawing operations.

Things like the mouse will always be reported in integer screen x,y positions, etc. Clipping is always done in actual bitmap coordinates as well. So for your usage, I don't see how supporting such transformations would be practical.

Ok, thank you guys. My gui uses clipping to limit widget output, and since mouse coordinates are integers, I will stick to integer coordinates in my gui. This means that if a game uses my gui and does transformations on the coordinate system, there is going to be a problem, but I don't see a good solution to this.

You could use the state API (al_store_state(), al_restore_state()) to store the user's transformation and use the identity transformation when rendering your GUI. This way your GUI will always render correctly and the user's coordinate system will be restored and ready for them to use when your done.

I'm thinking of functions that draw anything to a bitmap, but only through an alpha mask (or just a grayscale bitmap.)

As it is now, the effect can be done with offscreen renders and changing to alpha-only blending modes, but it seems like there would be a more proper low-level way to do it. OpenLayer had this feature, if I recall correctly.

It's a feature I'll surely advocate for more in the future, when I get around to it. That and primitive drawing with filtering to off-screen bitmaps. With those two you could then combine them to get the equivalent of a sub-pixel clipping region, or any clipping shape for that matter.

You could use the state API (al_store_state(), al_restore_state()) to store the user's transformation and use the identity transformation when rendering your GUI. This way your GUI will always render correctly and the user's coordinate system will be restored and ready for them to use when your done.