mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-20 19:03:20 +08:00
#12 performance optimizations for type 1 fonts and other tweaks
This commit is contained in:
@@ -93,6 +93,14 @@
|
||||
return new PdfPoint(x, y);
|
||||
}
|
||||
|
||||
[Pure]
|
||||
public decimal TransformX(decimal x)
|
||||
{
|
||||
var xt = A * x + C * 0 + E;
|
||||
|
||||
return xt;
|
||||
}
|
||||
|
||||
[Pure]
|
||||
public PdfVector Transform(PdfVector original)
|
||||
{
|
||||
@@ -106,10 +114,10 @@
|
||||
public PdfRectangle Transform(PdfRectangle original)
|
||||
{
|
||||
return new PdfRectangle(
|
||||
Transform(original.TopLeft.ToVector()),
|
||||
Transform(original.TopRight.ToVector()),
|
||||
Transform(original.BottomLeft.ToVector()),
|
||||
Transform(original.BottomRight.ToVector())
|
||||
Transform(original.TopLeft),
|
||||
Transform(original.TopRight),
|
||||
Transform(original.BottomLeft),
|
||||
Transform(original.BottomRight)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -151,9 +159,11 @@
|
||||
|
||||
for (int i = 0; i < Rows; i++)
|
||||
{
|
||||
var rowIndexPart = i * Rows;
|
||||
|
||||
for (int j = 0; j < Columns; j++)
|
||||
{
|
||||
var index = (i * Rows) + j;
|
||||
var index = rowIndexPart + j;
|
||||
|
||||
for (int x = 0; x < Rows; x++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user