mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-07-18 23:28:22 +08:00
35 lines
634 B
C#
35 lines
634 B
C#
![]() |
namespace UglyToad.Pdf.Geometry
|
|||
|
{
|
|||
|
public struct PdfPoint
|
|||
|
{
|
|||
|
public static PdfPoint Origin = new PdfPoint(0m, 0m);
|
|||
|
|
|||
|
public decimal X { get; }
|
|||
|
|
|||
|
public decimal Y { get; }
|
|||
|
|
|||
|
public PdfPoint(decimal x, decimal y)
|
|||
|
{
|
|||
|
X = x;
|
|||
|
Y = y;
|
|||
|
}
|
|||
|
|
|||
|
public PdfPoint(int x, int y)
|
|||
|
{
|
|||
|
X = x;
|
|||
|
Y = y;
|
|||
|
}
|
|||
|
|
|||
|
public PdfPoint(double x, double y)
|
|||
|
{
|
|||
|
X = (decimal)x;
|
|||
|
Y = (decimal)y;
|
|||
|
}
|
|||
|
|
|||
|
public override string ToString()
|
|||
|
{
|
|||
|
return $"(x:{X}, y:{Y})";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|