244 instantiations of PointF
PresentationCore (1)
System\Windows\Nrbf\SerializationRecordExtensions.cs (1)
50
value = new
PointF
(classInfo.GetSingle("x"), classInfo.GetSingle("y"));
System.Drawing.Common (8)
System\Drawing\Drawing2D\GraphicsPath.cs (2)
244
public bool IsVisible(float x, float y) => IsVisible(new
PointF
(x, y), null);
272
public bool IsOutlineVisible(float x, float y, Pen pen) => IsOutlineVisible(new
PointF
(x, y), pen, null);
System\Drawing\Drawing2D\Matrix.cs (1)
166
return new
PointF
(elements[4], elements[5]);
System\Drawing\Drawing2D\PathGradientBrush.cs (1)
382
return new
PointF
(scaleX, scaleY);
System\Drawing\Graphics.cs (2)
3365
offset = new
PointF
(translation.X, translation.Y);
3379
offset = new
PointF
(translation.X, translation.Y);
System\Drawing\Region.cs (2)
279
public bool IsVisible(float x, float y) => IsVisible(new
PointF
(x, y), null);
283
public bool IsVisible(float x, float y, Graphics? g) => IsVisible(new
PointF
(x, y), g);
System.Drawing.Common.Tests (220)
mono\System.Drawing\GraphicsTests.cs (10)
2421
Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new
PointF
(0, 0)));
2429
g.DrawImage(bmp, new
PointF
(0, 0));
2463
new
(0, 0),
new
(1, 1),
new
(2, 2)
2712
PointF p =
new
(1, 1);
2719
PointF p =
new
(1, 1);
2726
PointF p =
new
(1, 1);
2733
PointF p =
new
(1, 1);
2945
ptf[i] = new
PointF
(i, i);
System\Drawing\Drawing2D\GraphicsPathTests.cs (178)
223
gpfPointsloat.AddLine(new
PointF
(1, 1), new
PointF
(2, 2));
241
gpf.AddLine(new
PointF
(49, 157), new
PointF
(75, 196));
242
gpf.AddLine(new
PointF
(75, 196), new
PointF
(102, 209));
246
gpf.AddLine(new
PointF
(102, 209), new
PointF
(75, 196));
259
gpf.AddLines(new PointF[] {
new
(1, 1),
new
(2, 2) });
268
gpi.AddLines(new PointF[] {
new
(1, 1) });
272
gpf.AddLines(new PointF[] {
new
(1, 1) });
373
gpf.AddBezier(new
PointF
(1, 1), new
PointF
(2, 2), new
PointF
(3, 3), new
PointF
(4, 4));
390
gpf.AddBezier(new
PointF
(0, 0), new
PointF
(0, 0), new
PointF
(0, 0), new
PointF
(0, 0));
394
gpf.AddBezier(new
PointF
(0, 0), new
PointF
(0, 0), new
PointF
(0, 0), new
PointF
(0, 0));
434
yield return new object[] { new PointF[1] {
new
(1f, 1f) } };
435
yield return new object[] { new PointF[2] {
new
(1f, 1f),
new
(2f, 2f) } };
436
yield return new object[] { new PointF[3] {
new
(1f, 1f),
new
(2f, 2f),
new
(3f, 3f) } };
517
new
PointF
(37f, 185f),
518
new
PointF
(99f, 185f),
519
new
PointF
(161f, 159f),
520
new
PointF
(223f, 185f),
521
new
PointF
(285f, 54f),
526
new
PointF
(37f, 185f),
527
new
PointF
(47.33333f, 185f),
528
new
PointF
(78.3333f, 189.3333f),
529
new
PointF
(99f, 185f),
530
new
PointF
(119.6667f, 180.6667f),
531
new
PointF
(140.3333f, 159f),
532
new
PointF
(161f, 159f),
533
new
PointF
(181.6667f, 159f),
534
new
PointF
(202.3333f, 202.5f),
535
new
PointF
(223f, 185f),
536
new
PointF
(243.6667f, 167.5f),
537
new
PointF
(274.6667f, 75.8333f),
538
new
PointF
(285f, 54f),
565
yield return new object[] { new PointF[1] {
new
(1f, 1f) } };
604
() => gp.AddCurve(new PointF[2] {
new
(1f, 1f),
new
(2f, 2f) }, 0, segment, 0.5f));
615
() => gp.AddCurve(new PointF[3] {
new
(1f, 1f),
new
(0f, 20f),
new
(20f, 0f) }, 1, 2, 0.5f));
630
gpf.AddClosedCurve(new PointF[3] {
new
(1, 1),
new
(2, 2),
new
(3, 3) });
644
gpf.AddClosedCurve(new PointF[3] {
new
(1, 1),
new
(1, 1),
new
(1, 1) });
646
gpf.AddClosedCurve(new PointF[3] {
new
(1, 1),
new
(1, 1),
new
(1, 1) });
658
gpf.AddClosedCurve(new PointF[3] {
new
(1, 1),
new
(2, 2),
new
(3, 3) }, 0.5f);
688
yield return new object[] { new PointF[1] {
new
(1f, 1f) } };
689
yield return new object[] { new PointF[2] {
new
(1f, 1f),
new
(2f, 2f) } };
893
gpf.AddPolygon(new PointF[3] {
new
(1, 1),
new
(2, 2),
new
(3, 3) });
918
gpf.AddPolygon(new PointF[3] {
new
(1, 1),
new
(2, 2),
new
(3, 3) });
922
gpf.AddPolygon(new PointF[3] {
new
(1, 1),
new
(2, 2),
new
(3, 3) });
926
gpf.AddPolygon(new PointF[3] {
new
(1, 1),
new
(2, 2),
new
(3, 3) });
930
gpf.AddPolygon(new PointF[3] {
new
(1, 1),
new
(2, 2),
new
(3, 3) });
946
yield return new object[] { new PointF[1] {
new
(1f, 1f) } };
947
yield return new object[] { new PointF[2] {
new
(1f, 1f),
new
(2f, 2f) } };
998
gpf.AddString("mono", FontFamily.GenericMonospace, 0, 10, new
PointF
(10f, 10f), StringFormat.GenericDefault);
1026
gpf.AddString("mono", FontFamily.GenericMonospace, 0, -10, new
PointF
(10f, 10f), StringFormat.GenericDefault);
1058
gpi.AddString(string.Empty, FontFamily.GenericMonospace, 0, 10, new
PointF
(10f, 10f), StringFormat.GenericDefault);
1069
gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new
PointF
(10f, 10f), StringFormat.GenericDefault));
1652
new
PointF
(0.5f, 0.5f), new
PointF
(3.5f, 0.5f), new
PointF
(3.5f, 3.5f),
1653
new
PointF
(0.5f, 3.5f), new
PointF
(1.5f, 3.0f), new
PointF
(1.0f, 2.5f),
1654
new
PointF
(3.0f, 2.5f), new
PointF
(2.5f, 3.0f), new
PointF
(2.5f, 1.0f),
1655
new
PointF
(3.0f, 1.5f), new
PointF
(1.0f, 1.5f), new
PointF
(1.5f, 1.0f),
2073
new
PointF
(1f, 1f), new
PointF
(2f, 2f)
2088
new
PointF
(2.99990582f, 2.01370716f), new
PointF
(2.99984312f, 2.018276f),
2089
new
PointF
(2.99974918f, 2.02284455f), new
PointF
(2.999624f, 2.027412f),
2104
new
PointF
(1f, 1f), new
PointF
(2f, 2f),
2105
new
PointF
(3f, 3f), new
PointF
(4f, 4f),
2121
new
PointF
(1f, 1f), new
PointF
(1.16666663f, 1.16666663f),
2122
new
PointF
(1.83333325f, 1.83333325f), new
PointF
(2f, 2f)
2146
new
PointF
(1f, 1f), new
PointF
(3f, 1f),
2147
new
PointF
(3f, 3f), new
PointF
(1f, 3f)
2172
new
PointF
(2f, 2f), new
PointF
(2.99990582f, 2.01370716f),
2173
new
PointF
(2.99984312f, 2.018276f), new
PointF
(2.99974918f, 2.02284455f),
2174
new
PointF
(2.999624f, 2.027412f)
2189
new
PointF
(1f, 1f),
2190
new
PointF
(2f, 2f),
2191
new
PointF
(3f, 3f)
2229
new
PointF
(4.2f, 4.5f), new
PointF
(15.8f, 4.5f),
2230
new
PointF
(10.0f, 16.1f), new
PointF
(10.4f, 14.8f),
2231
new
PointF
(9.6f, 14.8f), new
PointF
(14.6f, 4.8f),
2232
new
PointF
(15.0f, 5.5f), new
PointF
(5.0f, 5.5f),
2233
new
PointF
(5.4f, 4.8f)
2260
PointF fPoint =
new
(13.0f, 2.0f);
2288
PointF fPoint =
new
(29.0f, 29.0f);
2354
new
(27.499994f, 10),
2355
new
(28.880707f, 9.999997f),
2356
new
(29.999996f, 11.119284f),
2357
new
(29.999998f, 12.499999f),
2358
new
(29.999998f, 12.499999f),
2359
new
(29.999998f, 12.5f),
2360
new
(29.999998f, 12.5f),
2361
new
(29.999998f, 27.499998f),
2362
new
(29.999998f, 28.88071f),
2363
new
(28.88071f, 29.999998f),
2364
new
(27.5f, 29.999998f),
2365
new
(12.500001f, 29.999998f),
2366
new
(11.119289f, 30),
2367
new
(10.000001f, 28.880713f),
2368
new
(10f, 27.5f),
2369
new
(9.999999f, 12.500001f),
2370
new
(9.999998f, 11.119289f),
2371
new
(11.119286f, 10.000001f),
2372
new
(12.499997f, 9.999999f),
2385
new
(27.499994f, 10),
2386
new
(28.880707f, 9.999997f),
2387
new
(29.999996f, 11.119284f),
2388
new
(29.999998f, 12.499999f),
2389
new
(29.999998f, 12.499999f),
2390
new
(29.999998f, 12.5f),
2391
new
(29.999998f, 12.5f),
2392
new
(29.999998f, 27.499998f),
2393
new
(29.999998f, 28.88071f),
2394
new
(28.88071f, 29.999998f),
2395
new
(27.5f, 29.999998f),
2396
new
(12.500001f, 29.999998f),
2397
new
(11.119289f, 30),
2398
new
(10.000001f, 28.880713f),
2399
new
(10f, 27.5f),
2400
new
(9.999999f, 12.500001f),
2401
new
(9.999998f, 11.119289f),
2402
new
(11.119286f, 10.000001f),
2403
new
(12.499997f, 9.999999f),
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (4)
40
using LinearGradientBrush brush = new(new
PointF
(float.NaN, float.NaN), new
PointF
(float.PositiveInfinity, float.NegativeInfinity), Color.Plum, Color.Red);
70
Assert.Throws<OutOfMemoryException>(() => new LinearGradientBrush(new
PointF
(x, y), new
PointF
(x, y), Color.Fuchsia, Color.GhostWhite));
System\Drawing\Drawing2D\MatrixTests.cs (2)
424
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), 180, new
PointF
(10, 10), MatrixOrder.Prepend, new float[] { -10, -20, -30, -40, 850, 1260 }, null, false };
425
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), 180, new
PointF
(10, 10), MatrixOrder.Append, new float[] { -10, -20, -30, -40, -30, -40 }, null, false };
System\Drawing\Drawing2D\PathGradientBrushTests.cs (5)
114
path.AddLines(new PointF[] {
new
(1, 1) });
219
PointF centralPoint =
new
(float.MaxValue, float.MinValue);
220
PointF defaultCentralPoint =
new
(10.5f, 16f);
899
PointF point =
new
(2.5f, 3.4f);
945
Assert.Equal(new
PointF
(10.5f, 16f), brush.CenterPoint);
System\Drawing\Graphics_DrawLineTests.cs (4)
30
graphics.DrawLines(pen, new PointF[] {
new
(1.0f, 1.0f),
new
(1.0f, 10.0f),
new
(20.0f, 5.0f),
new
(25.0f, 30.0f) });
System\Drawing\Graphics_GetContextTests.Core.cs (9)
50
Assert.Equal(new
PointF
(1, 2), offset);
54
Assert.Equal(new
PointF
(1, 2), offset);
67
Assert.Equal(new
PointF
(1, 2), offset);
72
Assert.Equal(new
PointF
(1, 2), offset);
86
Assert.Equal(new
PointF
(1, 2), offset);
91
Assert.Equal(new
PointF
(1, 2), offset);
107
Assert.Equal(new
PointF
(2, 4), offset);
112
Assert.Equal(new
PointF
(2, 4), offset);
130
Assert.Equal(new
PointF
(2, 4), offset);
System\Drawing\GraphicsTests.cs (6)
1788
new PointF[] {
new
(0.5f, -1.5f), new Point(0, -1) }
1796
new PointF[] {
new
(0.5f, -1.5f), new Point(0, -1) }
1841
var points = new PointF[] {
new
(1, 1) };
1854
AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, new PointF[] {
new
(1, 1) }));
1865
AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, new PointF[] {
new
(1, 1) }));
2829
PointF pointF =
new
(10.5f, 10.5f);
System\Drawing\RegionTests.cs (2)
1416
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new
PointF
(1, 2)));
1420
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new
PointF
(1, 2), s_graphic));
System.Drawing.Primitives (8)
System\Drawing\Point.cs (1)
79
public static implicit operator PointF(Point p) => new
PointF
(p.X, p.Y);
System\Drawing\PointF.cs (5)
81
public static explicit operator PointF(Vector2 vector) => new
PointF
(vector);
120
public static PointF Add(PointF pt, Size sz) => new
PointF
(pt.X + sz.Width, pt.Y + sz.Height);
125
public static PointF Subtract(PointF pt, Size sz) => new
PointF
(pt.X - sz.Width, pt.Y - sz.Height);
130
public static PointF Add(PointF pt, SizeF sz) => new
PointF
(pt.X + sz.Width, pt.Y + sz.Height);
135
public static PointF Subtract(PointF pt, SizeF sz) => new
PointF
(pt.X - sz.Width, pt.Y - sz.Height);
System\Drawing\RectangleF.cs (1)
91
readonly get => new
PointF
(X, Y);
System\Drawing\SizeF.cs (1)
127
public static explicit operator PointF(SizeF size) => new
PointF
(size.Width, size.Height);
System.Private.Windows.Core (1)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
180
value = new
PointF
(classInfo.GetSingle("x"), classInfo.GetSingle("y"));
System.Private.Windows.Core.Tests (2)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
56
new
PointF
(1, 2),
1009
public PointF PointF =
new
(1, 2);
System.Windows.Forms (2)
System\Windows\Forms\ActiveX\AxHost.cs (1)
1090
PointF pcont =
new
(sz.Width, sz.Height);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1125
PointF pcont =
new
(sz.Width, sz.Height);
System.Windows.Forms.Tests (1)
System\Resources\ResxDataNodeTests.cs (1)
90
new
PointF
(1.0f, 2.0f),
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
327
pe.Graphics.DrawString($"Design time \n{Control.Site?.Name} !", Control.Font, SystemBrushes.WindowText, new
PointF
(12, 12));
626 references to PointF
BinaryFormatTests (3)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
35
typeof(
PointF
),
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
184
default(
PointF
),
FormatTests\FormattedObject\HashTableTests.cs (1)
240
{ "Foo", default(
PointF
) }
netstandard (1)
netstandard.cs (1)
750
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
PointF
))]
PresentationCore (2)
System\Windows\Nrbf\SerializationRecordExtensions.cs (2)
32
/// Tries to get this object as a <see cref="
PointF
"/>.
43
|| !classInfo.TypeNameMatches(typeof(
PointF
))
PresentationCore.Tests (12)
FluentAssertions\FluentAssertExtensions.cs (10)
19
/// current <see cref="
PointF
"/>.
21
public static PointFAssertions Should(this
PointF
actualValue) => new(actualValue);
65
/// Asserts a <see cref="
PointF
"/> value approximates another value as close as possible.
71
PointF
expectedValue,
83
/// Asserts that two <see cref="
PointF
"/> collections contain the same items in the same order
87
public static AndConstraint<GenericCollectionAssertions<
PointF
>> BeApproximatelyEquivalentTo(
88
this GenericCollectionAssertions<
PointF
> parent,
89
IEnumerable<
PointF
> expectation,
95
(
PointF
actual,
PointF
expected) =>
FluentAssertions\PointFAssertions.cs (2)
6
public class PointFAssertions(
PointF
value)
8
public
PointF
Subject { get; } = value;
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
176
typeof(
PointF
),
System.Drawing (1)
System.Drawing.cs (1)
107
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
PointF
))]
System.Drawing.Common (237)
Special\Forwards.cs (1)
9
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
PointF
))]
System\Drawing\Drawing2D\GraphicsPath.cs (74)
27
public GraphicsPath(
PointF
[] pts, byte[] types) : this(pts, types, FillMode.Alternate) { }
30
public GraphicsPath(
PointF
[] pts, byte[] types, FillMode fillMode)
41
GraphicsPath(ReadOnlySpan<
PointF
> pts, ReadOnlySpan<byte> types, FillMode fillMode = FillMode.Alternate)
48
fixed (
PointF
* p = pts)
176
Points = new
PointF
[count]
183
fixed (
PointF
* p = pathData.Points)
236
public
PointF
GetLastPoint()
238
PointF
point;
246
public bool IsVisible(
PointF
point) => IsVisible(point, null);
262
public bool IsVisible(
PointF
pt, Graphics? graphics) => IsVisible(pt.X, pt.Y, graphics);
266
public bool IsVisible(Point point) => IsVisible((
PointF
)point, null);
270
public bool IsVisible(Point pt, Graphics? graphics) => IsVisible((
PointF
)pt, graphics);
274
public bool IsOutlineVisible(
PointF
point, Pen pen) => IsOutlineVisible(point, pen, null);
293
public bool IsOutlineVisible(
PointF
pt, Pen pen, Graphics? graphics) => IsOutlineVisible(pt.X, pt.Y, pen, graphics);
301
public bool IsOutlineVisible(Point pt, Pen pen, Graphics? graphics) => IsOutlineVisible((
PointF
)pt, pen, graphics);
303
public void AddLine(
PointF
pt1,
PointF
pt2) => AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y);
324
public void AddLines(params
PointF
[] points) => AddLines(points.OrThrowIfNull().AsSpan());
326
/// <inheritdoc cref="AddLines(
PointF
[])"/>
332
void AddLines(params ReadOnlySpan<
PointF
> points)
339
fixed (
PointF
* p = points)
350
/// <inheritdoc cref="AddLines(
PointF
[])"/>
353
/// <inheritdoc cref="AddLines(
PointF
[])"/>
388
public void AddBezier(
PointF
pt1,
PointF
pt2,
PointF
pt3,
PointF
pt4) =>
401
public void AddBeziers(params
PointF
[] points) => AddBeziers(points.OrThrowIfNull().AsSpan());
403
/// <inheritdoc cref="AddBeziers(
PointF
[])"/>
409
void AddBeziers(params ReadOnlySpan<
PointF
> points)
411
fixed (
PointF
* p = points)
424
/// <inheritdoc cref="AddBeziers(
PointF
[])"/>
427
/// <inheritdoc cref="AddBeziers(
PointF
[])"/>
445
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
446
public void AddCurve(params
PointF
[] points) => AddCurve(points.AsSpan(), 0.5f);
448
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
449
public void AddCurve(
PointF
[] points, float tension) => AddCurve(points.AsSpan(), tension);
465
public void AddCurve(
PointF
[] points, int offset, int numberOfSegments, float tension)
467
fixed (
PointF
* p = points)
482
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
483
public void AddCurve(params ReadOnlySpan<
PointF
> points) => AddCurve(points, 0.5f);
486
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
492
void AddCurve(ReadOnlySpan<
PointF
> points, float tension)
494
fixed (
PointF
* p = points)
506
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
509
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
512
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
530
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
534
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
555
public void AddClosedCurve(params
PointF
[] points) => AddClosedCurve(points, 0.5f);
558
public void AddClosedCurve(
PointF
[] points, float tension) => AddClosedCurve(points.OrThrowIfNull().AsSpan(), tension);
562
public void AddClosedCurve(params ReadOnlySpan<
PointF
> points) => AddClosedCurve(points, 0.5f);
571
void AddClosedCurve(ReadOnlySpan<
PointF
> points, float tension)
573
fixed (
PointF
* p = points)
587
/// <inheritdoc cref="AddCurve(
PointF
[], int, int, float)"/>
731
public void AddPolygon(params
PointF
[] points) => AddPolygon(points.OrThrowIfNull().AsSpan());
739
void AddPolygon(params ReadOnlySpan<
PointF
> points)
741
fixed (
PointF
* p = points)
777
public void AddString(string s, FontFamily family, int style, float emSize,
PointF
origin, StringFormat? format) =>
864
/// <inheritdoc cref="Warp(ReadOnlySpan{
PointF
}, RectangleF, Matrix?, WarpMode, float)"/>
865
public void Warp(
PointF
[] destPoints, RectangleF srcRect) => Warp(destPoints, srcRect, null);
867
/// <inheritdoc cref="Warp(ReadOnlySpan{
PointF
}, RectangleF, Matrix?, WarpMode, float)"/>
868
public void Warp(
PointF
[] destPoints, RectangleF srcRect, Matrix? matrix) =>
871
/// <inheritdoc cref="Warp(ReadOnlySpan{
PointF
}, RectangleF, Matrix?, WarpMode, float)"/>
872
public void Warp(
PointF
[] destPoints, RectangleF srcRect, Matrix? matrix, WarpMode warpMode) =>
875
/// <inheritdoc cref="Warp(ReadOnlySpan{
PointF
}, RectangleF, Matrix?, WarpMode, float)"/>
876
public void Warp(
PointF
[] destPoints, RectangleF srcRect, Matrix? matrix, WarpMode warpMode, float flatness) =>
903
ReadOnlySpan<
PointF
> destPoints,
909
fixed (
PointF
* p = destPoints)
980
public
PointF
[] PathPoints
990
PointF
[] points = new
PointF
[count];
1010
int GetPathPoints(Span<
PointF
> destination)
1017
fixed (
PointF
* p = destination)
System\Drawing\Drawing2D\GraphicsPathIterator.cs (10)
150
/// <inheritdoc cref="CopyData(ref
PointF
[], ref byte[], int, int)"/>
151
public unsafe int Enumerate(ref
PointF
[] points, ref byte[] types)
154
/// <inheritdoc cref="CopyData(ref
PointF
[], ref byte[], int, int)"/>
160
unsafe int Enumerate(Span<
PointF
> points, Span<byte> types)
173
fixed (
PointF
* p = points)
193
/// <param name="points">Upon return, contains <see cref="
PointF
"/> structures that represent the points in the path.</param>
198
public unsafe int CopyData(ref
PointF
[] points, ref byte[] types, int startIndex, int endIndex)
201
/// <inheritdoc cref="CopyData(ref
PointF
[], ref byte[], int, int)"/>
207
unsafe int CopyData(Span<
PointF
> points, Span<byte> types, int startIndex, int endIndex)
221
fixed (
PointF
* p = points)
System\Drawing\Drawing2D\LinearGradientBrush.cs (4)
12
public LinearGradientBrush(
PointF
point1,
PointF
point2, Color color1, Color color2)
25
: this((
PointF
)point1, (
PointF
)point2, color1, color2)
System\Drawing\Drawing2D\Matrix.cs (16)
51
public Matrix(RectangleF rect, params
PointF
[] plgpts)
57
fixed (
PointF
* p = plgpts)
160
internal
PointF
Offset
218
public void RotateAt(float angle,
PointF
point) => RotateAt(angle, point, MatrixOrder.Prepend);
219
public void RotateAt(float angle,
PointF
point, MatrixOrder order)
258
public void TransformPoints(params
PointF
[] pts)
270
void TransformPoints(params ReadOnlySpan<
PointF
> pts)
272
fixed (
PointF
* p = pts)
316
public void TransformVectors(params
PointF
[] pts)
322
/// <inheritdoc cref="TransformVectors(
PointF
[])"/>
328
void TransformVectors(params ReadOnlySpan<
PointF
> pts)
330
fixed (
PointF
* p = pts)
341
/// <inheritdoc cref="TransformVectors(
PointF
[])"/>
345
/// <inheritdoc cref="TransformVectors(
PointF
[])"/>
349
/// <inheritdoc cref="TransformVectors(
PointF
[])"/>
356
/// <inheritdoc cref="TransformVectors(
PointF
[])"/>
System\Drawing\Drawing2D\PathData.cs (1)
10
public
PointF
[]? Points { get; set; }
System\Drawing\Drawing2D\PathGradientBrush.cs (14)
16
public PathGradientBrush(params
PointF
[] points) : this(points, WrapMode.Clamp) { }
19
/// <inheritdoc cref="PathGradientBrush(
PointF
[])"/>
20
public PathGradientBrush(params ReadOnlySpan<
PointF
> points) : this(WrapMode.Clamp, points) { }
27
public PathGradientBrush(
PointF
[] points, WrapMode wrapMode) : this(wrapMode, points.OrThrowIfNull().AsSpan()) { }
29
/// <inheritdoc cref="PathGradientBrush(
PointF
[], WrapMode)"/>
35
PathGradientBrush(WrapMode wrapMode, params ReadOnlySpan<
PointF
> points)
43
fixed (
PointF
* p = points)
56
/// <inheritdoc cref="PathGradientBrush(
PointF
[])"/>
59
/// <inheritdoc cref="PathGradientBrush(
PointF
[])"/>
67
/// <inheritdoc cref="PathGradientBrush(
PointF
[], WrapMode)"/>
70
/// <inheritdoc cref="PathGradientBrush(
PointF
[], WrapMode)"/>
171
public
PointF
CenterPoint
175
PointF
point;
374
public
PointF
FocusScales
System\Drawing\Graphics.cs (111)
596
public bool IsVisible(
PointF
point) => IsVisible(point.X, point.Y);
699
public void DrawBezier(Pen pen,
PointF
pt1,
PointF
pt2,
PointF
pt3,
PointF
pt4) =>
855
public void DrawPolygon(Pen pen, params
PointF
[] points) => DrawPolygon(pen, points.OrThrowIfNull().AsSpan());
863
void DrawPolygon(Pen pen, params ReadOnlySpan<
PointF
> points)
867
fixed (
PointF
* p = points)
915
public void DrawCurve(Pen pen, params
PointF
[] points) => DrawCurve(pen, points.OrThrowIfNull().AsSpan());
923
void DrawCurve(Pen pen, params ReadOnlySpan<
PointF
> points)
927
fixed (
PointF
* p = points)
936
public void DrawCurve(Pen pen,
PointF
[] points, float tension) =>
945
void DrawCurve(Pen pen, ReadOnlySpan<
PointF
> points, float tension)
949
fixed (
PointF
* p = points)
962
public void DrawCurve(Pen pen,
PointF
[] points, int offset, int numberOfSegments) =>
967
public void DrawCurve(Pen pen, ReadOnlySpan<
PointF
> points, int offset, int numberOfSegments) =>
972
public void DrawCurve(Pen pen,
PointF
[] points, int offset, int numberOfSegments, float tension) =>
981
void DrawCurve(Pen pen, ReadOnlySpan<
PointF
> points, int offset, int numberOfSegments, float tension)
985
fixed (
PointF
* p = points)
1081
/// <inheritdoc cref="DrawClosedCurve(Pen,
PointF
[], float, FillMode)"/>
1082
public void DrawClosedCurve(Pen pen, params
PointF
[] points) =>
1085
/// <inheritdoc cref="DrawClosedCurve(Pen,
PointF
[], float, FillMode)"/>
1091
void DrawClosedCurve(Pen pen, params ReadOnlySpan<
PointF
> points)
1095
fixed (
PointF
* p = points)
1113
public void DrawClosedCurve(Pen pen,
PointF
[] points, float tension, FillMode fillmode) =>
1116
/// <inheritdoc cref="DrawClosedCurve(Pen,
PointF
[], float, FillMode)"/>
1122
void DrawClosedCurve(Pen pen, ReadOnlySpan<
PointF
> points, float tension, FillMode fillmode)
1126
fixed (
PointF
* p = points)
1138
/// <inheritdoc cref="DrawClosedCurve(Pen,
PointF
[], float, FillMode)"/>
1141
/// <inheritdoc cref="DrawClosedCurve(Pen,
PointF
[], float, FillMode)"/>
1162
/// <inheritdoc cref="DrawClosedCurve(Pen,
PointF
[], float, FillMode)"/>
1167
/// <inheritdoc cref="DrawClosedCurve(Pen,
PointF
[], float, FillMode)"/>
1295
public void FillPolygon(Brush brush, params
PointF
[] points) => FillPolygon(brush, points, FillMode.Alternate);
1299
public void FillPolygon(Brush brush, params ReadOnlySpan<
PointF
> points) => FillPolygon(brush, points, FillMode.Alternate);
1303
public void FillPolygon(Brush brush,
PointF
[] points, FillMode fillMode) =>
1312
void FillPolygon(Brush brush, ReadOnlySpan<
PointF
> points, FillMode fillMode)
1316
fixed (
PointF
* p = points)
1444
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1445
public void FillClosedCurve(Brush brush, params
PointF
[] points) =>
1448
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1454
void FillClosedCurve(Brush brush, params ReadOnlySpan<
PointF
> points)
1458
fixed (
PointF
* p = points)
1469
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1470
public void FillClosedCurve(Brush brush,
PointF
[] points, FillMode fillmode) =>
1474
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1475
public void FillClosedCurve(Brush brush, ReadOnlySpan<
PointF
> points, FillMode fillmode) =>
1486
public void FillClosedCurve(Brush brush,
PointF
[] points, FillMode fillmode, float tension) =>
1489
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1495
void FillClosedCurve(Brush brush, ReadOnlySpan<
PointF
> points, FillMode fillmode, float tension)
1499
fixed (
PointF
* p = points)
1512
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1516
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1537
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1542
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1548
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1552
/// <inheritdoc cref="FillClosedCurve(Brush,
PointF
[], FillMode, float)"/>
1603
/// <param name="point"><see cref="
PointF
"/>structure that specifies the upper-left corner of the drawn text.</param>
1607
public void DrawString(string? s, Font font, Brush brush,
PointF
point) =>
1611
/// <inheritdoc cref="DrawString(string?, Font, Brush,
PointF
)"/>
1612
public void DrawString(ReadOnlySpan<char> s, Font font, Brush brush,
PointF
point) =>
1648
/// <param name="point"><see cref="
PointF
"/>structure that specifies the upper-left corner of the drawn text.</param>
1656
public void DrawString(string? s, Font font, Brush brush,
PointF
point, StringFormat? format) =>
1660
/// <inheritdoc cref="DrawString(string?, Font, Brush,
PointF
, StringFormat?)"/>
1661
public void DrawString(ReadOnlySpan<char> s, Font font, Brush brush,
PointF
point, StringFormat? format) =>
1826
/// <param name="origin"><see cref="
PointF
"/> structure that represents the upper-left corner of the text.</param>
1828
public SizeF MeasureString(string? text, Font font,
PointF
origin, StringFormat? stringFormat)
1832
/// <inheritdoc cref="MeasureString(string?, Font,
PointF
, StringFormat?)"/>
1833
public SizeF MeasureString(ReadOnlySpan<char> text, Font font,
PointF
origin, StringFormat? stringFormat)
1875
/// the <see cref="DrawString(string?, Font, Brush,
PointF
)"/> method adjusts glyph points to optimize display
1996
public void DrawImage(Image image,
PointF
point) => DrawImage(image, point.X, point.Y);
2044
public void DrawImage(Image image,
PointF
[] destPoints)
2064
fixed (
PointF
* p = destPoints)
2128
public void DrawImage(Image image,
PointF
[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit)
2137
fixed (
PointF
* p = destPoints)
2154
public void DrawImage(Image image,
PointF
[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes? imageAttr) =>
2159
PointF
[] destPoints,
2168
PointF
[] destPoints,
2182
fixed (
PointF
* p = destPoints)
2360
public void DrawLine(Pen pen,
PointF
pt1,
PointF
pt2) => DrawLine(pen, pt1.X, pt1.Y, pt2.X, pt2.Y);
2363
public void DrawLines(Pen pen, params
PointF
[] points) => DrawLines(pen, points.OrThrowIfNull().AsSpan());
2371
void DrawLines(Pen pen, params ReadOnlySpan<
PointF
> points)
2375
fixed (
PointF
* p = points)
2449
public void EnumerateMetafile(Metafile metafile,
PointF
destPoint, EnumerateMetafileProc callback) =>
2452
public void EnumerateMetafile(Metafile metafile,
PointF
destPoint, EnumerateMetafileProc callback, IntPtr callbackData) =>
2473
public void EnumerateMetafile(Metafile metafile,
PointF
[] destPoints, EnumerateMetafileProc callback) =>
2478
PointF
[] destPoints,
2490
PointF
destPoint,
2497
PointF
destPoint,
2550
PointF
[] destPoints,
2557
PointF
[] destPoints,
2585
public void TransformPoints(Drawing2DCoordinateSpace destSpace, Drawing2DCoordinateSpace srcSpace, params
PointF
[] pts)
2591
/// <inheritdoc cref="TransformPoints(Drawing2DCoordinateSpace, Drawing2DCoordinateSpace,
PointF
[])"/>
2597
void TransformPoints(Drawing2DCoordinateSpace destSpace, Drawing2DCoordinateSpace srcSpace, params ReadOnlySpan<
PointF
> pts)
2599
fixed (
PointF
* p = pts)
2610
/// <inheritdoc cref="TransformPoints(Drawing2DCoordinateSpace, Drawing2DCoordinateSpace,
PointF
[])"/>
2617
/// <inheritdoc cref="TransformPoints(Drawing2DCoordinateSpace, Drawing2DCoordinateSpace,
PointF
[])"/>
2789
public void DrawBeziers(Pen pen, params
PointF
[] points) =>
2798
void DrawBeziers(Pen pen, params ReadOnlySpan<
PointF
> points)
2802
fixed (
PointF
* p = points)
2941
PointF
destPoint,
2966
=> EnumerateMetafile(metafile, (
PointF
)destPoint, callback, callbackData, imageAttr);
2998
PointF
[] destPoints,
3008
fixed (
PointF
* p = destPoints)
3056
PointF
destPoint,
3088
(
PointF
)destPoint,
3131
PointF
[] destPoints,
3143
fixed (
PointF
* p = destPoints)
3296
PointF
offset = default;
3361
public void GetContextInfo(out
PointF
offset)
3375
public void GetContextInfo(out
PointF
offset, out Region? clip)
System\Drawing\Icon.cs (2)
367
PointF
offset = transform.Offset;
383
PointF
offset = transform.Offset;
System\Drawing\Internal\GpPathData.cs (1)
12
public
PointF
* Points;
System\Drawing\Region.cs (3)
281
public bool IsVisible(
PointF
point) => IsVisible(point, null);
285
public bool IsVisible(
PointF
point, Graphics? g)
322
public bool IsVisible(Point point, Graphics? g) => IsVisible((
PointF
)point, g);
System.Drawing.Common.Tests (270)
mono\System.Drawing\GraphicsTests.cs (14)
706
private static readonly
PointF
[] s_smallCurveF = [new(0, 0), new(15, 5), new(5, 15)];
708
private static readonly
PointF
[] s_largeCurveF = [new(0, 0), new(15, 5), new(5, 15), new(0, 20)];
2437
Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<
PointF
>()));
2445
Assert.Throws<ArgumentNullException>(() => g.DrawImage(bmp, (
PointF
[])null));
2453
Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<
PointF
>()));
2461
g.DrawImage(bmp, new
PointF
[]
2683
PointF
[] pts = [new(1, 1), new(2, 2), new(3, 3)];
2689
private static void DrawImage_ImagePointFRectangleGraphicsUnit(
PointF
[] pts)
2712
PointF
p = new(1, 1);
2719
PointF
p = new(1, 1);
2726
PointF
p = new(1, 1);
2733
PointF
p = new(1, 1);
2941
PointF
[] ptf = new
PointF
[5];
System\Drawing\Drawing2D\GraphicsPathIteratorTests.cs (26)
30
private readonly
PointF
[] _twoPoints = [new(1, 2), new(20, 30)];
226
PointF
[] points = [];
239
PointF
[] points = [new(1f, 1f), new(2f, 2f), new(3f, 3f), new(4f, 4f)];
242
PointF
[] actualPoints = new
PointF
[4];
254
yield return new object[] { new
PointF
[1], new byte[2] };
255
yield return new object[] { new
PointF
[2], new byte[1] };
260
public void Enumerate_PointsTypesMismatch_ThrowsArgumentException(
PointF
[] points, byte[] types)
274
PointF
[] points = [];
283
yield return new object[] { new
PointF
[1], null };
289
public void Enumerate_NullPointsTypes_ThrowsArgumentNullException(
PointF
[] points, byte[] types)
298
public void CopyData_PointsTypesMismatch_ThrowsArgumentException(
PointF
[] points, byte[] types)
307
public void CopyData_NullPointsTypes_ThrowsArgumentNullException(
PointF
[] points, byte[] types)
319
PointF
[] resultPoints = [];
329
yield return new object[] { new
PointF
[3], new byte[3], int.MinValue, 2 };
330
yield return new object[] { new
PointF
[3], new byte[3], 0, int.MaxValue };
331
yield return new object[] { new
PointF
[3], new byte[3], 2, 0 };
336
public void CopyData_WithData_StartEndIndexesOutOfRange_ThrowsArgumentException(
PointF
[] points, byte[] types, int startIndex, int endIndex)
338
PointF
[] resultPoints = new
PointF
[points.Length];
349
PointF
[] points = [new(1f, 1f), new(2f, 2f), new(3f, 3f), new(4f, 4f)];
352
PointF
[] actualPoints = new
PointF
[1];
365
PointF
[] points = [new(1f, 1f), new(2f, 2f), new(3f, 3f), new(4f, 4f)];
368
PointF
[] actualPoints = new
PointF
[3];
System\Drawing\Drawing2D\GraphicsPathTests.cs (65)
61
PointF
[] fPoints = [
96
AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath(new
PointF
[pointsLength], new byte[typesLength]));
198
PointF
[] points = [
259
gpf.AddLines(new
PointF
[] { new(1, 1), new(2, 2) });
268
gpi.AddLines(new
PointF
[] { new(1, 1) });
272
gpf.AddLines(new
PointF
[] { new(1, 1) });
284
PointF
[] floatPoints = [
317
AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddLines((
PointF
[])null));
324
AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<
PointF
>()));
414
PointF
[] points = [
427
AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddBeziers((
PointF
[])null));
433
yield return new object[] { Array.Empty<
PointF
>() };
434
yield return new object[] { new
PointF
[1] { new(1f, 1f) } };
435
yield return new object[] { new
PointF
[2] { new(1f, 1f), new(2f, 2f) } };
436
yield return new object[] { new
PointF
[3] { new(1f, 1f), new(2f, 2f), new(3f, 3f) } };
441
public void AddBeziers_InvalidFloatPointsLength_ThrowsArgumentException(
PointF
[] points)
451
PointF
[] floatPoints = [new(1, 1), new(2, 2)];
467
PointF
[] floatPoints = [new(1, 1), new(2, 2)];
482
PointF
[] floatPoints = [new(1, 1), new(1, 1)];
501
PointF
[] floatPoints = [new(1, 1), new(2, 2)];
515
PointF
[] points =
524
PointF
[] expectedPoints =
558
AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((
PointF
[])null));
564
yield return new object[] { Array.Empty<
PointF
>() };
565
yield return new object[] { new
PointF
[1] { new(1f, 1f) } };
570
public void AddCurve_InvalidFloatPointsLength_ThrowsArgumentException(
PointF
[] points)
604
() => gp.AddCurve(new
PointF
[2] { new(1f, 1f), new(2f, 2f) }, 0, segment, 0.5f));
615
() => gp.AddCurve(new
PointF
[3] { new(1f, 1f), new(0f, 20f), new(20f, 0f) }, 1, 2, 0.5f));
630
gpf.AddClosedCurve(new
PointF
[3] { new(1, 1), new(2, 2), new(3, 3) });
644
gpf.AddClosedCurve(new
PointF
[3] { new(1, 1), new(1, 1), new(1, 1) });
646
gpf.AddClosedCurve(new
PointF
[3] { new(1, 1), new(1, 1), new(1, 1) });
658
gpf.AddClosedCurve(new
PointF
[3] { new(1, 1), new(2, 2), new(3, 3) }, 0.5f);
666
AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddClosedCurve((
PointF
[])null));
687
yield return new object[] { Array.Empty<
PointF
>() };
688
yield return new object[] { new
PointF
[1] { new(1f, 1f) } };
689
yield return new object[] { new
PointF
[2] { new(1f, 1f), new(2f, 2f) } };
694
public void AddClosedCurve_InvalidFloatPointsLength_ThrowsArgumentException(
PointF
[] points)
722
PointF
endI = gpi.PathPoints[3];
733
PointF
endF = gpf.PathPoints[3];
893
gpf.AddPolygon(new
PointF
[3] { new(1, 1), new(2, 2), new(3, 3) });
918
gpf.AddPolygon(new
PointF
[3] { new(1, 1), new(2, 2), new(3, 3) });
922
gpf.AddPolygon(new
PointF
[3] { new(1, 1), new(2, 2), new(3, 3) });
926
gpf.AddPolygon(new
PointF
[3] { new(1, 1), new(2, 2), new(3, 3) });
930
gpf.AddPolygon(new
PointF
[3] { new(1, 1), new(2, 2), new(3, 3) });
940
AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddPolygon((
PointF
[])null));
945
yield return new object[] { Array.Empty<
PointF
>() };
946
yield return new object[] { new
PointF
[1] { new(1f, 1f) } };
947
yield return new object[] { new
PointF
[2] { new(1f, 1f), new(2f, 2f) } };
952
public void AddPolygon_InvalidFloadPointsLength_ThrowsArgumentException(
PointF
[] points)
1650
PointF
[] expectedPoints =
1742
AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.IsOutlineVisible(default(
PointF
), null));
2071
PointF
[] expectedPoints =
2086
PointF
[] expectedPoints =
2102
PointF
[] expectedPoints =
2119
PointF
[] expectedPoints =
2144
PointF
[] expectedPoints =
2170
PointF
[] expectedPoints =
2187
PointF
[] expectedPoints =
2227
PointF
[] expectedPoints =
2260
PointF
fPoint = new(13.0f, 2.0f);
2288
PointF
fPoint = new(29.0f, 29.0f);
2329
private static void AssertReverse(GraphicsPath gp,
PointF
[] expectedPoints, byte[] expectedTypes)
2332
PointF
[] reversedPoints = gp.PathPoints;
2352
new
PointF
[]
2383
new
PointF
[]
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (1)
24
using LinearGradientBrush brush = new((
PointF
)point1, point2, color1, color2);
System\Drawing\Drawing2D\MatrixTests.cs (38)
119
using Matrix matrix = new(rect, plgpnts.Select(p => (
PointF
)p).ToArray());
140
AssertExtensions.Throws<ArgumentException>(null, () => new Matrix(default, new
PointF
[length]));
148
Assert.Throws<OutOfMemoryException>(() => new Matrix(new RectangleF(1, 1, 0, 1), new
PointF
[3]));
155
Assert.Throws<OutOfMemoryException>(() => new Matrix(new RectangleF(1, 1, 1, 0), new
PointF
[3]));
398
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), 180,
PointF
.Empty, MatrixOrder.Prepend, new float[] { -9.999996f, -19.9999943f, -30.0000019f, -40.0000038f, 50, 60 }, null, false };
399
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), 180,
PointF
.Empty, MatrixOrder.Append, new float[] { -9.999996f, -20, -30f, -40f, -50, -60 }, null, false };
401
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), 540,
PointF
.Empty, MatrixOrder.Prepend, new float[] { -9.999996f, -19.9999943f, -30.0000019f, -40.0000038f, 50, 60 }, null, false };
402
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), 540,
PointF
.Empty, MatrixOrder.Append, new float[] { -9.999996f, -20, -30f, -40f, -50, -60 }, null, false };
404
yield return new object[] { new Matrix(), 45,
PointF
.Empty, MatrixOrder.Prepend, new float[] { 0.707106769f, 0.707106769f, -0.707106829f, 0.707106769f, 0, 0 }, null, false };
405
yield return new object[] { new Matrix(), 45,
PointF
.Empty, MatrixOrder.Append, new float[] { 0.707106769f, 0.707106769f, -0.707106829f, 0.707106769f, 0, 0 }, null, false };
410
yield return new object[] { rotated45.Clone(), 135,
PointF
.Empty, MatrixOrder.Prepend, new float[] { -1, 0, 0, -1, 0, 0 }, null, false };
411
yield return new object[] { rotated45.Clone(), 135,
PointF
.Empty, MatrixOrder.Append, new float[] { -1, 0, 0, -1, 0, 0 }, null, false };
414
yield return new object[] { new Matrix(), 90,
PointF
.Empty, MatrixOrder.Prepend, new float[] { 0, 1, -1, 0, 0, 0 }, null, false };
415
yield return new object[] { new Matrix(), 90,
PointF
.Empty, MatrixOrder.Append, new float[] { 0, 1, -1, 0, 0, 0 }, null, false };
420
yield return new object[] { rotated90.Clone(), 270,
PointF
.Empty, MatrixOrder.Prepend, new float[] { 1, 0, 0, 1, 0, 0 }, null, true };
421
yield return new object[] { rotated90.Clone(), 270,
PointF
.Empty, MatrixOrder.Append, new float[] { 1, 0, 0, 1, 0, 0 }, null, true };
427
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN,
PointF
.Empty, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 }, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, false };
428
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN,
PointF
.Empty, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, null, false };
430
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.PositiveInfinity,
PointF
.Empty, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 }, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, false };
431
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.PositiveInfinity,
PointF
.Empty, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, null, false };
433
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity,
PointF
.Empty, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 }, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, false };
434
yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity,
PointF
.Empty, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, null, false };
439
public void Rotate_Matrix_Success(Matrix matrix, float angle,
PointF
point, MatrixOrder order, float[] expectedElements, float[] expectedElementsRotateAt, bool isIdentity)
494
AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1,
PointF
.Empty));
495
AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1,
PointF
.Empty, MatrixOrder.Append));
504
AssertExtensions.Throws<ArgumentException>(null, () => matrix.RotateAt(1,
PointF
.Empty, order));
720
PointF
[] pointFs = points.Select(p => (
PointF
)p).ToArray();
722
Assert.Equal(expectedPoints.Select(p => (
PointF
)p), pointFs);
731
AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformPoints((
PointF
[])null));
739
AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<
PointF
>()));
748
AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new
PointF
[1]));
775
PointF
[] pointFs = points.Select(p => (
PointF
)p).ToArray();
777
Assert.Equal(expectedPoints.Select(p => (
PointF
)p), pointFs);
798
AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformVectors((
PointF
[])null));
807
AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<
PointF
>()));
817
AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformVectors(new
PointF
[1]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (8)
31
private readonly
PointF
[] _defaultFloatPoints = [new(1, 2), new(20, 30)];
70
AssertExtensions.Throws<ArgumentNullException>("points", () => new PathGradientBrush((
PointF
[])null));
80
Assert.Throws<ArgumentException>(() => new PathGradientBrush(new
PointF
[pointsLength]));
81
Assert.Throws<ArgumentException>(() => new PathGradientBrush(new
PointF
[pointsLength], WrapMode.Clamp));
114
path.AddLines(new
PointF
[] { new(1, 1) });
219
PointF
centralPoint = new(float.MaxValue, float.MinValue);
220
PointF
defaultCentralPoint = new(10.5f, 16f);
899
PointF
point = new(2.5f, 3.4f);
System\Drawing\Graphics_DrawBezierTests.cs (19)
47
PointF
[] points =
67
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null,
PointF
.Empty,
PointF
.Empty,
PointF
.Empty,
PointF
.Empty));
80
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen,
PointF
.Empty,
PointF
.Empty,
PointF
.Empty,
PointF
.Empty));
94
Assert.Throws<InvalidOperationException>(() => graphics.DrawBezier(pen,
PointF
.Empty,
PointF
.Empty,
PointF
.Empty,
PointF
.Empty));
122
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBeziers(null, new
PointF
[2]));
134
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new
PointF
[2]));
144
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawBeziers(pen, (
PointF
[])null));
154
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<
PointF
>()));
167
Assert.Throws<InvalidOperationException>(() => graphics.DrawBeziers(pen, new
PointF
[2]));
184
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new
PointF
[2]));
System\Drawing\Graphics_DrawLineTests.cs (15)
30
graphics.DrawLines(pen, new
PointF
[] { new(1.0f, 1.0f), new(1.0f, 10.0f), new(20.0f, 5.0f), new(25.0f, 30.0f) });
45
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null,
PointF
.Empty,
PointF
.Empty));
59
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen,
PointF
.Empty,
PointF
.Empty));
74
Assert.Throws<InvalidOperationException>(() => graphics.DrawLine(pen,
PointF
.Empty,
PointF
.Empty));
93
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen,
PointF
.Empty,
PointF
.Empty));
103
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLines(null, new
PointF
[2]));
115
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new
PointF
[2]));
125
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawLines(pen, (
PointF
[])null));
137
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new
PointF
[length]));
150
Assert.Throws<InvalidOperationException>(() => graphics.DrawLines(pen, new
PointF
[2]));
167
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new
PointF
[2]));
System\Drawing\Graphics_GetContextTests.Core.cs (7)
16
graphics.GetContextInfo(out
PointF
offset);
32
graphics.GetContextInfo(out
PointF
offset);
49
graphics.GetContextInfo(out
PointF
offset);
66
graphics.GetContextInfo(out
PointF
offset);
85
graphics.GetContextInfo(out
PointF
offset);
106
graphics.GetContextInfo(out
PointF
offset);
125
graphics.GetContextInfo(out
PointF
offset, out Region? clip);
System\Drawing\GraphicsTests.cs (65)
1755
new
PointF
[] { new Point(1, 1), new Point(2, 2) },
1756
new
PointF
[] { new Point(1, 1), new Point(2, 2) }
1763
new
PointF
[] { new Point(1, 1), new Point(2, 2) },
1764
new
PointF
[] { new Point(9, 12), new Point(13, 18) }
1771
new
PointF
[] { new Point(1, 1), new Point(2, 2) },
1772
new
PointF
[] { new Point(1, 1), new Point(2, 2) }
1779
new
PointF
[] { new Point(1, 1), new Point(2, 2) },
1780
new
PointF
[] { new Point(9, 12), new Point(13, 18) }
1787
new
PointF
[] { new Point(1, 1), new Point(2, 2) },
1788
new
PointF
[] { new(0.5f, -1.5f), new Point(0, -1) }
1795
new
PointF
[] { new Point(1, 1), new Point(2, 2) },
1796
new
PointF
[] { new(0.5f, -1.5f), new Point(0, -1) }
1802
public void TransformPoints_PointFs_Success(CoordinateSpace destSpace, CoordinateSpace srcSpace,
PointF
[] points,
PointF
[] expected)
1841
var points = new
PointF
[] { new(1, 1) };
1854
AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, new
PointF
[] { new(1, 1) }));
1865
AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, new
PointF
[] { new(1, 1) }));
1874
AssertExtensions.Throws<ArgumentNullException>("pts", () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, (
PointF
[])null));
1883
AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<
PointF
>()));
1895
Assert.Throws<InvalidOperationException>(() => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [
PointF
.Empty]));
1911
AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [
PointF
.Empty]));
2312
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPolygon(null, new
PointF
[2]));
2324
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new
PointF
[2]));
2334
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawPolygon(pen, (
PointF
[])null));
2346
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new
PointF
[length]));
2359
Assert.Throws<InvalidOperationException>(() => graphics.DrawPolygon(pen, new
PointF
[2]));
2376
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new
PointF
[2]));
2457
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new
PointF
[2]));
2459
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new
PointF
[2], 1));
2460
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new
PointF
[2], 0, 2));
2462
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new
PointF
[2], 0, 2, 1));
2474
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2]));
2476
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2], 1));
2477
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2], 0, 2));
2479
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2], 0, 2, 1));
2489
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (
PointF
[])null));
2491
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (
PointF
[])null, 1));
2494
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (
PointF
[])null, 0, 2, 1));
2506
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[length]));
2508
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[length], 1));
2509
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[length], 0, length));
2511
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[length], 0, length, 1));
2525
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[length], offset, numberOfSegments));
2527
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[length], offset, numberOfSegments, 1));
2540
Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new
PointF
[2]));
2542
Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new
PointF
[2], 1));
2543
Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new
PointF
[2], 0, 2));
2545
Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new
PointF
[2], 0, 2, 1));
2562
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2]));
2564
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2], 1));
2565
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2], 0, 2));
2567
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new
PointF
[2], 0, 2, 1));
2577
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new
PointF
[3]));
2578
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new
PointF
[3], 1, FillMode.Winding));
2591
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new
PointF
[3]));
2592
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new
PointF
[3], 1, FillMode.Winding));
2603
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (
PointF
[])null));
2604
AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (
PointF
[])null, 1, FillMode.Winding));
2618
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new
PointF
[length]));
2619
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new
PointF
[length], 1, FillMode.Winding));
2633
Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new
PointF
[3]));
2634
Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new
PointF
[3], 1, FillMode.Winding));
2652
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new
PointF
[3]));
2653
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new
PointF
[3], 1, FillMode.Alternate));
2829
PointF
pointF = new(10.5f, 10.5f);
System\Drawing\IconConverterTests.cs (4)
43
Assert.False(_icoConv.CanConvertFrom(null, typeof(
PointF
)), "PointF");
56
Assert.False(_icoConvFrmTD.CanConvertFrom(null, typeof(
PointF
)), "TD PointF");
79
Assert.False(_icoConv.CanConvertTo(null, typeof(
PointF
)), "PointF");
97
Assert.False(_icoConvFrmTD.CanConvertTo(null, typeof(
PointF
)), "TD PointF");
System\Drawing\ImageConverterTests.cs (4)
69
Assert.False(_imgConv.CanConvertFrom(null, typeof(
PointF
)), "PointF");
82
Assert.False(_imgConvFrmTD.CanConvertFrom(null, typeof(
PointF
)), "TD PointF");
101
Assert.False(_imgConv.CanConvertTo(null, typeof(
PointF
)), "PointF");
115
Assert.False(_imgConvFrmTD.CanConvertTo(null, typeof(
PointF
)), "TD PointF");
System\Drawing\RegionTests.cs (4)
1388
Assert.Equal(expected, region.IsVisible((
PointF
)point));
1392
Assert.Equal(expected, region.IsVisible((
PointF
)point, s_graphic));
1393
Assert.Equal(expected, region.IsVisible((
PointF
)point, disposedGraphics));
1394
Assert.Equal(expected, region.IsVisible((
PointF
)point, null));
System.Drawing.Primitives (67)
System\Drawing\Point.cs (5)
77
/// Creates a <see cref='System.Drawing.
PointF
'/> with the coordinates of the specified <see cref='System.Drawing.Point'/>
79
public static implicit operator
PointF
(Point p) => new PointF(p.X, p.Y);
123
public static Point Ceiling(
PointF
value) => new Point(unchecked((int)Math.Ceiling(value.X)), unchecked((int)Math.Ceiling(value.Y)));
128
public static Point Truncate(
PointF
value) => new Point(unchecked((int)value.X), unchecked((int)value.Y));
133
public static Point Round(
PointF
value) => new Point(unchecked((int)Math.Round(value.X)), unchecked((int)Math.Round(value.Y)));
System\Drawing\PointF.cs (52)
16
public struct PointF : IEquatable<
PointF
>
19
/// Creates a new instance of the <see cref='System.Drawing.
PointF
'/> class with member data left uninitialized.
21
public static readonly
PointF
Empty;
26
/// Initializes a new instance of the <see cref='System.Drawing.
PointF
'/> class with the specified coordinates.
35
/// Initializes a new instance of the <see cref='System.Drawing.
PointF
'/> struct from the specified
45
/// Creates a new <see cref="System.Numerics.Vector2"/> from this <see cref="System.Drawing.
PointF
"/>.
50
/// Gets a value indicating whether this <see cref='System.Drawing.
PointF
'/> is empty.
56
/// Gets the x-coordinate of this <see cref='System.Drawing.
PointF
'/>.
65
/// Gets the y-coordinate of this <see cref='System.Drawing.
PointF
'/>.
74
/// Converts the specified <see cref="System.Drawing.
PointF
"/> to a <see cref="System.Numerics.Vector2"/>.
76
public static explicit operator Vector2(
PointF
point) => point.ToVector2();
79
/// Converts the specified <see cref="System.Numerics.Vector2"/> to a <see cref="System.Drawing.
PointF
"/>.
81
public static explicit operator
PointF
(Vector2 vector) => new PointF(vector);
84
/// Translates a <see cref='System.Drawing.
PointF
'/> by a given <see cref='System.Drawing.Size'/> .
86
public static
PointF
operator +(
PointF
pt, Size sz) => Add(pt, sz);
89
/// Translates a <see cref='System.Drawing.
PointF
'/> by the negative of a given <see cref='System.Drawing.Size'/> .
91
public static
PointF
operator -(
PointF
pt, Size sz) => Subtract(pt, sz);
94
/// Translates a <see cref='System.Drawing.
PointF
'/> by a given <see cref='System.Drawing.SizeF'/> .
96
public static
PointF
operator +(
PointF
pt, SizeF sz) => Add(pt, sz);
99
/// Translates a <see cref='System.Drawing.
PointF
'/> by the negative of a given <see cref='System.Drawing.SizeF'/> .
101
public static
PointF
operator -(
PointF
pt, SizeF sz) => Subtract(pt, sz);
104
/// Compares two <see cref='System.Drawing.
PointF
'/> objects. The result specifies whether the values of the
105
/// <see cref='System.Drawing.
PointF
.X'/> and <see cref='System.Drawing.
PointF
.Y'/> properties of the two
106
/// <see cref='System.Drawing.
PointF
'/> objects are equal.
108
public static bool operator ==(
PointF
left,
PointF
right) => left.X == right.X && left.Y == right.Y;
111
/// Compares two <see cref='System.Drawing.
PointF
'/> objects. The result specifies whether the values of the
112
/// <see cref='System.Drawing.
PointF
.X'/> or <see cref='System.Drawing.
PointF
.Y'/> properties of the two
113
/// <see cref='System.Drawing.
PointF
'/> objects are unequal.
115
public static bool operator !=(
PointF
left,
PointF
right) => !(left == right);
118
/// Translates a <see cref='System.Drawing.
PointF
'/> by a given <see cref='System.Drawing.Size'/> .
120
public static
PointF
Add(
PointF
pt, Size sz) => new PointF(pt.X + sz.Width, pt.Y + sz.Height);
123
/// Translates a <see cref='System.Drawing.
PointF
'/> by the negative of a given <see cref='System.Drawing.Size'/> .
125
public static
PointF
Subtract(
PointF
pt, Size sz) => new PointF(pt.X - sz.Width, pt.Y - sz.Height);
128
/// Translates a <see cref='System.Drawing.
PointF
'/> by a given <see cref='System.Drawing.SizeF'/> .
130
public static
PointF
Add(
PointF
pt, SizeF sz) => new PointF(pt.X + sz.Width, pt.Y + sz.Height);
133
/// Translates a <see cref='System.Drawing.
PointF
'/> by the negative of a given <see cref='System.Drawing.SizeF'/> .
135
public static
PointF
Subtract(
PointF
pt, SizeF sz) => new PointF(pt.X - sz.Width, pt.Y - sz.Height);
137
public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is
PointF
&& Equals((
PointF
)obj);
139
public readonly bool Equals(
PointF
other) => this == other;
System\Drawing\RectangleF.cs (4)
43
public RectangleF(
PointF
location, SizeF size)
89
public
PointF
Location
214
public readonly bool Contains(
PointF
pt) => Contains(pt.X, pt.Y);
308
public void Offset(
PointF
pos) => Offset(pos.X, pos.Y);
System\Drawing\SizeF.cs (6)
37
/// <see cref='System.Drawing.
PointF
'/>.
39
public SizeF(
PointF
pt)
125
/// Converts the specified <see cref='System.Drawing.SizeF'/> to a <see cref='System.Drawing.
PointF
'/>.
127
public static explicit operator
PointF
(SizeF size) => new PointF(size.Width, size.Height);
173
public readonly
PointF
ToPointF() => (
PointF
)this;
System.Private.Windows.Core (8)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
193
/// Writes a <see cref="
PointF
"/> in binary format.
195
public static void WritePointF(Stream stream,
PointF
value)
200
new ClassInfo(1, typeof(
PointF
).FullName!, s_pointMemberNames),
702
case
PointF
point:
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
88
{ Types.ToTypeName($"{Types.PointFType}"), typeof(
PointF
) },
155
|| type == typeof(
PointF
)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
162
/// Tries to get this object as a <see cref="
PointF
"/>.
173
|| !classInfo.TypeNameMatches(typeof(
PointF
))
System.Private.Windows.Core.Tests (1)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (1)
1009
public
PointF
PointF = new(1, 2);
System.Private.Windows.Core.TestUtilities (12)
FluentAssertions\FluentAssertExtensions.cs (10)
22
/// current <see cref="
PointF
"/>.
24
public static PointFAssertions Should(this
PointF
actualValue) => new(actualValue);
68
/// Asserts a <see cref="
PointF
"/> value approximates another value as close as possible.
74
PointF
expectedValue,
86
/// Asserts that two <see cref="
PointF
"/> collections contain the same items in the same order
90
public static AndConstraint<GenericCollectionAssertions<
PointF
>> BeApproximatelyEquivalentTo(
91
this GenericCollectionAssertions<
PointF
> parent,
92
IEnumerable<
PointF
> expectation,
98
(
PointF
actual,
PointF
expected) =>
FluentAssertions\PointFAssertions.cs (2)
8
public class PointFAssertions(
PointF
value)
10
public
PointF
Subject { get; } = value;
System.Windows.Forms (8)
GlobalUsings.cs (1)
36
global using PointF = System.Drawing.
PointF
;
System\Windows\Forms\ActiveX\AxHost.cs (2)
1077
PointF
pcont = default;
1090
PointF
pcont = new(sz.Width, sz.Height);
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
160
HRESULT IOleControlSite.Interface.TransformCoords(POINTL* pPtlHimetric,
PointF
* pPtfContainer, uint dwFlags)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
1113
PointF
pcont = default;
1125
PointF
pcont = new(sz.Width, sz.Height);
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
82
HRESULT IOleControlSite.Interface.TransformCoords(POINTL* pPtlHimetric,
PointF
* pPtfContainer, uint dwFlags)
System\Windows\Forms\Rendering\DrawingEventArgs.cs (1)
156
graphics.GetContextInfo(out
PointF
offset, out Region? clip);
System.Windows.Forms.Primitives.Tests (1)
System\SpanReaderTests.cs (1)
139
reader.TryRead<
PointF
>(readCount, out _).Should().BeFalse();
System.Windows.Forms.Tests (2)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
232
default(
PointF
),
233
new
PointF
[] { default },