Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Drawing.Color #141

Merged
merged 34 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4cbacc9
Use System.Drawing.Color
charlesroddie Jun 25, 2020
94d265b
builds
charlesroddie Jun 25, 2020
c6bf80d
builds
charlesroddie Jun 25, 2020
cf6ee14
add TODO
charlesroddie Jun 25, 2020
8427ca9
ColoredAtom -> Colored
charlesroddie Jun 28, 2020
a99d7a5
ColoredTextAtom -> Colored
charlesroddie Jun 28, 2020
8d43309
convert color to tex
charlesroddie Jun 28, 2020
86559d0
replace warnings with TODOs
charlesroddie Jun 28, 2020
dc1ae23
standardize html/hex colour format
charlesroddie Jun 28, 2020
31f3387
annotate
charlesroddie Jun 28, 2020
917a295
debug code
charlesroddie Jun 28, 2020
8e85138
Revert "debug code"
charlesroddie Jun 28, 2020
ca78d73
remove spurious usings
charlesroddie Jun 28, 2020
4f604d1
fix Colored and ColorBox to latex
charlesroddie Jun 28, 2020
8640423
parameter name lowercase
charlesroddie Jun 28, 2020
6882030
American
charlesroddie Jun 28, 2020
3ddd1ef
remove NoEnhancedColors
charlesroddie Jun 28, 2020
73f8154
Remove Ooui
charlesroddie Jun 28, 2020
d551d86
casing
charlesroddie Jun 28, 2020
1f26622
Fix 0x - but this should probably be removed
charlesroddie Jul 1, 2020
6505235
Fix tests
charlesroddie Jul 1, 2020
4332532
Remove 0x syntax
charlesroddie Jul 1, 2020
d3709fd
Remove warnings that are TODOs
charlesroddie Jul 1, 2020
42b9fb2
reduce time taken by fsharp test
charlesroddie Jul 1, 2020
9e2c71a
Fix most tests
charlesroddie Jul 1, 2020
afd1bb3
fix mathpaintersettings tests
charlesroddie Jul 1, 2020
fce91ab
Update CSharpMath.Rendering.Tests
Happypig375 Jul 2, 2020
2dd3b53
ColorExtensions should be part of LaTeXSettings
Happypig375 Jul 2, 2020
7ceea19
Resolve some warnings
Happypig375 Jul 2, 2020
70aabd5
ColoredAtom.cs -> Colored.cs
Happypig375 Jul 2, 2020
d4d117e
Lowercase variable
Happypig375 Jul 2, 2020
c71397a
Be consistent with parameter name "colored"
Happypig375 Jul 2, 2020
b32a319
Consistent spacing
Happypig375 Jul 2, 2020
b6ed07e
remove unused `using`
FoggyFinder Jul 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CSharpMath.Apple/BackEnd/AppleGraphicsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using CoreGraphics;
using CoreText;
using CSharpMath.Display;
using Color = CSharpMath.Structures.Color;
using TFont = CSharpMath.Apple.AppleMathFont;
using TGlyph = System.UInt16;

Expand Down
2 changes: 1 addition & 1 deletion CSharpMath.Apple/Extensions/AttributedGlyphRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static NSMutableAttributedString ToNsAttributedString
if (kernedGlyphs[i].KernAfterGlyph is var kern && !(kern is 0))
attributedString.AddAttribute
(CTStringAttributeKey.KerningAdjustment, new NSNumber(kern), range);
if (kernedGlyphs[i].Foreground is Structures.Color foreground)
if (kernedGlyphs[i].Foreground is System.Drawing.Color foreground)
attributedString.AddAttribute(CTStringAttributeKey.ForegroundColor,
ObjCRuntime.Runtime.GetNSObject(foreground.ToCGColor().Handle), range);
}
Expand Down
6 changes: 3 additions & 3 deletions CSharpMath.Apple/Extensions/Color.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace CSharpMath.Apple {
using Structures;
using System.Drawing;
partial class Extensions {
public static CoreGraphics.CGColor ToCGColor(this Color color) =>
new CoreGraphics.CGColor(color.Rf, color.Gf, color.Bf, color.Af);
new CoreGraphics.CGColor(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f);
public static UIKit.UIColor ToUIColor(this Color color) =>
new UIKit.UIColor(color.Rf, color.Gf, color.Bf, color.Af);
new UIKit.UIColor(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f);
}
}
2 changes: 1 addition & 1 deletion CSharpMath.Avalonia/AvaloniaCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Avalonia.Media;

