CFX_ByteString CPWL_Image::GetImageAppStream() { CFX_ByteTextBuf sAppStream; CFX_ByteString sAlias = GetImageAlias(); CFX_FloatRect rcPlate = GetClientRect(); CFX_Matrix mt; mt.SetReverse(GetImageMatrix()); FX_FLOAT fHScale = 1.0f; FX_FLOAT fVScale = 1.0f; GetScale(fHScale, fVScale); FX_FLOAT fx = 0.0f; FX_FLOAT fy = 0.0f; GetImageOffset(fx, fy); if (m_pPDFStream && sAlias.GetLength() > 0) { sAppStream << "q\n"; sAppStream << rcPlate.left << " " << rcPlate.bottom << " " << rcPlate.right - rcPlate.left << " " << rcPlate.top - rcPlate.bottom << " re W n\n"; sAppStream << fHScale << " 0 0 " << fVScale << " " << rcPlate.left + fx << " " << rcPlate.bottom + fy << " cm\n"; sAppStream << mt.GetA() << " " << mt.GetB() << " " << mt.GetC() << " " << mt.GetD() << " " << mt.GetE() << " " << mt.GetF() << " cm\n"; sAppStream << "0 g 0 G 1 w /" << sAlias.AsStringC() << " Do\n" << "Q\n"; } return sAppStream.MakeString(); }
CFX_ByteString CPWL_Edit::GetTextAppearanceStream( const CFX_PointF& ptOffset) const { CFX_ByteTextBuf sRet; CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit.get(), ptOffset); if (sEdit.GetLength() > 0) { sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() << sEdit.AsStringC() << "ET\n"; } return sRet.MakeString(); }
CFX_ByteString CPWL_Caret::GetCaretAppearanceStream( const CFX_FloatPoint& ptOffset) { CFX_ByteTextBuf sCaret; GetCaretApp(sCaret, ptOffset); return sCaret.MakeString(); }