Skip to content

Commit a3a8920

Browse files
charlesroddieHappypig375FoggyFinder
authored
System.Drawing.Color (#141)
* Use System.Drawing.Color * builds * builds * add TODO * ColoredAtom -> Colored * ColoredTextAtom -> Colored * convert color to tex * replace warnings with TODOs * standardize html/hex colour format * annotate * debug code * Revert "debug code" This reverts commit 917a295. * remove spurious usings * fix Colored and ColorBox to latex * parameter name lowercase * American * remove NoEnhancedColors * Remove Ooui * casing * Fix 0x - but this should probably be removed * Fix tests * Remove 0x syntax * Remove warnings that are TODOs * reduce time taken by fsharp test * Fix most tests * fix mathpaintersettings tests * Update CSharpMath.Rendering.Tests * ColorExtensions should be part of LaTeXSettings * Resolve some warnings * ColoredAtom.cs -> Colored.cs * Lowercase variable * Be consistent with parameter name "colored" * Consistent spacing * remove unused `using` Co-authored-by: Charles Roddie <[email protected]> Co-authored-by: Hadrian Tang <[email protected]> Co-authored-by: FoggyFinder <[email protected]>
1 parent 6337812 commit a3a8920

File tree

88 files changed

+273
-493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+273
-493
lines changed

CSharpMath.Apple/BackEnd/AppleGraphicsContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using CoreGraphics;
55
using CoreText;
66
using CSharpMath.Display;
7-
using Color = CSharpMath.Structures.Color;
87
using TFont = CSharpMath.Apple.AppleMathFont;
98
using TGlyph = System.UInt16;
109

CSharpMath.Apple/Extensions/AttributedGlyphRun.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static NSMutableAttributedString ToNsAttributedString
2323
if (kernedGlyphs[i].KernAfterGlyph is var kern && !(kern is 0))
2424
attributedString.AddAttribute
2525
(CTStringAttributeKey.KerningAdjustment, new NSNumber(kern), range);
26-
if (kernedGlyphs[i].Foreground is Structures.Color foreground)
26+
if (kernedGlyphs[i].Foreground is System.Drawing.Color foreground)
2727
attributedString.AddAttribute(CTStringAttributeKey.ForegroundColor,
2828
ObjCRuntime.Runtime.GetNSObject(foreground.ToCGColor().Handle), range);
2929
}

CSharpMath.Apple/Extensions/Color.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
namespace CSharpMath.Apple {
2-
using Structures;
2+
using System.Drawing;
33
partial class Extensions {
44
public static CoreGraphics.CGColor ToCGColor(this Color color) =>
5-
new CoreGraphics.CGColor(color.Rf, color.Gf, color.Bf, color.Af);
5+
new CoreGraphics.CGColor(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f);
66
public static UIKit.UIColor ToUIColor(this Color color) =>
7-
new UIKit.UIColor(color.Rf, color.Gf, color.Bf, color.Af);
7+
new UIKit.UIColor(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f);
88
}
99
}

CSharpMath.Avalonia/AvaloniaCanvas.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Avalonia.Media;
55

66
using CSharpMath.Rendering.FrontEnd;
7-
using CSharpMathColor = CSharpMath.Structures.Color;
7+
using CSharpMathColor = System.Drawing.Color;
88