using CSharpMath.Rendering.FrontEnd;
using CSharpMathColor = CSharpMath.Structures.Color;
using CSharpMathColor = System.Drawing.Color;

namespace CSharpMath.Avalonia {
public sealed class AvaloniaCanvas : ICanvas {
Expand Down
2 changes: 1 addition & 1 deletion CSharpMath.Avalonia/AvaloniaPath.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CSharpMath.Rendering.FrontEnd;
using CSharpMathColor = CSharpMath.Structures.Color;
using CSharpMathColor = System.Drawing.Color;

using Avalonia;
using Avalonia.Media;
Expand Down
11 changes: 4 additions & 7 deletions CSharpMath.Avalonia/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
using SizeF = System.Drawing.SizeF;

using Avalonia;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using AvaloniaColor = Avalonia.Media.Color;
using AvaloniaTextAlignment = Avalonia.Media.TextAlignment;

using CSharpMath.Rendering.FrontEnd;
using CSharpMathColor = CSharpMath.Structures.Color;
using CSharpMathTextAlignment = CSharpMath.Rendering.FrontEnd.TextAlignment;

namespace CSharpMath.Avalonia {
public static class Extensions {
public static AvaloniaColor ToAvaloniaColor(this CSharpMathColor color) =>
public static AvaloniaColor ToAvaloniaColor(this System.Drawing.Color color) =>
new AvaloniaColor(color.A, color.R, color.G, color.B);

internal static CSharpMathColor ToCSharpMathColor(this AvaloniaColor color) =>
new CSharpMathColor(color.R, color.G, color.B, color.A);
internal static System.Drawing.Color ToCSharpMathColor(this AvaloniaColor color) =>
System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B);

internal static CSharpMathTextAlignment ToCSharpMathTextAlignment(this AvaloniaTextAlignment alignment) =>
alignment switch
Expand All @@ -27,7 +24,7 @@ internal static CSharpMathTextAlignment ToCSharpMathTextAlignment(this AvaloniaT
_ => CSharpMathTextAlignment.Left
};

public static SolidColorBrush ToSolidColorBrush(this CSharpMathColor color) =>
public static SolidColorBrush ToSolidColorBrush(this System.Drawing.Color color) =>
new SolidColorBrush(color.ToAvaloniaColor());

class DrawVisual<TContent> : Visual where TContent : class {
Expand Down
2 changes: 1 addition & 1 deletion CSharpMath.Avalonia/MathPainter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AvaloniaColor = Avalonia.Media.Color;

using CSharpMath.Rendering.FrontEnd;
using CSharpMathColor = CSharpMath.Structures.Color;
using CSharpMathColor = System.Drawing.Color;

namespace CSharpMath.Avalonia {
public sealed class MathPainter : MathPainter<AvaloniaCanvas, AvaloniaColor> {
Expand Down
2 changes: 1 addition & 1 deletion CSharpMath.Avalonia/TextPainter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AvaloniaColor = Avalonia.Media.Color;

using CSharpMath.Rendering.FrontEnd;
using CSharpMathColor = CSharpMath.Structures.Color;
using CSharpMathColor = System.Drawing.Color;

namespace CSharpMath.Avalonia {
public sealed class TextPainter : TextPainter<AvaloniaCanvas, AvaloniaColor> {
Expand Down
68 changes: 34 additions & 34 deletions CSharpMath.CoreTests/LaTeXParserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,9 @@ public void TestMatrix(string env, string left, string right, string leftOutput,
[InlineData(@"\color{red}{{\left( \begin{matrix}1&2\\ 3&4\end{matrix}\right) }}")]
public void TestRedMatrix(string input) {
var list = ParseLaTeX(input);
Assert.Collection(list, CheckAtom<Color>("", color => {
Assert.Equal(new Structures.Color(255, 0, 0), color.Colour);
Assert.Collection(color.InnerList,
Assert.Collection(list, CheckAtom<Colored>("", colored => {
Assert.Equal(System.Drawing.Color.FromArgb(255, 0, 0), colored.Color);
Assert.Collection(colored.InnerList,
CheckAtom<Inner>("", inner => {
Assert.Equal(new Boundary("("), inner.LeftBoundary);
Assert.Equal(new Boundary(")"), inner.RightBoundary);
Expand Down Expand Up @@ -1091,43 +1091,43 @@ public void TestNoLimits(string input, string output, bool? limits) {

// Sync with CSharpMath.Rendering.Text.Tests TextLaTeXParserTests
[Theory]
[InlineData("0xFFF", "white", 0xFF, 0xFF, 0xFF)]
[InlineData("#ff0", "yellow", 0xFF, 0xFF, 0x00)]
[InlineData("0xf00f", "blue", 0x00, 0x00, 0xFF)]
[InlineData("#F0F0", "lime", 0x00, 0xFF, 0x00)]
[InlineData("0x008000", "green", 0x00, 0x80, 0x00)]
[InlineData("#FFFFFF", "white", 0xFF, 0xFF, 0xFF)]
[InlineData("#ffff00", "yellow", 0xFF, 0xFF, 0x00)]
[InlineData("#ff0000ff", "blue", 0x00, 0x00, 0xFF)]
[InlineData("#FF00FF00", "lime", 0x00, 0xFF, 0x00)]
[InlineData("#008000", "green", 0x00, 0x80, 0x00)]
[InlineData("#d3D3d3", "lightgray", 0xD3, 0xD3, 0xD3)]
[InlineData("0xFf000000", "black", 0x00, 0x00, 0x00)]
[InlineData("#Ff000000", "black", 0x00, 0x00, 0x00)]
[InlineData("#fFa9A9a9", "gray", 0xA9, 0xA9, 0xA9)]
[InlineData("cyan", "cyan", 0x00, 0xFF, 0xFF)]
[InlineData("BROWN", "brown", 0x96, 0x4B, 0x00)]
[InlineData("oLIve", "olive", 0x80, 0x80, 0x00)]
[InlineData("0x12345678", "#12345678", 0x34, 0x56, 0x78, 0x12)]
[InlineData("#12345678", "#12345678", 0x34, 0x56, 0x78, 0x12)]
[InlineData("#fedcba98", "#FEDCBA98", 0xDC, 0xBA, 0x98, 0xFE)]
public void TestColor(string inColor, string outColor, byte r, byte g, byte b, byte a = 0xFF) {
var list = ParseLaTeX($@"\color{{{inColor}}}ab");
Assert.Collection(list,
CheckAtom<Color>("", color => {
Assert.Equal(r, color.Colour.R);
Assert.Equal(g, color.Colour.G);
Assert.Equal(b, color.Colour.B);
Assert.Equal(a, color.Colour.A);
Assert.False(color.ScriptsAllowed);
Assert.Collection(color.InnerList, CheckAtom<Variable>("a"));
CheckAtom<Colored>("", colored => {
Assert.Equal(r, colored.Color.R);
Assert.Equal(g, colored.Color.G);
Assert.Equal(b, colored.Color.B);
Assert.Equal(a, colored.Color.A);
Assert.False(colored.ScriptsAllowed);
Assert.Collection(colored.InnerList, CheckAtom<Variable>("a"));
}),
CheckAtom<Variable>("b")
);
Assert.Equal($@"\color{{{outColor}}}{{a}}b", LaTeXParser.MathListToLaTeX(list).ToString());

list = ParseLaTeX($@"\colorbox{{{inColor}}}ab");
Assert.Collection(list,
CheckAtom<ColorBox>("", color => {
Assert.Equal(r, color.Colour.R);
Assert.Equal(g, color.Colour.G);
Assert.Equal(b, color.Colour.B);
Assert.Equal(a, color.Colour.A);
Assert.False(color.ScriptsAllowed);
Assert.Collection(color.InnerList, CheckAtom<Variable>("a"));
CheckAtom<ColorBox>("", colorBox => {
Assert.Equal(r, colorBox.Color.R);
Assert.Equal(g, colorBox.Color.G);
Assert.Equal(b, colorBox.Color.B);
Assert.Equal(a, colorBox.Color.A);
Assert.False(colorBox.ScriptsAllowed);
Assert.Collection(colorBox.InnerList, CheckAtom<Variable>("a"));
}),
CheckAtom<Variable>("b")
);
Expand All @@ -1138,18 +1138,18 @@ public void TestColor(string inColor, string outColor, byte r, byte g, byte b, b
public void TestColorScripts() {
var list = ParseLaTeX(@"\color{red}1\colorbox{blue}2");
Assert.Collection(list,
CheckAtom<Color>("", color => {
Assert.Equal("red", color.Colour.ToString());
Assert.Empty(color.Superscript);
Assert.Throws<InvalidOperationException>(() => color.Superscript.Add(new Variable("a")));
Assert.Throws<InvalidOperationException>(() => color.Superscript.Append(new MathList(new Variable("a"))));
Assert.Empty(color.Subscript);
Assert.Throws<InvalidOperationException>(() => color.Subscript.Add(new Variable("b")));
Assert.Throws<InvalidOperationException>(() => color.Subscript.Append(new MathList(new Variable("b"))));
Assert.Collection(color.InnerList, CheckAtom<Number>("1"));
CheckAtom<Colored>("", colored => {
Assert.Equal("red", LaTeXSettings.ColorToString(colored.Color, new StringBuilder()).ToString());
Assert.Empty(colored.Superscript);
Assert.Throws<InvalidOperationException>(() => colored.Superscript.Add(new Variable("a")));
Assert.Throws<InvalidOperationException>(() => colored.Superscript.Append(new MathList(new Variable("a"))));
Assert.Empty(colored.Subscript);
Assert.Throws<InvalidOperationException>(() => colored.Subscript.Add(new Variable("b")));
Assert.Throws<InvalidOperationException>(() => colored.Subscript.Append(new MathList(new Variable("b"))));
Assert.Collection(colored.InnerList, CheckAtom<Number>("1"));
}),
CheckAtom<ColorBox>("", colorBox => {
Assert.Equal("blue", colorBox.Colour.ToString());
Assert.Equal("blue", LaTeXSettings.ColorToString(colorBox.Color, new StringBuilder()).ToString());
Assert.Empty(colorBox.Superscript);
Assert.Throws<InvalidOperationException>(() => colorBox.Superscript.Add(new Variable("a")));
Assert.Throws<InvalidOperationException>(() => colorBox.Superscript.Append(new MathList(new Variable("a"))));
Expand Down
16 changes: 8 additions & 8 deletions CSharpMath.CoreTests/MathAtomTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ public void TestCopyOpen() {
CheckClone(open.Subscript, clone.Subscript);
}
[Fact]
public void TestCopyColor() {
var color = new Color(new Structures.Color(255, 0, 0), new MathList(new Open("(")));
var clone = color.Clone(false);
Assert.Equal(new Structures.Color(255, 0, 0), clone.Colour);
CheckClone(color, clone);
CheckClone(color.InnerList, clone.InnerList);
public void TestCopyColored() {
var colored = new Colored(System.Drawing.Color.FromArgb(255, 0, 0), new MathList(new Open("(")));
var clone = colored.Clone(false);
Assert.Equal(System.Drawing.Color.FromArgb(255, 0, 0), clone.Color);
CheckClone(colored, clone);
CheckClone(colored.InnerList, clone.InnerList);

var colorBox = new ColorBox(new Structures.Color(128, 0, 0), new MathList(new Close(")")));
var colorBox = new ColorBox(System.Drawing.Color.FromArgb(128, 0, 0), new MathList(new Close(")")));
var cloneBox = colorBox.Clone(false);
Assert.Equal(new Structures.Color(128, 0, 0), cloneBox.Colour);
Assert.Equal(System.Drawing.Color.FromArgb(128, 0, 0), cloneBox.Color);
CheckClone(colorBox, cloneBox);
CheckClone(colorBox.InnerList, cloneBox.InnerList);
}
Expand Down
10 changes: 5 additions & 5 deletions CSharpMath.CoreTests/TypesetterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,28 +462,28 @@ public void TestColor() =>
TestOuter(@"\color{red}\color{blue}x\colorbox{yellow}\colorbox{green}yz", 3, 14, 4, 30,
l1 => {
Assert.Null(l1.BackColor);
Assert.Equal(Structures.Color.PredefinedColors["red"], l1.TextColor);
Assert.Equal(LaTeXSettings.PredefinedColors["red"], l1.TextColor);
TestList(1, 14, 4, 10, 0, 0, LinePosition.Regular, Range.UndefinedInt,
l2 => {
Assert.Null(l2.BackColor);
Assert.Equal(Structures.Color.PredefinedColors["blue"], l2.TextColor);
Assert.Equal(LaTeXSettings.PredefinedColors["blue"], l2.TextColor);
TestList(1, 14, 4, 10, 0, 0, LinePosition.Regular, Range.UndefinedInt, d => {
var line = Assert.IsType<TextLineDisplay<TFont, TGlyph>>(d);
Assert.Single(line.Atoms);
AssertText("x", line);
Assert.Equal(new PointF(), line.Position);
Assert.False(line.HasScript);
Assert.Null(line.BackColor);
Assert.Equal(Structures.Color.PredefinedColors["blue"], line.TextColor);
Assert.Equal(LaTeXSettings.PredefinedColors["blue"], line.TextColor);
})(l2);
})(l1);
},
l1 => {
Assert.Equal(Structures.Color.PredefinedColors["yellow"], l1.BackColor);
Assert.Equal(LaTeXSettings.PredefinedColors["yellow"], l1.BackColor);
Assert.Null(l1.TextColor);
TestList(1, 14, 4, 10, 10, 0, LinePosition.Regular, Range.UndefinedInt,
l2 => {
Assert.Equal(Structures.Color.PredefinedColors["green"], l2.BackColor);
Assert.Equal(LaTeXSettings.PredefinedColors["green"], l2.BackColor);
Assert.Null(l2.TextColor);
TestList(1, 14, 4, 10, 0, 0, LinePosition.Regular, Range.UndefinedInt, d => {
var line = Assert.IsType<TextLineDisplay<TFont, TGlyph>>(d);
Expand Down
2 changes: 1 addition & 1 deletion CSharpMath.Editor.Tests.FSharp/RandomKeyboardInputsTest.fs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let rec private findShortening(kl:MathKeyboardInput list) =

[<Fact>]
let ``random inputs don't crash editor``() =
let results = List.init 500 (fun _ -> test100keypresses())
let results = List.init 100 (fun _ -> test100keypresses())
let shortestError =
results
|> List.choose (function Ok _ -> None | Error e -> Some e)
Expand Down
2 changes: 1 addition & 1 deletion CSharpMath.Editor.Tests.Visualizer/Checker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static void ConsoleFillRectangle(Rectangle rect, Color? color) {
Console.ResetColor();
}
public static void ConsoleDrawHorizontal
(int x1_, int y_, int x2_, int thickness, Structures.Color? color) {
(int x1_, int y_, int x2_, int thickness, Color? color) {
var rect = Adjust(Rectangle.FromLTRB(x1_, y_ - thickness / 2, x2_, y_ + thickness / 2));
SetConsoleColor(color);
for (int i = 0; i < thickness; i++) {
Expand Down
8 changes: 4 additions & 4 deletions CSharpMath.Editor.Tests.Visualizer/GraphicsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class GraphicsContext : Display.FrontEnd.IGraphicsContext<TestFont, char>
readonly Stack<PointF> stack = new Stack<PointF>();
PointF trans = new PointF();
public void DrawGlyphRunWithOffset(AttributedGlyphRun<TestFont, char> text,
PointF point, Structures.Color? color) {
PointF point, Color? color) {
var advance = 0.0;
foreach (var ((glyph, kernAfter, foreground), bounds) in
text.GlyphInfos.Zip(
Expand All @@ -25,7 +25,7 @@ public void DrawGlyphRunWithOffset(AttributedGlyphRun<TestFont, char> text,
}
}
public void DrawGlyphsAtPoints(IReadOnlyList<char> glyphs,
TestFont font, IEnumerable<PointF> points, Structures.Color? color) {
TestFont font, IEnumerable<PointF> points, Color? color) {
var zipped = glyphs.Zip(points, ValueTuple.Create);
var bounds = TestTypesettingContexts.Instance.GlyphBoundsProvider
.GetBoundingRectsForGlyphs(font, glyphs, glyphs.Count);
Expand All @@ -37,10 +37,10 @@ public void DrawGlyphsAtPoints(IReadOnlyList<char> glyphs,
);
}
}
public void FillRect(RectangleF rect, Structures.Color color) =>
public void FillRect(RectangleF rect, Color color) =>
Checker.ConsoleFillRectangle(new Rectangle((int)(rect.X + trans.X), (int)(rect.Y + trans.Y), (int)rect.Width, (int)rect.Height), color);
public void DrawLine
(float x1, float y1, float x2, float y2, float strokeWidth, Structures.Color? color) {
(float x1, float y1, float x2, float y2, float strokeWidth, Color? color) {
if (y1 != y2) throw new NotImplementedException("Non-horizontal lines currently not supported");
if (!Checker.OutputLines) return;
Checker.ConsoleDrawHorizontal((int)(x1 + trans.X), (int)(y1 + trans.Y), (int)(x2 + trans.X),
Expand Down
2 changes: 0 additions & 2 deletions CSharpMath.Editor/Extensions/FractionDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
namespace CSharpMath.Editor {
using System;
using System.Drawing;

using Display.Displays;
using Display.FrontEnd;
using Color = Structures.Color;

partial class Extensions {
public static MathListIndex IndexForPoint<TFont, TGlyph>(
Expand Down
4 changes: 2 additions & 2 deletions CSharpMath.Editor/Extensions/IDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static float DistanceFromPointToRect(PointF point, RectangleF rect) {
_ => null,
};
public static void HighlightCharacterAt<TFont, TGlyph>
(this IDisplay<TFont, TGlyph> display, MathListIndex index, Structures.Color color)
(this IDisplay<TFont, TGlyph> display, MathListIndex index, Color color)
where TFont : IFont<TGlyph> {
switch (display) {
case TextLineDisplay<TFont, TGlyph> text:
Expand Down Expand Up @@ -93,7 +93,7 @@ public static void HighlightCharacterAt<TFont, TGlyph>
break;
}
}
public static void Highlight<TFont, TGlyph>(this IDisplay<TFont, TGlyph> display, Structures.Color color)
public static void Highlight<TFont, TGlyph>(this IDisplay<TFont, TGlyph> display, Color color)
where TFont : IFont<TGlyph> {
switch (display) {
case TextLineDisplay<TFont, TGlyph> text:
Expand Down
2 changes: 0 additions & 2 deletions CSharpMath.Editor/Extensions/IGlyphDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
namespace CSharpMath.Editor {
using System;
using System.Drawing;

using Display;
using Display.FrontEnd;
using Color = Structures.Color;

partial class Extensions {
public static MathListIndex IndexForPoint<TFont, TGlyph>(
Expand Down
2 changes: 0 additions & 2 deletions CSharpMath.Editor/Extensions/InnerDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
namespace CSharpMath.Editor {
using System;
using System.Drawing;

using Display.Displays;
using Display.FrontEnd;
using Color = Structures.Color;

partial class Extensions {
public static MathListIndex IndexForPoint<TFont, TGlyph>(
Expand Down
2 changes: 0 additions & 2 deletions CSharpMath.Editor/Extensions/LargeOpLimitsDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
namespace CSharpMath.Editor {
using System;
using System.Drawing;

using Display;
using Display.Displays;
using Display.FrontEnd;
using Color = Structures.Color;

partial class Extensions {
public static MathListIndex IndexForPoint<TFont, TGlyph>(
Expand Down
1 change: 0 additions & 1 deletion CSharpMath.Editor/Extensions/ListDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace CSharpMath.Editor {
using Display.Displays;
using Display.FrontEnd;
using Structures;
using Color = Structures.Color;

partial class Extensions {
public static MathListIndex? IndexForPoint<TFont, TGlyph>
Expand Down
2 changes: 0 additions & 2 deletions CSharpMath.Editor/Extensions/RadicalDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
namespace CSharpMath.Editor {
using System;
using System.Drawing;

using Display.Displays;
using Display.FrontEnd;
using Color = Structures.Color;

partial class Extensions {
public static MathListIndex IndexForPoint<TFont, TGlyph>(
Expand Down
Loading