procedure TransformPageObject(Index: Integer; const Matrix: FS_MATRIX);
| Index | Integer. 要變換之頁面物件以零為基底的索引 |
| Matrix | FS_MATRIX. 要套用的變換,欄位 a、b、c、d、e、f 遵循 PDF 矩陣順序。平移量位於 e 與 f,以點為單位 |
是將 Matrix 串接到物件既有的矩陣上,而不是取代它,因此重複呼叫會累積。若要改設定絕對矩陣,請透過 UpdatePageObject 以 pocMatrix 把 PageObjectInfo 的 Matrix 欄位寫回
單位矩陣為 (1, 0, 0, 1, 0, 0)。平移 dx、dy 點是 (1, 0, 0, 1, dx, dy);以 sx、sy 縮放是 (sx, 0, 0, sy, 0, 0);旋轉某個角度則在 a、b、c、d 使用餘弦與正弦
只有該物件會移動。若要連同標註在內變換整個頁面,請使用 TransformPageContent 與 TransformPageAnnotations
var M: FS_MATRIX;
M.a := 1; M.b := 0; M.c := 0; M.d := 1;
M.e := 72; M.f := 0; // shift one inch to the right
Pdf.TransformPageObject(0, M);
Pdf.UpdatePage;