I mean, yes, thank you, that answers the specific thing I was doing. However, I kind of want to understand what’s available in case this comes up again… Eh, maybe giving the internal files a second look at a time that isn’t 3 AM will work.
…Yeah sleep helps.
So, to recap, if I understand correctly, only this extremely generic version of Draw with an absurd amount of optional parameters is being deprecated because optimization suffered otherwise:
public void Draw(Texture2D texture, Vector2? position = default(Vector2?), Rectangle? destinationRectangle = default(Rectangle?), Rectangle? sourceRectangle = default(Rectangle?), Vector2? origin = default(Vector2?), float rotation = 0, Vector2? scale = default(Vector2?), Color? color = default(Color?), SpriteEffects effects = SpriteEffects.None, float layerDepth = 0);
The available overloads NOW are (, grouping similar ones with each other) (also, gross, Discourse just eats spaces at random even in preformatted text):
public void Draw(Texture2D texture, Rectangle destinationRectangle, Color color); public void Draw(Texture2D texture, Vector2 position , Color color);
public void Draw(Texture2D texture, Vector2 position , Rectangle? sourceRectangle, Color color); public void Draw(Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRectangle, Color color);
public void Draw(Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth); public void Draw(Texture2D texture, Vector2 position , Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth); public void Draw(Texture2D texture, Vector2 position , Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, float scale , SpriteEffects effects, float layerDepth);
With no arbitrary intermediate ones. Any “extra” parameters should therefore be manually filled with defaults like Color.White
, SpriteEffects.None
, etc.
Thanks for your help, and I hope this helps anyone who was as confused as I was about this.