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
CPDF_PageObject Class Referenceabstract

#include <cpdf_pageobject.h>

+ Inheritance diagram for CPDF_PageObject:
+ Collaboration diagram for CPDF_PageObject:

Public Types

enum class  Type {
  kText = 1 , kPath , kImage , kShading ,
  kForm
}
 

Public Member Functions

 CPDF_PageObject (int32_t content_stream)
 
 CPDF_PageObject (const CPDF_PageObject &src)=delete
 
CPDF_PageObjectoperator= (const CPDF_PageObject &src)=delete
 
virtual ~CPDF_PageObject ()
 
virtual Type GetType () const =0
 
virtual void Transform (const CFX_Matrix &matrix)=0
 
virtual bool IsText () const
 
virtual bool IsPath () const
 
virtual bool IsImage () const
 
virtual bool IsShading () const
 
virtual bool IsForm () const
 
virtual CPDF_TextObjectAsText ()
 
virtual const CPDF_TextObjectAsText () const
 
virtual CPDF_PathObjectAsPath ()
 
virtual const CPDF_PathObjectAsPath () const
 
virtual CPDF_ImageObjectAsImage ()
 
virtual const CPDF_ImageObjectAsImage () const
 
virtual CPDF_ShadingObjectAsShading ()
 
virtual const CPDF_ShadingObjectAsShading () const
 
virtual CPDF_FormObjectAsForm ()
 
virtual const CPDF_FormObjectAsForm () const
 
void SetDirty (bool value)
 
bool IsDirty () const
 
void TransformClipPath (const CFX_Matrix &matrix)
 
void TransformGeneralState (const CFX_Matrix &matrix)
 
void SetOriginalRect (const CFX_FloatRect &rect)
 
const CFX_FloatRectGetOriginalRect () const
 
void SetRect (const CFX_FloatRect &rect)
 
const CFX_FloatRectGetRect () const
 
FX_RECT GetBBox () const
 
FX_RECT GetTransformedBBox (const CFX_Matrix &matrix) const
 
CPDF_ContentMarksGetContentMarks ()
 
const CPDF_ContentMarksGetContentMarks () const
 
void SetContentMarks (const CPDF_ContentMarks &marks)
 
int32_t GetContentStream () const
 
void SetContentStream (int32_t new_content_stream)
 
const ByteStringGetResourceName () const
 
void SetResourceName (const ByteString &resource_name)
 
pdfium::span< const ByteStringGetGraphicsResourceNames () const
 
const CPDF_ClipPathclip_path () const
 
CPDF_ClipPathmutable_clip_path ()
 
const CFX_GraphStategraph_state () const
 
CFX_GraphStatemutable_graph_state ()
 
const CPDF_ColorStatecolor_state () const
 
CPDF_ColorStatemutable_color_state ()
 
const CPDF_TextStatetext_state () const
 
CPDF_TextStatemutable_text_state ()
 
const CPDF_GeneralStategeneral_state () const
 
CPDF_GeneralStatemutable_general_state ()
 
const CPDF_GraphicStatesgraphic_states () const
 
void SetDefaultStates ()
 

Static Public Attributes

static constexpr int32_t kNoContentStream = -1
 

Protected Member Functions

void CopyData (const CPDF_PageObject *pSrcObject)
 

Detailed Description

Definition at line 27 of file cpdf_pageobject.h.

Member Enumeration Documentation

◆ Type

enum class CPDF_PageObject::Type
strong
Enumerator
kText 
kPath 
kImage 
kShading 
kForm 

Definition at line 30 of file cpdf_pageobject.h.

Constructor & Destructor Documentation

◆ CPDF_PageObject() [1/2]

CPDF_PageObject::CPDF_PageObject ( int32_t content_stream)
explicit

Definition at line 13 of file cpdf_pageobject.cpp.

Referenced by CPDF_FormObject::CPDF_FormObject(), CPDF_ImageObject::CPDF_ImageObject(), CPDF_PathObject::CPDF_PathObject(), CPDF_ShadingObject::CPDF_ShadingObject(), and CPDF_TextObject::CPDF_TextObject().

