SUGGESTION: RawDrawImageCropped

Started by HeirOfNorton, Tue 27/06/2006 03:51:31

Previous topic - Next topic

HeirOfNorton

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: ags

//not quite true code ahead
DynamicSprite.CreateFromExistingSprite
DynamicSprite.Crop
RawDrawImage


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.

HoN

Kweepa

I second that emotion.
Thanks for pointing out DynamicSprite.Crop(). I missed that. Should come in handy...
Still waiting for Purity of the Surf II

Gilbert

#2
I second that also, it would save a lot of work by not needing to make a dynamite sprite everytime.

Trackered.

Pumaman


SMF spam blocked by CleanTalk