本文整理汇总了C++中CPDF_Path::NotNull方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDF_Path::NotNull方法的具体用法?C++ CPDF_Path::NotNull怎么用?C++ CPDF_Path::NotNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDF_Path
的用法示例。
在下文中一共展示了CPDF_Path::NotNull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddForm
void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) {
if (!m_Options.m_bSeparateForm) {
CPDF_Dictionary* pResources = pStream->GetDict()->GetDict("Resources");
CFX_Matrix form_matrix = pStream->GetDict()->GetMatrix("Matrix");
form_matrix.Concat(m_pCurStates->m_CTM);
CPDF_Array* pBBox = pStream->GetDict()->GetArray("BBox");
CFX_FloatRect form_bbox;
CPDF_Path ClipPath;
if (pBBox) {
form_bbox = pStream->GetDict()->GetRect("BBox");
ClipPath.New();
ClipPath.AppendRect(form_bbox.left, form_bbox.bottom, form_bbox.right,
form_bbox.top);
ClipPath.Transform(&form_matrix);
form_bbox.Transform(&form_matrix);
}
CPDF_StreamContentParser parser(m_pDocument, m_pPageResources, m_pResources,
&m_mtContentToUser, m_pObjectList,
pResources, &form_bbox, &m_Options,
m_pCurStates.get(), m_Level + 1);
parser.m_pCurStates->m_CTM = form_matrix;
if (ClipPath.NotNull()) {
parser.m_pCurStates->m_ClipPath.AppendPath(ClipPath, FXFILL_WINDING,
TRUE);
}
CPDF_StreamAcc stream;
stream.LoadAllData(pStream, FALSE);
if (stream.GetSize() == 0) {
return;
}
parser.Parse(stream.GetData(), stream.GetSize(), 0);
return;
}
CPDF_FormObject* pFormObj = new CPDF_FormObject;
pFormObj->m_pForm =
new CPDF_Form(m_pDocument, m_pPageResources, pStream, m_pResources);
pFormObj->m_FormMatrix = m_pCurStates->m_CTM;
pFormObj->m_FormMatrix.Concat(m_mtContentToUser);
CPDF_AllStates status;
status.m_GeneralState = m_pCurStates->m_GeneralState;
status.m_GraphState = m_pCurStates->m_GraphState;
status.m_ColorState = m_pCurStates->m_ColorState;
status.m_TextState = m_pCurStates->m_TextState;
pFormObj->m_pForm->ParseContent(&status, NULL, NULL, &m_Options, m_Level + 1);
if (!m_pObjectList->m_bBackgroundAlphaNeeded &&
pFormObj->m_pForm->m_bBackgroundAlphaNeeded) {
m_pObjectList->m_bBackgroundAlphaNeeded = TRUE;
}
pFormObj->CalcBoundingBox();
SetGraphicStates(pFormObj, TRUE, TRUE, TRUE);
m_pObjectList->m_ObjectList.AddTail(pFormObj);
}
示例2: Start
void CPDF_ContentParser::Start(CPDF_Form* pForm, CPDF_AllStates* pGraphicStates, CFX_AffineMatrix* pParentMatrix,
CPDF_Type3Char* pType3Char, CPDF_ParseOptions* pOptions, int level)
{
m_pType3Char = pType3Char;
m_pObjects = pForm;
m_bForm = TRUE;
CFX_AffineMatrix form_matrix = pForm->m_pFormDict->GetMatrix(FX_BSTRC("Matrix"));
if (pGraphicStates) {
form_matrix.Concat(pGraphicStates->m_CTM);
}
CPDF_Array* pBBox = pForm->m_pFormDict->GetArray(FX_BSTRC("BBox"));
CFX_FloatRect form_bbox;
CPDF_Path ClipPath;
if (pBBox) {
form_bbox = pBBox->GetRect();
ClipPath.New();
ClipPath.AppendRect(form_bbox.left, form_bbox.bottom, form_bbox.right, form_bbox.top);
ClipPath.Transform(&form_matrix);
if (pParentMatrix) {
ClipPath.Transform(pParentMatrix);
}
form_bbox.Transform(&form_matrix);
}
CPDF_Dictionary* pResources = pForm->m_pFormDict->GetDict(FX_BSTRC("Resources"));
m_pParser = FX_NEW CPDF_StreamContentParser;
m_pParser->Initialize();
m_pParser->PrepareParse(pForm->m_pDocument, pForm->m_pPageResources, pForm->m_pResources, pParentMatrix, pForm,
pResources, &form_bbox, pOptions, pGraphicStates, level);
m_pParser->m_pCurStates->m_CTM = form_matrix;
if (ClipPath.NotNull()) {
m_pParser->m_pCurStates->m_ClipPath.AppendPath(ClipPath, FXFILL_WINDING, TRUE);
}
if (pForm->m_Transparency & PDFTRANS_GROUP) {
CPDF_GeneralStateData* pData = m_pParser->m_pCurStates->m_GeneralState.GetModify();
pData->m_BlendType = FXDIB_BLEND_NORMAL;
pData->m_StrokeAlpha = 1.0f;
pData->m_FillAlpha = 1.0f;
pData->m_pSoftMask = NULL;
}
m_pStreamFilter = pForm->m_pFormStream->GetStreamFilter();
m_nStreams = 1;
m_Status = ToBeContinued;
m_InternalStage = PAGEPARSE_STAGE_PARSE;
m_CurrentOffset = 0;
}