#12 performance optimizations for type 1 fonts and other tweaks

This commit is contained in:
Eliot Jones
2018-11-25 11:37:00 +00:00
parent 87fccbbadc
commit 3f3badb7b4
5 changed files with 143 additions and 59 deletions

View File

@@ -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++)
{