We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f54ed0 commit fb62dd1Copy full SHA for fb62dd1
1 file changed
tests/ImageSharp.Drawing.Tests/Shapes/TextBuilderTests.cs
@@ -18,12 +18,13 @@ public void TextBuilder_Bounds_AreCorrect()
18
Origin = position
19
};
20
21
- string text = "Hello World";
+ const string text = "Hello World";
22
23
IPathCollection glyphs = TextBuilder.GenerateGlyphs(text, options);
24
25
RectangleF builderBounds = glyphs.Bounds;
26
- FontRectangle measuredBounds = TextMeasurer.MeasureBounds(text, options);
+ FontRectangle directMeasured = TextMeasurer.MeasureBounds(text, options);
27
+ var measuredBounds = new FontRectangle(new(0, 0), directMeasured.Size + directMeasured.Location);
28
29
Assert.Equal(measuredBounds.X, builderBounds.X);
30
Assert.Equal(measuredBounds.Y, builderBounds.Y);
0 commit comments