+ Here is the caller graph for this function:

◆ CPDF_PageObject() [2/2]

CPDF_PageObject::CPDF_PageObject ( const CPDF_PageObject & src)
delete

◆ ~CPDF_PageObject()

CPDF_PageObject::~CPDF_PageObject ( )
virtualdefault

Member Function Documentation

◆ AsForm() [1/2]

CPDF_FormObject * CPDF_PageObject::AsForm ( )
virtual

Reimplemented in CPDF_FormObject.

Definition at line 70 of file cpdf_pageobject.cpp.

Referenced by FPDFPageObj_GetMatrix(), FPDFPageObj_HasTransparency(), FPDFPageObj_SetMatrix(), and TEST_F().

+ Here is the caller graph for this function:

◆ AsForm() [2/2]

const CPDF_FormObject * CPDF_PageObject::AsForm ( ) const
virtual

Reimplemented in CPDF_FormObject.

Definition at line 74 of file cpdf_pageobject.cpp.

◆ AsImage() [1/2]

CPDF_ImageObject * CPDF_PageObject::AsImage ( )
virtual

Reimplemented in CPDF_ImageObject.

Definition at line 54 of file cpdf_pageobject.cpp.

Referenced by FPDFPageObj_GetMatrix(), FPDFPageObj_GetRotatedBounds(), FPDFPageObj_SetMatrix(), and TEST().

+ Here is the caller graph for this function:

◆ AsImage() [2/2]

const CPDF_ImageObject * CPDF_PageObject::AsImage ( ) const
virtual

Reimplemented in CPDF_ImageObject.

Definition at line 58 of file cpdf_pageobject.cpp.

◆ AsPath() [1/2]

CPDF_PathObject * CPDF_PageObject::AsPath ( )
virtual

Reimplemented in CPDF_PathObject.

Definition at line 46 of file cpdf_pageobject.cpp.

Referenced by FPDFPageObj_GetMatrix(), and FPDFPageObj_SetMatrix().

+ Here is the caller graph for this function:

◆ AsPath() [2/2]

const CPDF_PathObject * CPDF_PageObject::AsPath ( ) const
virtual

Reimplemented in CPDF_PathObject.

Definition at line 50 of file cpdf_pageobject.cpp.

◆ AsShading() [1/2]

CPDF_ShadingObject * CPDF_PageObject::AsShading ( )
virtual

Reimplemented in CPDF_ShadingObject.

Definition at line 62 of file cpdf_pageobject.cpp.

◆ AsShading() [2/2]

const CPDF_ShadingObject * CPDF_PageObject::AsShading ( ) const
virtual

Reimplemented in CPDF_ShadingObject.

Definition at line 66 of file cpdf_pageobject.cpp.

◆ AsText() [1/2]

CPDF_TextObject * CPDF_PageObject::AsText ( )
virtual

Reimplemented in CPDF_TextObject.

Definition at line 38 of file cpdf_pageobject.cpp.

Referenced by FPDFPageObj_GetMatrix(), FPDFPageObj_GetRotatedBounds(), and FPDFPageObj_SetMatrix().

+ Here is the caller graph for this function:

◆ AsText() [2/2]

const CPDF_TextObject * CPDF_PageObject::AsText ( ) const
virtual

Reimplemented in CPDF_TextObject.

Definition at line 42 of file cpdf_pageobject.cpp.

◆ clip_path()

const CPDF_ClipPath & CPDF_PageObject::clip_path ( ) const
inline

Definition at line 100 of file cpdf_pageobject.h.

Referenced by CPDF_ShadingObject::CalcBoundingBox(), CPDF_RenderStatus::ContinueSingleObject(), and CPDF_RenderStatus::RenderSingleObject().

+ Here is the caller graph for this function:

◆ color_state()

const CPDF_ColorState & CPDF_PageObject::color_state ( ) const
inline

