Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetHighsAndLowsOf() [1/2]

static void Terraria.Graphics.SpriteRenderTargetHelper.GetHighsAndLowsOf ( ref Vector2 lowest,
ref Vector2 highest,
ref DrawData cdd )
inlinestatic

Definition at line 30 of file SpriteRenderTargetHelper.cs.

31 {
32 Vector2 origin = cdd.origin;
33 Rectangle rectangle = cdd.destinationRectangle;
34 if (cdd.sourceRect.HasValue)
35 {
36 rectangle = cdd.sourceRect.Value;
37 }
38 if (!cdd.sourceRect.HasValue)
39 {
40 rectangle = cdd.texture.Frame();
41 }
42 rectangle.X = 0;
43 rectangle.Y = 0;
44 Vector2 pos = cdd.position;
45 GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref pos, ref origin, new Vector2(0f, 0f));
46 GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref pos, ref origin, new Vector2(rectangle.Width, 0f));
47 GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref pos, ref origin, new Vector2(0f, rectangle.Height));
48 GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref pos, ref origin, new Vector2(rectangle.Width, rectangle.Height));
49 }
static void GetHighsAndLowsOf(ref Vector2 lowest, ref Vector2 highest, ref DrawData cdd)

References Terraria.Graphics.SpriteRenderTargetHelper.GetHighsAndLowsOf().

Referenced by Terraria.Graphics.SpriteRenderTargetHelper.GetDrawBoundary(), and Terraria.Graphics.SpriteRenderTargetHelper.GetHighsAndLowsOf().