1 write to _font
System.Drawing.Common.Tests (1)
mono\System.Drawing\GraphicsTests.cs (1)
48
_font
= new Font("Arial", 12);
86 references to _font
System.Drawing.Common.Tests (86)
mono\System.Drawing\GraphicsTests.cs (86)
57
_font
?.Dispose();
1575
SizeF size = g.MeasureString(null,
_font
);
1577
size = g.MeasureString(string.Empty,
_font
);
1579
g.MeasureString(string.Empty.AsSpan(),
_font
);
1605
SizeF size = g.MeasureString("a",
_font
, SizeF.Empty);
1608
size = g.MeasureString("a".AsSpan(),
_font
, SizeF.Empty);
1611
size = g.MeasureString(string.Empty,
_font
, SizeF.Empty);
1614
size = g.MeasureString(string.Empty.AsSpan(),
_font
, SizeF.Empty);
1622
SizeF size0 = useSpan ? g.MeasureString(s.AsSpan(),
_font
, 0) : g.MeasureString(s,
_font
, 0);
1623
SizeF sizeN = useSpan ? g.MeasureString(s.AsSpan(),
_font
, int.MinValue) : g.MeasureString(s,
_font
, int.MinValue);
1624
SizeF sizeP = useSpan ? g.MeasureString(s.AsSpan(),
_font
, int.MaxValue) : g.MeasureString(s,
_font
, int.MaxValue);
1657
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1658
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1662
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1663
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1667
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1668
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1690
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1691
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1695
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1696
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1700
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1701
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1721
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1722
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1726
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1727
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1731
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1732
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1754
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1755
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1759
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1760
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1764
? g.MeasureString(text.AsSpan(),
_font
, int.MaxValue, string_format)
1765
: g.MeasureString(text,
_font
, int.MaxValue, string_format);
1782
SizeF size = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1785
? g.MeasureString(s.AsSpan(),
_font
, new SizeF(80, size.Height), null, out int chars, out int lines)
1786
: g.MeasureString(s,
_font
, new SizeF(80, size.Height), null, out chars, out lines);
1805
SizeF size = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1810
SizeF expected = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1814
size = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1820
expected = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1822
size = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1826
size = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1833
expected = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1837
size = useSpan ? g.MeasureString(s.AsSpan(),
_font
) : g.MeasureString(s,
_font
);
1848
Region[] regions = g.MeasureCharacterRanges(null,
_font
, default, null);
1851
regions = g.MeasureCharacterRanges(string.Empty,
_font
, default, null);
1853
regions = g.MeasureCharacterRanges(string.Empty.AsSpan(),
_font
, default, null);
1872
Region[] regions = g.MeasureCharacterRanges("Mono",
_font
, default, new StringFormat());
1875
g.MeasureCharacterRanges("Mono".AsSpan(),
_font
, default, new StringFormat());
1900
SizeF size = g.MeasureString(text,
_font
, new Point(0, 0), string_format);
1902
Region[] regions = g.MeasureCharacterRanges(text,
_font
, layout_rect, string_format);
1907
regions = g.MeasureCharacterRanges(text.AsSpan(),
_font
, layout_rect, string_format);
1924
? g.MeasureString(text.AsSpan(),
_font
, new Point(0, 0), string_format)
1925
: g.MeasureString(text,
_font
, new Point(0, 0), string_format);
1929
g.MeasureCharacterRanges(text.AsSpan(),
_font
, layout_rect, string_format);
1933
g.MeasureCharacterRanges(text,
_font
, layout_rect, string_format);
1966
SizeF size = g.MeasureString(text,
_font
, new Point(0, 0), string_format);
1971
Region[] regions = g.MeasureCharacterRanges(text,
_font
, layout_rect, string_format);
1976
regions = g.MeasureCharacterRanges(text,
_font
, layout_rect, string_format);
1980
regions = g.MeasureCharacterRanges(text.AsSpan(),
_font
, layout_rect, string_format);
1986
regions = g.MeasureCharacterRanges(text,
_font
, layout_rect, string_format);
1990
g.MeasureCharacterRanges(text.AsSpan(),
_font
, layout_rect, string_format);
2000
Assert.Throws<ArgumentException>(() => g.MeasureCharacterRanges("Mono",
_font
, default, null));
2001
Assert.Throws<ArgumentException>(() => g.MeasureCharacterRanges("Mono".AsSpan(),
_font
, default, null));
2093
g.DrawString("Test String",
_font
, Brushes.Black, rect, fmt);
2094
g.DrawString("Test String".AsSpan(),
_font
, Brushes.Black, rect, fmt);
2109
g.DrawString("Test String",
_font
, Brushes.Black, rect, fmt);
2110
g.DrawString("Test String".AsSpan(),
_font
, Brushes.Black, rect, fmt);
2121
SizeF sz = g.MeasureString(text,
_font
, 80, format);
2123
Assert.True(sz.Height >
_font
.Height * 2);
2125
sz = g.MeasureString(text.AsSpan(),
_font
, 80, format);
2127
Assert.True(sz.Height >
_font
.Height * 2);