Definition at line 112 of file cpdf_pageobject.h.

Referenced by FPDFPageObj_GetFillColor(), FPDFPageObj_GetStrokeColor(), and CPDF_RenderStatus::GetFillArgbForType3().

+ Here is the caller graph for this function:

◆ CopyData()

void CPDF_PageObject::CopyData ( const CPDF_PageObject * pSrcObject)
protected

Definition at line 87 of file cpdf_pageobject.cpp.

References CFX_FloatRect::operator=().

+ Here is the call graph for this function:

◆ general_state()

const CPDF_GeneralState & CPDF_PageObject::general_state ( ) const
inline

Definition at line 126 of file cpdf_pageobject.h.

Referenced by CPDF_RenderStatus::DrawShadingPattern(), FPDFPageObj_GetFillColor(), FPDFPageObj_GetStrokeColor(), FPDFPageObj_HasTransparency(), CPDF_RenderStatus::GetFillArgbForType3(), GetGraphicsResourceNames(), and CPDF_TilingPattern::Load().

+ Here is the caller graph for this function:

◆ GetBBox()

FX_RECT CPDF_PageObject::GetBBox ( ) const

Definition at line 111 of file cpdf_pageobject.cpp.

References CFX_FloatRect::GetOuterRect(), and GetRect().

Referenced by CPDF_ClipPath::GetClipBox().

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

◆ GetContentMarks() [1/2]

CPDF_ContentMarks * CPDF_PageObject::GetContentMarks ( )
inline

Definition at line 75 of file cpdf_pageobject.h.

Referenced by FPDFPageObj_AddMark(), FPDFPageObj_CountMarks(), FPDFPageObj_GetMark(), and FPDFPageObj_RemoveMark().

+ Here is the caller graph for this function:

◆ GetContentMarks() [2/2]

const CPDF_ContentMarks * CPDF_PageObject::GetContentMarks ( ) const
inline

Definition at line 76 of file cpdf_pageobject.h.

Referenced by CPDF_OCContext::CheckPageObjectVisible().

+ Here is the caller graph for this function:

◆ GetContentStream()

int32_t CPDF_PageObject::GetContentStream ( ) const
inline

Definition at line 88 of file cpdf_pageobject.h.

