MonoGame/MonoGame

SpriteBatch.Draw with transformation matrix

Open

#3,156 opened on 2014年11月5日

GitHub で見る
 (16 comments) (0 reactions) (0 assignees)C# (13,886 stars) (3,071 forks)batch import
DesignFeature RequestGood First IssueStale

説明

SpriteBatch currently relies on position, origin, rotation and scale (or destination rectangle, origin and rotation) when it comes to drawing. However, all of these can be stored in a matrix (already present in XNA/MonoGame). Would it not be easier to use a matrix internally and expose a SpriteBatch.Draw function that takes a transformation matrix?

This would be very useful for us, as we use transformation matrices inside our framework which has to be decomposed into individual translation, rotation and scale values on every single draw. We would do the actual implementation, but we are interested in the opinions of the fellow developers and whether this change would be merged or not.

コントリビューターガイド