From 923948632fe798d1c17000803d9d4b1559b4ffa1 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Thu, 11 Jan 2018 21:30:48 +0000 Subject: Improve documentation of FPDF_RenderPageBitmapWithMatrix. Change-Id: I5cb28dfd6b1e5670fc20093c5d2f9757ad6a4060 Reviewed-on: https://pdfium-review.googlesource.com/22830 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- public/fpdfview.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/public/fpdfview.h b/public/fpdfview.h index 1cd3d6d194..697801231f 100644 --- a/public/fpdfview.h +++ b/public/fpdfview.h @@ -112,7 +112,14 @@ typedef struct _FPDF_BSTR { // system wide string by yourself. typedef const char* FPDF_STRING; -// Matrix for transformation. +// Matrix for transformation, in the form [a b c d e f], equivalent to: +// | a b 0 | +// | c d 0 | +// | e f 1 | +// +// Translation is performed with [1 0 0 1 tx ty]. +// Scaling is performed with [sx 0 0 sy 0 0]. +// See PDF Reference 1.7, 4.2.2 Common Transformations for more. typedef struct _FS_MATRIX_ { float a; float b; @@ -667,9 +674,10 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, // output buffer). The bitmap handle can be created // by FPDFBitmap_Create or retrieved by // FPDFImageObj_GetBitmap. -// page - Handle to the page. Returned by FPDF_LoadPage -// matrix - The transform matrix. It must be invertible. -// clipping - The rect to clip to. +// page - Handle to the page. Returned by FPDF_LoadPage. +// matrix - The transform matrix, which must be invertible. +// See PDF Reference 1.7, 4.2.2 Common Transformations. +// clipping - The rect to clip to in page coords. // flags - 0 for normal display, or combination of the Page // Rendering flags defined above. With the FPDF_ANNOT // flag, it renders all annotations that do not require -- cgit v1.2.3