This occurred to me as a useful addition, and I haven't seen it in the tracker. Basically specifying a sub-rectangle of the sprite to be drawn, rather than having to draw the whole thing.
At the moment, this can be done with:
[code]
//not quite true code ahead
DynamicSprite.CreateFromExistingSprite
DynamicSprite.Crop
RawDrawImage
[/code]
but this can get a little tedious if it is something done very often, or with several different parts of the original sprite.
On top of that, if RawDrawImage is just a wrapper for Allegro's blit function then this should be pretty easy to implement, and will run quite a bit faster than the above code.
At the moment, this can be done with:
[code]
//not quite true code ahead
DynamicSprite.CreateFromExistingSprite
DynamicSprite.Crop
RawDrawImage
[/code]
but this can get a little tedious if it is something done very often, or with several different parts of the original sprite.
On top of that, if RawDrawImage is just a wrapper for Allegro's blit function then this should be pretty easy to implement, and will run quite a bit faster than the above code.

Logged