From 9761f796ca436fab9926eb454c8b01461e4423a7 Mon Sep 17 00:00:00 2001 From: Evan Lawrence Date: Thu, 17 Mar 2022 00:39:33 -0700 Subject: [PATCH] minor changes --- PrismOS/Libraries/Graphics/Canvas.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/PrismOS/Libraries/Graphics/Canvas.cs b/PrismOS/Libraries/Graphics/Canvas.cs index 6ba07a64..954df7cc 100644 --- a/PrismOS/Libraries/Graphics/Canvas.cs +++ b/PrismOS/Libraries/Graphics/Canvas.cs @@ -146,20 +146,14 @@ public void DrawCircle(int X, int Y, int Radius, Color Color, int StartAngle = 0 } } - public void DrawFilledCircle(int X, int Y, int Radius, Color Color, int StartAngle = 0, int EndAngle = 360, bool Clamp = true) + public void DrawFilledCircle(int X, int Y, int Radius, Color Color, int StartAngle = 0, int EndAngle = 360) { - if (Clamp) - { - X = Math.Clamp(X, 0, Width - Radius); - Y = Math.Clamp(Y, 0, Height - Radius); - } - if (Radius == 0 || StartAngle == EndAngle) return; for (int I = 0; I < Radius; I++) { - DrawCircle(X, Y, I, Color, StartAngle, EndAngle, false); + DrawCircle(X, Y, I, Color, StartAngle, EndAngle); } } @@ -223,14 +217,8 @@ public Font(string FromFile) public MemoryStream MS; public readonly static Font Default = new(8, 16, "AAAAAAAAAAAAAAAAAAAAAAAAfoGlgYG9mYGBfgAAAAAAAH7/2///w+f//34AAAAAAAAAAGz+/v7+fDgQAAAAAAAAAAAQOHz+fDgQAAAAAAAAAAAYPDzn5+cYGDwAAAAAAAAAGDx+//9+GBg8AAAAAAAAAAAAABg8PBgAAAAAAAD////////nw8Pn////////AAAAAAA8ZkJCZjwAAAAAAP//////w5m9vZnD//////8AAB4OGjJ4zMzMzHgAAAAAAAA8ZmZmZjwYfhgYAAAAAAAAPzM/MDAwMHDw4AAAAAAAAH9jf2NjY2Nn5+bAAAAAAAAAGBjbPOc82xgYAAAAAACAwODw+P748ODAgAAAAAAAAgYOHj7+Ph4OBgIAA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AAAAAAAAAAfGB8YGBgYGBgYGAAAAAAAAAA/NjY2NjY2NjY2NjY2NjY2/zY2NjY2NjY2GBgYGBj/GP8YGBgYGBgYGBgYGBgYGBj4AAAAAAAAAAAAAAAAAAAAHxgYGBgYGBgY/////////////////////wAAAAAAAAD////////////w8PDw8PDw8PDw8PDw8PDwDw8PDw8PDw8PDw8PDw8PD/////////8AAAAAAAAAAAAAAAAAAHbc2NjY3HYAAAAAAAB4zMzM2MzGxsbMAAAAAAAA/sbGwMDAwMDAwAAAAAAAAAAA/mxsbGxsbGwAAAAAAAAA/sZgMBgwYMb+AAAAAAAAAAAAftjY2NjYcAAAAAAAAAAAZmZmZmZ8YGDAAAAAAAAAAHbcGBgYGBgYAAAAAAAAAH4YPGZmZjwYfgAAAAAAAAA4bMbG/sbGbDgAAAAAAAA4bMbGxmxsbGzuAAAAAAAAHjAYDD5mZmZmPAAAAAAAAAAAAH7b29t+AAAAAAAAAAAAAwZ+29vzfmDAAAAAAAAAHDBgYHxgYGAwHAAAAAAAAAB8xsbGxsbGxsYAAAAAAAAAAP4AAP4AAP4AAAAAAAAAAAAYGH4YGAAA/wAAAAAAAAAwGAwGDBgwAH4AAAAAAAAADBgwYDAYDAB+AAAAAAAADhsbGBgYGBgYGBgYGBgYGBgYGBgYGNjY2HAAAAAAAAAAABgYAH4AGBgAAAAAAAAAAAAAdtwAdtwAAAAAAAAAOGxsOAAAAAAAAAAAAAAAAAAAAAAAABgYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAADwwMDAwM7GxsPBwAAAAAANhsbGxsbAAAAAAAAAAAAABw2DBgyPgAAAAAAAAAAAAAAAAAfHx8fHx8fAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="); } - public void DrawString(int X, int Y, string Text, Color Color, bool Clamp = true) + public void DrawString(int X, int Y, string Text, Color Color) { - if (Clamp) - { - X = Math.Clamp(X, 0, Width - (Font.Default.Width * Text.Length)); - Y = Math.Clamp(Y, 0, Height - (Font.Default.Height * Text.Split('\n').Length)); - } - string[] Lines = Text.Split('\n'); for (int Line = 0; Line < Lines.Length; Line++) {