Referenced by CPDF_PageObjectHolder::RemovePageObject(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the caller graph for this function:

◆ GetGraphicsResourceNames()

pdfium::span< const ByteString > CPDF_PageObject::GetGraphicsResourceNames ( ) const

Definition at line 78 of file cpdf_pageobject.cpp.

References general_state(), and CPDF_GeneralState::GetGraphicsResourceNames().

+ Here is the call graph for this function:

◆ GetOriginalRect()

const CFX_FloatRect & CPDF_PageObject::GetOriginalRect ( ) const
inline

Definition at line 69 of file cpdf_pageobject.h.

Referenced by FPDFPageObj_GetRotatedBounds().

+ Here is the caller graph for this function:

◆ GetRect()

const CFX_FloatRect & CPDF_PageObject::GetRect ( ) const
inline

Definition at line 71 of file cpdf_pageobject.h.

Referenced by CPDF_ProgressiveRenderer::Continue(), FPDFImageObj_GetImageMetadata(), FPDFPageObj_GetBounds(), FPDFTextObj_GetRenderedBitmap(), GetBBox(), GetTransformedBBox(), and CPDF_ShadingObject::Transform().

+ Here is the caller graph for this function:

◆ GetResourceName()

const ByteString & CPDF_PageObject::GetResourceName ( ) const
inline

Definition at line 93 of file cpdf_pageobject.h.

◆ GetTransformedBBox()

FX_RECT CPDF_PageObject::GetTransformedBBox ( const CFX_Matrix & matrix) const

Definition at line 115 of file cpdf_pageobject.cpp.

References CFX_FloatRect::GetOuterRect(), GetRect(), and CFX_Matrix::TransformRect().

+ Here is the call graph for this function:

◆ GetType()

virtual Type CPDF_PageObject::GetType ( ) const
pure virtual

Implemented in CPDF_FormObject, CPDF_ImageObject, CPDF_PathObject, CPDF_ShadingObject, and CPDF_TextObject.

Referenced by FPDFPageObj_GetMatrix(), FPDFPageObj_GetRotatedBounds(), FPDFPageObj_GetType(), and FPDFPageObj_SetMatrix().

+ Here is the caller graph for this function:

◆ graph_state()

const CFX_GraphState & CPDF_PageObject::graph_state ( ) const
inline

Definition at line 105 of file cpdf_pageobject.h.

Referenced by CPDF_PathObject::CalcBoundingBox(), FPDFPageObj_GetDashArray(), FPDFPageObj_GetDashCount(), FPDFPageObj_GetDashPhase(), FPDFPageObj_GetLineCap(), FPDFPageObj_GetLineJoin(), and FPDFPageObj_GetStrokeWidth().

+ Here is the caller graph for this function:

◆ graphic_states()

const CPDF_GraphicStates & CPDF_PageObject::graphic_states ( ) const
inline

Definition at line 133 of file cpdf_pageobject.h.

Referenced by CPDF_RenderTiling::Draw().

+ Here is the caller graph for this function:

◆ IsDirty()

bool CPDF_PageObject::IsDirty ( ) const
inline

Definition at line 64 of file cpdf_pageobject.h.

◆ IsForm()

bool CPDF_PageObject::IsForm ( ) const
virtual

Reimplemented in CPDF_FormObject.

Definition at line 34 of file cpdf_pageobject.cpp.

Referenced by CPDF_ProgressiveRenderer::Continue(), and FPDFPageObj_HasTransparency().

+ Here is the caller graph for this function:

◆ IsImage()

bool CPDF_PageObject::IsImage ( ) const
virtual

Reimplemented in CPDF_ImageObject.

Definition at line 26 of file cpdf_pageobject.cpp.

Referenced by CPDF_RenderStatus::ContinueSingleObject().

+ Here is the caller graph for this function:

◆ IsPath()

bool CPDF_PageObject::IsPath ( ) const
virtual

Reimplemented in CPDF_PathObject.

Definition at line 22 of file cpdf_pageobject.cpp.

Referenced by FPDFPageObj_HasTransparency().

+ Here is the caller graph for this function:

◆ IsShading()

bool CPDF_PageObject::IsShading ( ) const
virtual

Reimplemented in CPDF_ShadingObject.

Definition at line 30 of file cpdf_pageobject.cpp.

Referenced by CPDF_ProgressiveRenderer::Continue(), and FPDFPageObj_TransformClipPath().

+ Here is the caller graph for this function:

◆ IsText()

bool CPDF_PageObject::IsText ( ) const
virtual

Reimplemented in CPDF_TextObject.

Definition at line 18 of file cpdf_pageobject.cpp.

◆ mutable_clip_path()

CPDF_ClipPath & CPDF_PageObject::mutable_clip_path ( )
inline

Definition at line 101 of file cpdf_pageobject.h.

Referenced by FPDFPageObj_GetClipPath(), CPDF_ShadingObject::Transform(), and TransformClipPath().

+ Here is the caller graph for this function:

◆ mutable_color_state()

CPDF_ColorState & CPDF_PageObject::mutable_color_state ( )
inline

Definition at line 115 of file cpdf_pageobject.h.

Referenced by FPDFPageObj_SetFillColor(), and FPDFPageObj_SetStrokeColor().

+ Here is the caller graph for this function:

◆ mutable_general_state()

CPDF_GeneralState & CPDF_PageObject::mutable_general_state ( )
inline

Definition at line 129 of file cpdf_pageobject.h.

Referenced by FPDFPageObj_SetBlendMode(), FPDFPageObj_SetFillColor(), FPDFPageObj_SetStrokeColor(), and TransformGeneralState().

+ Here is the caller graph for this function:

◆ mutable_graph_state()

CFX_GraphState & CPDF_PageObject::mutable_graph_state ( )
inline

Definition at line 108 of file cpdf_pageobject.h.

Referenced by FPDFPageObj_SetDashArray(), FPDFPageObj_SetDashPhase(), FPDFPageObj_SetLineCap(), FPDFPageObj_SetLineJoin(), and FPDFPageObj_SetStrokeWidth().

+ Here is the caller graph for this function:

◆ mutable_text_state()

CPDF_TextState & CPDF_PageObject::mutable_text_state ( )
inline

Definition at line 122 of file cpdf_pageobject.h.

Referenced by CPDF_TextObject::SetTextRenderMode().

+ Here is the caller graph for this function:

◆ operator=()

CPDF_PageObject & CPDF_PageObject::operator= ( const CPDF_PageObject & src)
delete

◆ SetContentMarks()

void CPDF_PageObject::SetContentMarks ( const CPDF_ContentMarks & marks)
inline

Definition at line 77 of file cpdf_pageobject.h.

◆ SetContentStream()

void CPDF_PageObject::SetContentStream ( int32_t new_content_stream)
inline

Definition at line 89 of file cpdf_pageobject.h.

◆ SetDefaultStates()

void CPDF_PageObject::SetDefaultStates ( )

Definition at line 83 of file cpdf_pageobject.cpp.

◆ SetDirty()

◆ SetOriginalRect()

void CPDF_PageObject::SetOriginalRect ( const CFX_FloatRect & rect)
inline

Definition at line 68 of file cpdf_pageobject.h.

References CFX_FloatRect::operator=().

Referenced by CPDF_ImageObject::CalcBoundingBox().

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

◆ SetRect()

void CPDF_PageObject::SetRect ( const CFX_FloatRect & rect)
inline

Definition at line 70 of file cpdf_pageobject.h.

References CFX_FloatRect::operator=().

Referenced by CPDF_ImageObject::CalcBoundingBox(), CPDF_PathObject::CalcBoundingBox(), CPDF_ShadingObject::CalcBoundingBox(), and CPDF_ShadingObject::Transform().

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

◆ SetResourceName()

void CPDF_PageObject::SetResourceName ( const ByteString & resource_name)
inline

Definition at line 94 of file cpdf_pageobject.h.

◆ text_state()

const CPDF_TextState & CPDF_PageObject::text_state ( ) const
inline

Definition at line 119 of file cpdf_pageobject.h.

Referenced by CPDF_TextObject::GetFont(), CPDF_TextObject::GetFontSize(), and CPDF_TextObject::GetTextRenderMode().

+ Here is the caller graph for this function:

◆ Transform()

virtual void CPDF_PageObject::Transform ( const CFX_Matrix & matrix)
pure virtual

Implemented in CPDF_FormObject, CPDF_ImageObject, CPDF_PathObject, CPDF_ShadingObject, and CPDF_TextObject.

Referenced by FPDFPageObj_Transform().

+ Here is the caller graph for this function:

◆ TransformClipPath()

void CPDF_PageObject::TransformClipPath ( const CFX_Matrix & matrix)

Definition at line 93 of file cpdf_pageobject.cpp.

References CPDF_ClipPath::HasRef(), mutable_clip_path(), SetDirty(), and CPDF_ClipPath::Transform().

Referenced by FPDFPageObj_TransformClipPath().

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

◆ TransformGeneralState()

void CPDF_PageObject::TransformGeneralState ( const CFX_Matrix & matrix)

Definition at line 102 of file cpdf_pageobject.cpp.

References CFX_Matrix::Concat(), CPDF_GeneralState::GetMutableMatrix(), CPDF_GeneralState::HasRef(), mutable_general_state(), and SetDirty().

Referenced by FPDFPageObj_TransformClipPath().

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

Member Data Documentation

◆ kNoContentStream

int32_t CPDF_PageObject::kNoContentStream = -1
staticconstexpr

The documentation for this class was generated from the following files: