Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fpdf_transformpage.cpp File Reference

(9c1f44f67466fea2fb20bb6f31fea388d8c65961)

+ Include dependency graph for fpdf_transformpage.cpp:

Go to the source code of this file.

Functions

FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetMediaBox (FPDF_PAGE page, float left, float bottom, float right, float top)
 
FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetCropBox (FPDF_PAGE page, float left, float bottom, float right, float top)
 
FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetBleedBox (FPDF_PAGE page, float left, float bottom, float right, float top)
 
FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetTrimBox (FPDF_PAGE page, float left, float bottom, float right, float top)
 
FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetArtBox (FPDF_PAGE page, float left, float bottom, float right, float top)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetMediaBox (FPDF_PAGE page, float *left, float *bottom, float *right, float *top)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetCropBox (FPDF_PAGE page, float *left, float *bottom, float *right, float *top)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetBleedBox (FPDF_PAGE page, float *left, float *bottom, float *right, float *top)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetTrimBox (FPDF_PAGE page, float *left, float *bottom, float *right, float *top)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetArtBox (FPDF_PAGE page, float *left, float *bottom, float *right, float *top)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_TransFormWithClip (FPDF_PAGE page, const FS_MATRIX *matrix, const FS_RECTF *clipRect)
 
FPDF_EXPORT void FPDF_CALLCONV FPDFPageObj_TransformClipPath (FPDF_PAGEOBJECT page_object, double a, double b, double c, double d, double e, double f)
 
FPDF_EXPORT FPDF_CLIPPATH FPDF_CALLCONV FPDFPageObj_GetClipPath (FPDF_PAGEOBJECT page_object)
 
FPDF_EXPORT int FPDF_CALLCONV FPDFClipPath_CountPaths (FPDF_CLIPPATH clip_path)
 
FPDF_EXPORT int FPDF_CALLCONV FPDFClipPath_CountPathSegments (FPDF_CLIPPATH clip_path, int path_index)
 
FPDF_EXPORT FPDF_PATHSEGMENT FPDF_CALLCONV FPDFClipPath_GetPathSegment (FPDF_CLIPPATH clip_path, int path_index, int segment_index)
 
FPDF_EXPORT FPDF_CLIPPATH FPDF_CALLCONV FPDF_CreateClipPath (float left, float bottom, float right, float top)
 
FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyClipPath (FPDF_CLIPPATH clipPath)
 
FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertClipPath (FPDF_PAGE page, FPDF_CLIPPATH clipPath)
 

Function Documentation

◆ FPDF_CreateClipPath()

FPDF_EXPORT FPDF_CLIPPATH FPDF_CALLCONV FPDF_CreateClipPath ( float left,
float bottom,
float right,
float top )

Create a new clip path, with a rectangle inserted.

Caller takes ownership of the returned FPDF_CLIPPATH. It should be freed with FPDF_DestroyClipPath().

left - The left of the clip box. bottom - The bottom of the clip box. right - The right of the clip box. top - The top of the clip box.

Definition at line 357 of file fpdf_transformpage.cpp.

References CPDF_Path::AppendRect(), and CFX_FillRenderOptions::kEvenOdd.

Referenced by CheckPDFiumCApi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDF_DestroyClipPath()

FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyClipPath ( FPDF_CLIPPATH clipPath)

Destroy the clip path.

clipPath - A handle to the clip path. It will be invalid after this call.

Definition at line 371 of file fpdf_transformpage.cpp.

Referenced by CheckPDFiumCApi(), and FPDFClipPathDeleter::operator()().

+ Here is the caller graph for this function:

◆ FPDFClipPath_CountPaths()

FPDF_EXPORT int FPDF_CALLCONV FPDFClipPath_CountPaths ( FPDF_CLIPPATH clip_path)

Definition at line 314 of file fpdf_transformpage.cpp.

References CPDFClipPathFromFPDFClipPath(), and CPDF_ClipPath::HasRef().

Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFClipPath_CountPathSegments()

FPDF_EXPORT int FPDF_CALLCONV FPDFClipPath_CountPathSegments ( FPDF_CLIPPATH clip_path,
int path_index )

Definition at line 323 of file fpdf_transformpage.cpp.

References CPDFClipPathFromFPDFClipPath(), and CPDF_ClipPath::HasRef().

Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFClipPath_GetPathSegment()

FPDF_EXPORT FPDF_PATHSEGMENT FPDF_CALLCONV FPDFClipPath_GetPathSegment ( FPDF_CLIPPATH clip_path,
int path_index,
int segment_index )

Definition at line 337 of file fpdf_transformpage.cpp.

References CPDFClipPathFromFPDFClipPath(), and CPDF_ClipPath::HasRef().

Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_GetArtBox()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetArtBox ( FPDF_PAGE page,
float * left,
float * bottom,
float * right,
float * top )

Get "ArtBox" entry from the page dictionary.

page - Handle to a page. left - Pointer to a float value receiving the left of the rectangle. bottom - Pointer to a float value receiving the bottom of the rectangle. right - Pointer to a float value receiving the right of the rectangle. top - Pointer to a float value receiving the top of the rectangle.

On success, return true and write to the out parameters. Otherwise return false and leave the out parameters unmodified.

Definition at line 191 of file fpdf_transformpage.cpp.

References CPDFPageFromFPDFPage(), and pdfium::page_object::kArtBox.

Referenced by CheckPDFiumCApi(), DumpPageInfo(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_GetBleedBox()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetBleedBox ( FPDF_PAGE page,
float * left,
float * bottom,
float * right,
float * top )

Get "BleedBox" entry from the page dictionary.

page - Handle to a page. left - Pointer to a float value receiving the left of the rectangle. bottom - Pointer to a float value receiving the bottom of the rectangle. right - Pointer to a float value receiving the right of the rectangle. top - Pointer to a float value receiving the top of the rectangle.

On success, return true and write to the out parameters. Otherwise return false and leave the out parameters unmodified.

Definition at line 171 of file fpdf_transformpage.cpp.

References CPDFPageFromFPDFPage(), and pdfium::page_object::kBleedBox.

Referenced by CheckPDFiumCApi(), DumpPageInfo(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_GetCropBox()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetCropBox ( FPDF_PAGE page,
float * left,
float * bottom,
float * right,
float * top )

Get "CropBox" entry from the page dictionary.

page - Handle to a page. left - Pointer to a float value receiving the left of the rectangle. bottom - Pointer to a float value receiving the bottom of the rectangle. right - Pointer to a float value receiving the right of the rectangle. top - Pointer to a float value receiving the top of the rectangle.

On success, return true and write to the out parameters. Otherwise return false and leave the out parameters unmodified.

Definition at line 161 of file fpdf_transformpage.cpp.

References CPDFPageFromFPDFPage(), and pdfium::page_object::kCropBox.

Referenced by CheckPDFiumCApi(), DumpPageInfo(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_GetMediaBox()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetMediaBox ( FPDF_PAGE page,
float * left,
float * bottom,
float * right,
float * top )

Get "MediaBox" entry from the page dictionary.

page - Handle to a page. left - Pointer to a float value receiving the left of the rectangle. bottom - Pointer to a float value receiving the bottom of the rectangle. right - Pointer to a float value receiving the right of the rectangle. top - Pointer to a float value receiving the top of the rectangle.

On success, return true and write to the out parameters. Otherwise return false and leave the out parameters unmodified.

Definition at line 151 of file fpdf_transformpage.cpp.

References CPDFPageFromFPDFPage(), and pdfium::page_object::kMediaBox.

Referenced by CheckPDFiumCApi(), DumpPageInfo(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_GetTrimBox()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetTrimBox ( FPDF_PAGE page,
float * left,
float * bottom,
float * right,
float * top )

Get "TrimBox" entry from the page dictionary.

page - Handle to a page. left - Pointer to a float value receiving the left of the rectangle. bottom - Pointer to a float value receiving the bottom of the rectangle. right - Pointer to a float value receiving the right of the rectangle. top - Pointer to a float value receiving the top of the rectangle.

On success, return true and write to the out parameters. Otherwise return false and leave the out parameters unmodified.

Definition at line 181 of file fpdf_transformpage.cpp.

References CPDFPageFromFPDFPage(), and pdfium::page_object::kTrimBox.

Referenced by CheckPDFiumCApi(), DumpPageInfo(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_InsertClipPath()

FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertClipPath ( FPDF_PAGE page,
FPDF_CLIPPATH clipPath )

Clip the page content, the page content that outside the clipping region become invisible.

A clip path will be inserted before the page content stream or content array. In this way, the page content will be clipped by this clip path.

page - A page handle. clipPath - A handle to the clip path. (Does not take ownership.)

Definition at line 376 of file fpdf_transformpage.cpp.

References CPDFClipPathFromFPDFClipPath(), CPDFPageFromFPDFPage(), CPDF_Page::GetDocument(), pdfium::page_object::kContents, and CFX_FillRenderOptions::kWinding.

Referenced by CheckPDFiumCApi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_SetArtBox()

FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetArtBox ( FPDF_PAGE page,
float left,
float bottom,
float right,
float top )

Set "ArtBox" entry to the page dictionary.

page - Handle to a page. left - The left of the rectangle. bottom - The bottom of the rectangle. right - The right of the rectangle. top - The top of the rectangle.

Definition at line 142 of file fpdf_transformpage.cpp.

References CFX_FloatRect::CFX_FloatRect(), CPDFPageFromFPDFPage(), and pdfium::page_object::kArtBox.

Referenced by CheckPDFiumCApi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_SetBleedBox()

FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetBleedBox ( FPDF_PAGE page,
float left,
float bottom,
float right,
float top )

Set "BleedBox" entry to the page dictionary.

page - Handle to a page. left - The left of the rectangle. bottom - The bottom of the rectangle. right - The right of the rectangle. top - The top of the rectangle.

Definition at line 124 of file fpdf_transformpage.cpp.

References CFX_FloatRect::CFX_FloatRect(), CPDFPageFromFPDFPage(), and pdfium::page_object::kBleedBox.

Referenced by CheckPDFiumCApi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_SetCropBox()

FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetCropBox ( FPDF_PAGE page,
float left,
float bottom,
float right,
float top )

Set "CropBox" entry to the page dictionary.

page - Handle to a page. left - The left of the rectangle. bottom - The bottom of the rectangle. right - The right of the rectangle. top - The top of the rectangle.

Definition at line 115 of file fpdf_transformpage.cpp.

References CFX_FloatRect::CFX_FloatRect(), CPDFPageFromFPDFPage(), and pdfium::page_object::kCropBox.

Referenced by CheckPDFiumCApi(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_SetMediaBox()

FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetMediaBox ( FPDF_PAGE page,
float left,
float bottom,
float right,
float top )

Set "MediaBox" entry to the page dictionary.

page - Handle to a page. left - The left of the rectangle. bottom - The bottom of the rectangle. right - The right of the rectangle. top - The top of the rectangle.

Definition at line 106 of file fpdf_transformpage.cpp.

References CFX_FloatRect::CFX_FloatRect(), CPDFPageFromFPDFPage(), and pdfium::page_object::kMediaBox.

Referenced by CheckPDFiumCApi(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_SetTrimBox()

FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetTrimBox ( FPDF_PAGE page,
float left,
float bottom,
float right,
float top )

Set "TrimBox" entry to the page dictionary.

page - Handle to a page. left - The left of the rectangle. bottom - The bottom of the rectangle. right - The right of the rectangle. top - The top of the rectangle.

Definition at line 133 of file fpdf_transformpage.cpp.

References CFX_FloatRect::CFX_FloatRect(), CPDFPageFromFPDFPage(), and pdfium::page_object::kTrimBox.

Referenced by CheckPDFiumCApi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPage_TransFormWithClip()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_TransFormWithClip ( FPDF_PAGE page,
const FS_MATRIX * matrix,
const FS_RECTF * clipRect )

Apply transforms to |page|.

If |matrix| is provided it will be applied to transform the page. If |clipRect| is provided it will be used to clip the resulting page. If neither |matrix| or |clipRect| are provided this method returns |false|. Returns |true| if transforms are applied.

This function will transform the whole page, and would take effect to all the objects in the page.

page - Page handle. matrix - Transform matrix. clipRect - Clipping rectangle.

Definition at line 201 of file fpdf_transformpage.cpp.

References CFXFloatRectFromFSRectF(), CFXMatrixFromFSMatrix(), CPDFPageFromFPDFPage(), CPDF_Page::GetDocument(), pdfium::page_object::kContents, and CFX_FloatRect::Normalize().

Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPageObj_GetClipPath()

FPDF_EXPORT FPDF_CLIPPATH FPDF_CALLCONV FPDFPageObj_GetClipPath ( FPDF_PAGEOBJECT page_object)

Definition at line 306 of file fpdf_transformpage.cpp.

References CPDFPageObjectFromFPDFPageObject(), FPDFClipPathFromCPDFClipPath(), and CPDF_PageObject::mutable_clip_path().

Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FPDFPageObj_TransformClipPath()

FPDF_EXPORT void FPDF_CALLCONV FPDFPageObj_TransformClipPath ( FPDF_PAGEOBJECT page_object,
double a,
double b,
double c,
double d,
double e,
double f )

Transform (scale, rotate, shear, move) the clip path of page object. page_object - Handle to a page object. Returned by FPDFPageObj_NewImageObj().

a - The coefficient "a" of the matrix. b - The coefficient "b" of the matrix. c - The coefficient "c" of the matrix. d - The coefficient "d" of the matrix. e - The coefficient "e" of the matrix. f - The coefficient "f" of the matrix.

Definition at line 285 of file fpdf_transformpage.cpp.

References CFX_Matrix::CFX_Matrix(), CPDFPageObjectFromFPDFPageObject(), CPDF_PageObject::IsShading(), CPDF_PageObject::TransformClipPath(), and CPDF_PageObject::TransformGeneralState().

Referenced by CheckPDFiumCApi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: