本文整理汇总了C++中CFX_AffineMatrix::IsIdentity方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_AffineMatrix::IsIdentity方法的具体用法?C++ CFX_AffineMatrix::IsIdentity怎么用?C++ CFX_AffineMatrix::IsIdentity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_AffineMatrix
的用法示例。
在下文中一共展示了CFX_AffineMatrix::IsIdentity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
if (!pAnnotAP)continue;
CPDF_Stream* pAPStream = pAnnotAP->GetStream("N");
if (!pAPStream)
{
CPDF_Dictionary* pAPDic = pAnnotAP->GetDict("N");
if (!pAPDic)continue;
if (!sAnnotState.IsEmpty())
{
pAPStream = pAPDic->GetStream(sAnnotState);
}
else
{
FX_POSITION pos = pAPDic->GetStartPos();
if (pos)
{
CFX_ByteString sKey;
CPDF_Object* pFirstObj = pAPDic->GetNextElement(pos, sKey);
if (pFirstObj)
{
if (pFirstObj->GetType() == PDFOBJ_REFERENCE)
pFirstObj = pFirstObj->GetDirect();
if (pFirstObj->GetType() != PDFOBJ_STREAM)
continue;
pAPStream = (CPDF_Stream*)pFirstObj;
}
}
}
}
if (!pAPStream)continue;
CPDF_Dictionary* pAPDic = pAPStream->GetDict();
CFX_AffineMatrix matrix = pAPDic->GetMatrix("Matrix");
CPDF_Rect rcStream;
if (pAPDic->KeyExist("Rect"))
rcStream = pAPDic->GetRect("Rect");
else if (pAPDic->KeyExist("BBox"))
rcStream = pAPDic->GetRect("BBox");
if (rcStream.IsEmpty())continue;
CPDF_Object* pObj = pAPStream;
if (pObj)
{
CPDF_Dictionary* pObjDic = pObj->GetDict();
if (pObjDic)
{
pObjDic->SetAtName("Type", "XObject");
pObjDic->SetAtName("Subtype", "Form");
}
}
CPDF_Dictionary* pXObject = pNewXORes->GetDict("XObject");
if (!pXObject)
{
pXObject = FX_NEW CPDF_Dictionary;
pNewXORes->SetAt("XObject", pXObject);
}
CFX_ByteString sFormName;
sFormName.Format("F%d", i);
FX_DWORD dwObjNum = pDocument->AddIndirectObject(pObj);
pXObject->SetAtReference(sFormName, pDocument, dwObjNum);
CPDF_StreamAcc acc;
acc.LoadAllData(pNewXObject);
FX_LPCBYTE pData = acc.GetData();
CFX_ByteString sStream(pData, acc.GetSize());
CFX_ByteString sTemp;
if (matrix.IsIdentity())
{
matrix.a = 1.0f;
matrix.b = 0.0f;
matrix.c = 0.0f;
matrix.d = 1.0f;
matrix.e = 0.0f;
matrix.f = 0.0f;
}
CFX_AffineMatrix m = GetMatrix(rcAnnot, rcStream, matrix);
sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f, sFormName.c_str());
sStream += sTemp;
pNewXObject->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
}
pPageDict->RemoveAt( "Annots" );
ObjectArray.RemoveAll();
RectArray.RemoveAll();
return FLATTEN_SUCCESS;
}