99
namespace CSharpMath.Avalonia {
1010
public sealed class AvaloniaCanvas : ICanvas {

CSharpMath.Avalonia/AvaloniaPath.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using CSharpMath.Rendering.FrontEnd;
2-
using CSharpMathColor = CSharpMath.Structures.Color;
2+
using CSharpMathColor = System.Drawing.Color;
33

44
using Avalonia;
55
using Avalonia.Media;

CSharpMath.Avalonia/Extensions.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
using SizeF = System.Drawing.SizeF;
2-
31
using Avalonia;
42
using Avalonia.Media;
53
using Avalonia.Media.Imaging;
64
using AvaloniaColor = Avalonia.Media.Color;
75
using AvaloniaTextAlignment = Avalonia.Media.TextAlignment;
86

97
using CSharpMath.Rendering.FrontEnd;
10-
using CSharpMathColor = CSharpMath.Structures.Color;
118
using CSharpMathTextAlignment = CSharpMath.Rendering.FrontEnd.TextAlignment;
129

1310
namespace CSharpMath.Avalonia {
1411
public static class Extensions {
15-
public static AvaloniaColor ToAvaloniaColor(this CSharpMathColor color) =>
12+
public static AvaloniaColor ToAvaloniaColor(this System.Drawing.Color color) =>
1613
new AvaloniaColor(color.A, color.R, color.G, color.B);
1714

18-
internal static CSharpMathColor ToCSharpMathColor(this AvaloniaColor color) =>
19-
new CSharpMathColor(color.R, color.G, color.B, color.A);
15+
internal static System.Drawing.Color ToCSharpMathColor(this AvaloniaColor color) =>
16+
System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B);
2017

2118
internal static CSharpMathTextAlignment ToCSharpMathTextAlignment(this AvaloniaTextAlignment alignment) =>
2219
alignment switch
@@ -27,7 +24,7 @@ internal static CSharpMathTextAlignment ToCSharpMathTextAlignment(this AvaloniaT
2724
_ => CSharpMathTextAlignment.Left
2825
};
2926

30-
public static SolidColorBrush ToSolidColorBrush(this CSharpMathColor color) =>
27+
public static SolidColorBrush ToSolidColorBrush(this System.Drawing.Color color) =>
3128
new SolidColorBrush(color.ToAvaloniaColor());
3229

3330
class DrawVisual<TContent> : Visual where TContent : class {

CSharpMath.Avalonia/MathPainter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using AvaloniaColor = Avalonia.Media.Color;
22

33
using CSharpMath.Rendering.FrontEnd;
4-
using CSharpMathColor = CSharpMath.Structures.Color;
4+
using CSharpMathColor = System.Drawing.Color;
55

66
namespace CSharpMath.Avalonia {
77
public sealed class MathPainter : MathPainter<AvaloniaCanvas, AvaloniaColor> {

CSharpMath.Avalonia/TextPainter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using AvaloniaColor = Avalonia.Media.Color;
22

33
using CSharpMath.Rendering.FrontEnd;
4-
using CSharpMathColor = CSharpMath.Structures.Color;
4+
using CSharpMathColor = System.Drawing.Color;
55

66
namespace CSharpMath.Avalonia {
77
public sealed class TextPainter : TextPainter<AvaloniaCanvas, AvaloniaColor> {

CSharpMath.CoreTests/LaTeXParserTest.cs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ public void TestMatrix(string env, string left, string right, string leftOutput,
456456
[InlineData(@"\color{red}{{\left( \begin{matrix}1&2\\ 3&4\end{matrix}\right) }}")]
457457
public void TestRedMatrix(string input) {
458458
var list = ParseLaTeX(input);
459-
Assert.Collection(list, CheckAtom<Color>("", color => {
460-
Assert.Equal(new Structures.Color(255, 0, 0), color.Colour);
461-
Assert.Collection(color.InnerList,
459+
Assert.Collection(list, CheckAtom<Colored>("", colored => {
460+
Assert.Equal(System.Drawing.Color.FromArgb(255, 0, 0), colored.Color);
461+
Assert.Collection(colored.InnerList,
462462
CheckAtom<Inner>("", inner => {
463463
Assert.Equal(new Boundary("("), inner.LeftBoundary);
464464
Assert.Equal(new Boundary(")"), inner.RightBoundary);
@@ -1091,43 +1091,43 @@ public void TestNoLimits(string input, string output, bool? limits) {
10911091

10921092
// Sync with CSharpMath.Rendering.Text.Tests TextLaTeXParserTests
10931093
[Theory]
1094-
[InlineData("0xFFF", "white", 0xFF, 0xFF, 0xFF)]
1095-
[InlineData("#ff0", "yellow", 0xFF, 0xFF, 0x00)]
1096-
[InlineData("0xf00f", "blue", 0x00, 0x00, 0xFF)]
1097-
[InlineData("#F0F0", "lime", 0x00, 0xFF, 0x00)]
1098-
[InlineData("0x008000", "green", 0x00, 0x80, 0x00)]
1094+
[InlineData("#FFFFFF", "white", 0xFF, 0xFF, 0xFF)]
1095+
[InlineData("#ffff00", "yellow", 0xFF, 0xFF, 0x00)]
1096+
[InlineData("#ff0000ff", "blue", 0x00, 0x00, 0xFF)]
1097+
[InlineData("#FF00FF00", "lime", 0x00, 0xFF, 0x00)]
1098+
[InlineData("#008000", "green", 0x00, 0x80, 0x00)]
10991099
[InlineData("#d3D3d3", "lightgray", 0xD3, 0xD3, 0xD3)]
1100-
[InlineData("0xFf000000", "black", 0x00, 0x00, 0x00)]
1100+
[InlineData("#Ff000000", "black", 0x00, 0x00, 0x00)]
11011101
[InlineData("#fFa9A9a9", "gray", 0xA9, 0xA9, 0xA9)]
11021102
[InlineData("cyan", "cyan", 0x00, 0xFF, 0xFF)]
11031103
[InlineData("BROWN", "brown", 0x96, 0x4B, 0x00)]
11041104
[InlineData("oLIve", "olive", 0x80, 0x80, 0x00)]
1105-
[InlineData("0x12345678", "#12345678", 0x34, 0x56, 0x78, 0x12)]
1105+
[InlineData("#12345678", "#12345678", 0x34, 0x56, 0x78, 0x12)]
11061106
[InlineData("#fedcba98", "#FEDCBA98", 0xDC, 0xBA, 0x98, 0xFE)]
11071107
public void TestColor(string inColor, string outColor, byte r, byte g, byte b, byte a = 0xFF) {
11081108
var list = ParseLaTeX($@"\color{{{inColor}}}ab");
11091109
Assert.Collection(list,
1110-
CheckAtom<Color>("", color => {
1111-
Assert.Equal(r, color.Colour.R);
1112-
Assert.Equal(g, color.Colour.G);
1113-
Assert.Equal(b, color.Colour.B);
1114-
Assert.Equal(a, color.Colour.A);
1115-
Assert.False(color.ScriptsAllowed);
1116-
Assert.Collection(color.InnerList, CheckAtom<Variable>("a"));
1110+
CheckAtom<Colored>("", colored => {
1111+
Assert.Equal(r, colored.Color.R);
1112+
Assert.Equal(g, colored.Color.G);
1113+
Assert.Equal(b, colored.Color.B);
1114+
Assert.Equal(a, colored.Color.A);
1115+
Assert.False(colored.ScriptsAllowed);
1116+
Assert.Collection(colored.InnerList, CheckAtom<Variable>("a"));
11171117
}),
11181118
CheckAtom<Variable>("b")
11191119
);
11201120
Assert.Equal($@"\color{{{outColor}}}{{a}}b", LaTeXParser.MathListToLaTeX(list).ToString());
11211121

11221122
list = ParseLaTeX($@"\colorbox{{{inColor}}}ab");
11231123
Assert.Collection(list,
1124-
CheckAtom<ColorBox>("", color => {
1125-
Assert.Equal(r, color.Colour.R);
1126-
Assert.Equal(g, color.Colour.G);
1127-
Assert.Equal(b, color.Colour.B);
1128-
Assert.Equal(a, color.Colour.A);
1129-
Assert.False(color.ScriptsAllowed);
1130-
Assert.Collection(color.InnerList, CheckAtom<Variable>("a"));
1124+
CheckAtom<ColorBox>("", colorBox => {
1125+
Assert.Equal(r, colorBox.Color.R);
1126+
Assert.Equal(g, colorBox.Color.G);
1127+
Assert.Equal(b, colorBox.Color.B);
1128+
Assert.Equal(a, colorBox.Color.A);
1129+
Assert.False(colorBox.ScriptsAllowed);
1130+
Assert.Collection(colorBox.InnerList, CheckAtom<Variable>("a"));
11311131
}),
11321132
CheckAtom<Variable>("b")
11331133
);
@@ -1138,18 +1138,18 @@ public void TestColor(string inColor, string outColor, byte r, byte g, byte b, b
11381138
public void TestColorScripts() {
11391139
var list = ParseLaTeX(@"\color{red}1\colorbox{blue}2");
11401140
Assert.Collection(list,
1141-
CheckAtom<Color>("", color => {
1142-
Assert.Equal("red", color.Colour.ToString());
1143-
Assert.Empty(color.Superscript);
1144-
Assert.Throws<InvalidOperationException>(() => color.Superscript.Add(new Variable("a")));
1145-
Assert.Throws<InvalidOperationException>(() => color.Superscript.Append(new MathList(new Variable("a"))));
1146-
Assert.Empty(color.Subscript);
1147-
Assert.Throws<InvalidOperationException>(() => color.Subscript.Add(new Variable("b")));
1148-
Assert.Throws<InvalidOperationException>(() => color.Subscript.Append(new MathList(new Variable("b"))));
1149-
Assert.Collection(color.InnerList, CheckAtom<Number>("1"));
1141+
CheckAtom<Colored>("", colored => {
1142+
Assert.Equal("red", LaTeXSettings.ColorToString(colored.Color, new StringBuilder()).ToString());
1143+
Assert.Empty(colored.Superscript);
1144+
Assert.Throws<InvalidOperationException>(() => colored.Superscript.Add(new Variable("a")));
1145+
Assert.Throws<InvalidOperationException>(() => colored.Superscript.Append(new MathList(new Variable("a"))));
1146+
Assert.Empty(colored.Subscript);
1147+
Assert.Throws<InvalidOperationException>(() => colored.Subscript.Add(new Variable("b")));
1148+
Assert.Throws<InvalidOperationException>(() => colored.Subscript.Append(new MathList(new Variable("b"))));
1149+
Assert.Collection(colored.InnerList, CheckAtom<Number>("1"));
11501150
}),
11511151
CheckAtom<ColorBox>("", colorBox => {
1152-
Assert.Equal("blue", colorBox.Colour.ToString());
1152+
Assert.Equal("blue", LaTeXSettings.ColorToString(colorBox.Color, new StringBuilder()).ToString());
11531153
Assert.Empty(colorBox.Superscript);
11541154
Assert.Throws<InvalidOperationException>(() => colorBox.Superscript.Add(new Variable("a")));
11551155
Assert.Throws<InvalidOperationException>(() => colorBox.Superscript.Append(new MathList(new Variable("a"))));

CSharpMath.CoreTests/MathAtomTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,16 @@ public void TestCopyOpen() {
184184
CheckClone(open.Subscript, clone.Subscript);
185185
}
186186
[Fact]
187-
public void TestCopyColor() {
188-
var color = new Color(new Structures.Color(255, 0, 0), new MathList(new Open("(")));
189-
var clone = color.Clone(false);
190-
Assert.Equal(new Structures.Color(255, 0, 0), clone.Colour);
191-
CheckClone(color, clone);
192-
CheckClone(color.InnerList, clone.InnerList);
187+
public void TestCopyColored() {
188+
var colored = new Colored(System.Drawing.Color.FromArgb(255, 0, 0), new MathList(new Open("(")));
189+
var clone = colored.Clone(false);
190+
Assert.Equal(System.Drawing.Color.FromArgb(255, 0, 0), clone.Color);
191+
CheckClone(colored, clone);
192+
CheckClone(colored.InnerList, clone.InnerList);
193193

194-
var colorBox = new ColorBox(new Structures.Color(128, 0, 0), new MathList(new Close(")")));
194+
var colorBox = new ColorBox(System.Drawing.Color.FromArgb(128, 0, 0), new MathList(new Close(")")));
195195
var cloneBox = colorBox.Clone(false);
196-
Assert.Equal(new Structures.Color(128, 0, 0), cloneBox.Colour);
196+
Assert.Equal(System.Drawing.Color.FromArgb(128, 0, 0), cloneBox.Color);
197197
CheckClone(colorBox, cloneBox);
198198
CheckClone(colorBox.InnerList, cloneBox.InnerList);
199199
}

CSharpMath.CoreTests/TypesetterTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,28 +462,28 @@ public void TestColor() =>
462462
TestOuter(@"\color{red}\color{blue}x\colorbox{yellow}\colorbox{green}yz", 3, 14, 4, 30,
463463
l1 => {
464464
Assert.Null(l1.BackColor);
465-
Assert.Equal(Structures.Color.PredefinedColors["red"], l1.TextColor);
465+
Assert.Equal(LaTeXSettings.PredefinedColors["red"], l1.TextColor);
466466
TestList(1, 14, 4, 10, 0, 0, LinePosition.Regular, Range.UndefinedInt,
467467
l2 => {
468468
Assert.Null(l2.BackColor);
469-
Assert.Equal(Structures.Color.PredefinedColors["blue"], l2.TextColor);
469+
Assert.Equal(LaTeXSettings.PredefinedColors["blue"], l2.TextColor);
470470
TestList(1, 14, 4, 10, 0, 0, LinePosition.Regular, Range.UndefinedInt, d => {
471471
var line = Assert.IsType<TextLineDisplay<TFont, TGlyph>>(d);
472472
Assert.Single(line.Atoms);
473473
AssertText("x", line);
474474
Assert.Equal(new PointF(), line.Position);
475475
Assert.False(line.HasScript);
476476
Assert.Null(line.BackColor);
477-
Assert.Equal(Structures.Color.PredefinedColors["blue"], line.TextColor);
477+
Assert.Equal(LaTeXSettings.PredefinedColors["blue"], line.TextColor);
478478
})(l2);
479479
})(l1);
480480
},
481481
l1 => {
482-
Assert.Equal(Structures.Color.PredefinedColors["yellow"], l1.BackColor);
482+
Assert.Equal(LaTeXSettings.PredefinedColors["yellow"], l1.BackColor);
483483
Assert.Null(l1.TextColor);
484484
TestList(1, 14, 4, 10, 10, 0, LinePosition.Regular, Range.UndefinedInt,
485485
l2 => {
486-
Assert.Equal(Structures.Color.PredefinedColors["green"], l2.BackColor);
486+
Assert.Equal(LaTeXSettings.PredefinedColors["green"], l2.BackColor);
487487
Assert.Null(l2.TextColor);
488488
TestList(1, 14, 4, 10, 0, 0, LinePosition.Regular, Range.UndefinedInt, d => {
489489
var line = Assert.IsType<TextLineDisplay<TFont, TGlyph>>(d);

CSharpMath.Editor.Tests.FSharp/RandomKeyboardInputsTest.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ let rec private findShortening(kl:MathKeyboardInput list) =
4848

4949
[<Fact>]
5050
let ``random inputs don't crash editor``() =
51-
let results = List.init 500 (fun _ -> test100keypresses())
51+
let results = List.init 100 (fun _ -> test100keypresses())
5252
let shortestError =
5353
results
5454
|> List.choose (function Ok _ -> None | Error e -> Some e)

CSharpMath.Editor.Tests.Visualizer/Checker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static void ConsoleFillRectangle(Rectangle rect, Color? color) {
154154
Console.ResetColor();
155155
}
156156
public static void ConsoleDrawHorizontal
157-
(int x1_, int y_, int x2_, int thickness, Structures.Color? color) {
157+
(int x1_, int y_, int x2_, int thickness, Color? color) {
158158
var rect = Adjust(Rectangle.FromLTRB(x1_, y_ - thickness / 2, x2_, y_ + thickness / 2));
159159
SetConsoleColor(color);
160160
for (int i = 0; i < thickness; i++) {

CSharpMath.Editor.Tests.Visualizer/GraphicsContext.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class GraphicsContext : Display.FrontEnd.IGraphicsContext<TestFont, char>
1010
readonly Stack<PointF> stack = new Stack<PointF>();
1111
PointF trans = new PointF();
1212
public void DrawGlyphRunWithOffset(AttributedGlyphRun<TestFont, char> text,
13-
PointF point, Structures.Color? color) {
13+
PointF point, Color? color) {
1414
var advance = 0.0;
1515
foreach (var ((glyph, kernAfter, foreground), bounds) in
1616
text.GlyphInfos.Zip(
@@ -25,7 +25,7 @@ public void DrawGlyphRunWithOffset(AttributedGlyphRun<TestFont, char> text,
2525
}
2626
}
2727
public void DrawGlyphsAtPoints(IReadOnlyList<char> glyphs,
28-
TestFont font, IEnumerable<PointF> points, Structures.Color? color) {
28+
TestFont font, IEnumerable<PointF> points, Color? color) {
2929
var zipped = glyphs.Zip(points, ValueTuple.Create);
3030
var bounds = TestTypesettingContexts.Instance.GlyphBoundsProvider
3131
.GetBoundingRectsForGlyphs(font, glyphs, glyphs.Count);
@@ -37,10 +37,10 @@ public void DrawGlyphsAtPoints(IReadOnlyList<char> glyphs,
3737
);
3838
}
3939
}
40-
public void FillRect(RectangleF rect, Structures.Color color) =>
40+
public void FillRect(RectangleF rect, Color color) =>
4141
Checker.ConsoleFillRectangle(new Rectangle((int)(rect.X + trans.X), (int)(rect.Y + trans.Y), (int)rect.Width, (int)rect.Height), color);
4242
public void DrawLine
43-
(float x1, float y1, float x2, float y2, float strokeWidth, Structures.Color? color) {
43+
(float x1, float y1, float x2, float y2, float strokeWidth, Color? color) {
4444
if (y1 != y2) throw new NotImplementedException("Non-horizontal lines currently not supported");
4545
if (!Checker.OutputLines) return;
4646
Checker.ConsoleDrawHorizontal((int)(x1 + trans.X), (int)(y1 + trans.Y), (int)(x2 + trans.X),

CSharpMath.Editor/Extensions/FractionDisplay.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
namespace CSharpMath.Editor {
22
using System;
33
using System.Drawing;
4-
54
using Display.Displays;
65
using Display.FrontEnd;
7-
using Color = Structures.Color;
86

97
partial class Extensions {
108
public static MathListIndex IndexForPoint<TFont, TGlyph>(

CSharpMath.Editor/Extensions/IDisplay.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static float DistanceFromPointToRect(PointF point, RectangleF rect) {
6565
_ => null,
6666
};
6767
public static void HighlightCharacterAt<TFont, TGlyph>
68-
(this IDisplay<TFont, TGlyph> display, MathListIndex index, Structures.Color color)
68+
(this IDisplay<TFont, TGlyph> display, MathListIndex index, Color color)
6969
where TFont : IFont<TGlyph> {
7070
switch (display) {
7171
case TextLineDisplay<TFont, TGlyph> text:
@@ -93,7 +93,7 @@ public static void HighlightCharacterAt<TFont, TGlyph>
9393
break;
9494
}
9595
}
96-
public static void Highlight<TFont, TGlyph>(this IDisplay<TFont, TGlyph> display, Structures.Color color)
96+
public static void Highlight<TFont, TGlyph>(this IDisplay<TFont, TGlyph> display, Color color)
9797
where TFont : IFont<TGlyph> {
9898
switch (display) {
9999
case TextLineDisplay<TFont, TGlyph> text:

CSharpMath.Editor/Extensions/IGlyphDisplay.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
namespace CSharpMath.Editor {
22
using System;
33
using System.Drawing;
4-
54
using Display;
65
using Display.FrontEnd;
7-
using Color = Structures.Color;
86

97
partial class Extensions {
108
public static MathListIndex IndexForPoint<TFont, TGlyph>(

CSharpMath.Editor/Extensions/InnerDisplay.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
namespace CSharpMath.Editor {
22
using System;
33
using System.Drawing;
4-
54
using Display.Displays;
65
using Display.FrontEnd;
7-
using Color = Structures.Color;
86

97
partial class Extensions {
108
public static MathListIndex IndexForPoint<TFont, TGlyph>(

CSharpMath.Editor/Extensions/LargeOpLimitsDisplay.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
namespace CSharpMath.Editor {
22
using System;
33
using System.Drawing;
4-
54
using Display;
65
using Display.Displays;
76
using Display.FrontEnd;
8-
using Color = Structures.Color;
97

108
partial class Extensions {
119
public static MathListIndex IndexForPoint<TFont, TGlyph>(

CSharpMath.Editor/Extensions/ListDisplay.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace CSharpMath.Editor {
77
using Display.Displays;
88
using Display.FrontEnd;
99
using Structures;
10-
using Color = Structures.Color;
1110

1211
partial class Extensions {
1312
public static MathListIndex? IndexForPoint<TFont, TGlyph>

CSharpMath.Editor/Extensions/RadicalDisplay.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
namespace CSharpMath.Editor {
22
using System;
33
using System.Drawing;
4-
54
using Display.Displays;
65
using Display.FrontEnd;
7-
using Color = Structures.Color;
86

97
partial class Extensions {
108
public static MathListIndex IndexForPoint<TFont, TGlyph>(

0 commit comments

Comments
 (0)