This project is read-only.

Sprite Model

Sprite model of Vortex2D is different comparing to most of other 2D engines. Commonly "sprite" means some bounded image on screen with specified position, rotation, color etc. Important, in Vortex2D sprite is just a descriptor of image. It hasn't information about location or other attributes... It is just reference to some rectangular region on texture (image surface). Once created sprite can be drawn multiple times in different places, with different size, rotation processing, shader etc. Sprites are represented with Vortex.Drawing.Sprite class. It preserves original size of image region (in pixels) and uses as default size for drawing.

Since version 0.8 of Vortex2D sprites also has additional adjustable property - Origin. Origin is location relative to left-top point of source rectangle of sprite. It defines drawing/rotation point when drawing sprite. By default origin point is set as center (like in previous versions of Vortex).

Last edited Dec 20, 2010 at 7:09 PM by AlexKhomich, version 5


No comments yet.