Texture origin

How to set origin at DrawTextureEx ? The fact is that we need to scale and that there is a center.


  • You should use DrawTexturePro(). It let's you specify the origin. Destination rectangle defines the scale.

    DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint);
  • Thanks. I needed to zoom out the picture.But I did not, because Rectangle the type of int.
Sign In or Register to comment.