本文整理汇总了C++中CFX_ByteTextBuf::GetByteString方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_ByteTextBuf::GetByteString方法的具体用法?C++ CFX_ByteTextBuf::GetByteString怎么用?C++ CFX_ByteTextBuf::GetByteString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_ByteTextBuf
的用法示例。
在下文中一共展示了CFX_ByteTextBuf::GetByteString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetName
void CXML_Parser::GetName(CFX_ByteString &space, CFX_ByteString &name)
{
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex;
if (IsEOF()) {
return;
}
CFX_ByteTextBuf buf;
uint8_t ch;
do {
while (m_dwIndex < m_dwBufferSize) {
ch = m_pBuffer[m_dwIndex];
if (ch == ':') {
space = buf.GetByteString();
buf.Clear();
} else if (g_FXCRT_XML_IsNameChar(ch)) {
buf.AppendChar(ch);
} else {
break;
}
m_dwIndex ++;
}
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex;
if (m_dwIndex < m_dwBufferSize || IsEOF()) {
break;
}
} while (ReadNextBlock());
name = buf.GetByteString();
}
示例2: GeneratePageObjects
void IFX_Edit::GeneratePageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEdit,
const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, FX_COLORREF crText, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray)
{
FX_FLOAT fFontSize = pEdit->GetFontSize();
int32_t nOldFontIndex = -1;
CFX_ByteTextBuf sTextBuf;
CPDF_Point ptBT(0.0f,0.0f);
ObjArray.RemoveAll();
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator())
{
if (IFX_Edit_FontMap* pFontMap = pEdit->GetFontMap())
{
if (pRange)
pIterator->SetAt(pRange->BeginPos);
else
pIterator->SetAt(0);
CPVT_WordPlace oldplace;
while (pIterator->NextWord())
{
CPVT_WordPlace place = pIterator->GetAt();
if (pRange && place.WordCmp(pRange->EndPos) > 0) break;
CPVT_Word word;
if (pIterator->GetWord(word))
{
if (place.LineCmp(oldplace) != 0 || nOldFontIndex != word.nFontIndex)
{
if (sTextBuf.GetLength() > 0)
{
ObjArray.Add(AddTextObjToPageObjects(pPageObjects, crText, pFontMap->GetPDFFont(nOldFontIndex), fFontSize, 0.0f, 100,
CPDF_Point(ptBT.x+ptOffset.x, ptBT.y+ptOffset.y), sTextBuf.GetByteString()));
sTextBuf.Clear();
}
ptBT = word.ptWord;
nOldFontIndex = word.nFontIndex;
}
sTextBuf << GetPDFWordString(pFontMap, word.nFontIndex, word.Word, 0);
oldplace = place;
}
}
if (sTextBuf.GetLength() > 0)
{
ObjArray.Add(AddTextObjToPageObjects(pPageObjects, crText, pFontMap->GetPDFFont(nOldFontIndex), fFontSize, 0.0f, 100,
CPDF_Point(ptBT.x+ptOffset.x, ptBT.y+ptOffset.y), sTextBuf.GetByteString()));
}
}
}
}
示例3: ParseStyle
CFX_ByteString ParseStyle(FX_LPCSTR pStyle, int iLen, int iIndex)
{
CFX_ByteTextBuf buf;
if (!iLen || iLen <= iIndex) {
return buf.GetByteString();
}
while (iIndex < iLen) {
if (pStyle[iIndex] == ',') {
break;
}
buf.AppendChar(pStyle[iIndex]);
++iIndex;
}
return buf.GetByteString();
}
示例4: GetImageAppStream
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 << " Do\n"
<< "Q\n";
}
return sAppStream.GetByteString();
}
示例5: GetSelectAppearanceStream
CFX_ByteString IFX_Edit::GetSelectAppearanceStream(
IFX_Edit* pEdit,
const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange) {
CFX_ByteTextBuf sRet;
if (pRange && pRange->IsExist()) {
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) {
pIterator->SetAt(pRange->BeginPos);
while (pIterator->NextWord()) {
CPVT_WordPlace place = pIterator->GetAt();
if (pRange && place.WordCmp(pRange->EndPos) > 0)
break;
CPVT_Word word;
CPVT_Line line;
if (pIterator->GetWord(word) && pIterator->GetLine(line)) {
sRet << word.ptWord.x + ptOffset.x << " "
<< line.ptLine.y + line.fLineDescent << " " << word.fWidth << " "
<< line.fLineAscent - line.fLineDescent << " re\nf\n";
}
}
}
}
return sRet.GetByteString();
}
示例6: ReadHexString
CFX_ByteString CPDF_StreamParser::ReadHexString() {
if (!PositionIsInBounds())
return CFX_ByteString();
CFX_ByteTextBuf buf;
bool bFirst = true;
int code = 0;
while (PositionIsInBounds()) {
int ch = m_pBuf[m_Pos++];
if (ch == '>')
break;
if (!std::isxdigit(ch))
continue;
int val = FXSYS_toHexDigit(ch);
if (bFirst) {
code = val * 16;
} else {
code += val;
buf.AppendByte((uint8_t)code);
}
bFirst = !bFirst;
}
if (!bFirst)
buf.AppendChar((char)code);
if (buf.GetLength() > MAX_STRING_LENGTH)
return CFX_ByteString(buf.GetBuffer(), MAX_STRING_LENGTH);
return buf.GetByteString();
}
示例7: GetTextAppearanceStream
CFX_ByteString CPWL_Label::GetTextAppearanceStream(
const CFX_FloatPoint& ptOffset) const {
CFX_ByteTextBuf sRet;
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
if (sEdit.GetLength() > 0) {
sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()) << sEdit
<< "ET\n";
}
return sRet.GetByteString();
}
示例8: ReadHexString
CFX_ByteString CPDF_StreamParser::ReadHexString()
{
if (m_Size <= m_Pos) {
return CFX_ByteString();
}
int ch = m_pBuf[m_Pos++];
CFX_ByteTextBuf buf;
FX_BOOL bFirst = TRUE;
int code = 0;
while (1) {
if (ch == '>') {
break;
}
if (ch >= '0' && ch <= '9') {
if (bFirst) {
code = (ch - '0') * 16;
} else {
code += ch - '0';
buf.AppendChar((char)code);
}
bFirst = !bFirst;
} else if (ch >= 'A' && ch <= 'F') {
if (bFirst) {
code = (ch - 'A' + 10) * 16;
} else {
code += ch - 'A' + 10;
buf.AppendChar((char)code);
}
bFirst = !bFirst;
} else if (ch >= 'a' && ch <= 'f') {
if (bFirst) {
code = (ch - 'a' + 10) * 16;
} else {
code += ch - 'a' + 10;
buf.AppendChar((char)code);
}
bFirst = !bFirst;
}
if (m_Size <= m_Pos) {
break;
}
ch = m_pBuf[m_Pos++];
}
if (!bFirst) {
buf.AppendChar((char)code);
}
if (buf.GetLength() > MAX_STRING_LENGTH) {
return CFX_ByteString(buf.GetBuffer(), MAX_STRING_LENGTH);
}
return buf.GetByteString();
}
示例9: GetFontSetString
static CFX_ByteString GetFontSetString(IFX_Edit_FontMap* pFontMap,
int32_t nFontIndex,
FX_FLOAT fFontSize) {
CFX_ByteTextBuf sRet;
if (pFontMap) {
CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex);
if (sFontAlias.GetLength() > 0 && fFontSize > 0)
sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n";
}
return sRet.GetByteString();
}
示例10: GetCaretAppearanceStream
CFX_ByteString CPWL_Caret::GetCaretAppearanceStream(
const CFX_FloatPoint& ptOffset) {
CFX_ByteTextBuf sCaret;
GetCaretApp(sCaret, ptOffset);
return sCaret.GetByteString();
}
示例11: GenerateRichPageObjects
void IFX_Edit::GenerateRichPageObjects(
CPDF_PageObjects* pPageObjects,
IFX_Edit* pEdit,
const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange,
CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray) {
FX_COLORREF crCurText = ArgbEncode(255, 0, 0, 0);
FX_COLORREF crOld = crCurText;
CFX_ByteTextBuf sTextBuf;
CPVT_WordProps wp;
CPDF_Point ptBT(0.0f, 0.0f);
ObjArray.RemoveAll();
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) {
if (IFX_Edit_FontMap* pFontMap = pEdit->GetFontMap()) {
if (pRange)
pIterator->SetAt(pRange->BeginPos);
else
pIterator->SetAt(0);
CPVT_WordPlace oldplace;
while (pIterator->NextWord()) {
CPVT_WordPlace place = pIterator->GetAt();
if (pRange && place.WordCmp(pRange->EndPos) > 0)
break;
CPVT_Word word;
if (pIterator->GetWord(word)) {
word.WordProps.fFontSize = word.fFontSize;
crCurText = ArgbEncode(255, word.WordProps.dwWordColor);
if (place.LineCmp(oldplace) != 0 ||
word.WordProps.fCharSpace > 0.0f ||
word.WordProps.nHorzScale != 100 ||
FXSYS_memcmp(&word.WordProps, &wp, sizeof(CPVT_WordProps)) != 0 ||
crOld != crCurText) {
if (sTextBuf.GetLength() > 0) {
ObjArray.Add(AddTextObjToPageObjects(
pPageObjects, crOld, pFontMap->GetPDFFont(wp.nFontIndex),
wp.fFontSize, wp.fCharSpace, wp.nHorzScale,
CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
sTextBuf.GetByteString()));
sTextBuf.Clear();
}
wp = word.WordProps;
ptBT = word.ptWord;
crOld = crCurText;
}
sTextBuf << GetPDFWordString(pFontMap, word.WordProps.nFontIndex,
word.Word, 0);
if (word.WordProps.nWordStyle &
PVTWORD_STYLE_UNDERLINE) { /*
AddLineToPageObjects(pPageObjects,
crCurText,
CPDF_Point(word.ptWord.x,
word.ptWord.y + word.fDescent *
0.4f),
CPDF_Point(word.ptWord.x
+ word.fWidth, word.ptWord.y +
word.fDescent * 0.4f));
*/
CPDF_Rect rcUnderline = GetUnderLineRect(word);
rcUnderline.left += ptOffset.x;
rcUnderline.right += ptOffset.x;
rcUnderline.top += ptOffset.y;
rcUnderline.bottom += ptOffset.y;
AddRectToPageObjects(pPageObjects, crCurText, rcUnderline);
}
if (word.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) {
CPDF_Rect rcCrossout = GetCrossoutRect(word);
rcCrossout.left += ptOffset.x;
rcCrossout.right += ptOffset.x;
rcCrossout.top += ptOffset.y;
rcCrossout.bottom += ptOffset.y;
AddRectToPageObjects(pPageObjects, crCurText, rcCrossout);
}
oldplace = place;
}
}
if (sTextBuf.GetLength() > 0) {
ObjArray.Add(AddTextObjToPageObjects(
pPageObjects, crOld, pFontMap->GetPDFFont(wp.nFontIndex),
wp.fFontSize, wp.fCharSpace, wp.nHorzScale,
CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
sTextBuf.GetByteString()));
}
}
//.........这里部分代码省略.........
示例12: DrawRichEdit
void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice,
CPDF_Matrix* pUser2Device,
IFX_Edit* pEdit,
const CPDF_Rect& rcClip,
const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange) {
// FX_FLOAT fFontSize = pEdit->GetFontSize();
CPVT_WordRange wrSelect = pEdit->GetSelectWordRange();
FX_COLORREF crCurText = ArgbEncode(255, 0, 0, 0);
FX_COLORREF crOld = crCurText;
FX_BOOL bSelect = FALSE;
const FX_COLORREF crWhite = ArgbEncode(255, 255, 255, 255);
const FX_COLORREF crSelBK = ArgbEncode(255, 0, 51, 113);
CFX_ByteTextBuf sTextBuf;
CPVT_WordProps wp;
CPDF_Point ptBT(0.0f, 0.0f);
pDevice->SaveState();
if (!rcClip.IsEmpty()) {
CPDF_Rect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
FX_RECT rcDevClip;
rcDevClip.left = (int32_t)rcTemp.left;
rcDevClip.right = (int32_t)rcTemp.right;
rcDevClip.top = (int32_t)rcTemp.top;
rcDevClip.bottom = (int32_t)rcTemp.bottom;
pDevice->SetClip_Rect(&rcDevClip);
}
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) {
if (IFX_Edit_FontMap* pFontMap = pEdit->GetFontMap()) {
if (pRange)
pIterator->SetAt(pRange->BeginPos);
else
pIterator->SetAt(0);
CPVT_WordPlace oldplace;
while (pIterator->NextWord()) {
CPVT_WordPlace place = pIterator->GetAt();
if (pRange && place.WordCmp(pRange->EndPos) > 0)
break;
CPVT_Word word;
if (pIterator->GetWord(word)) {
word.WordProps.fFontSize = word.fFontSize;
crCurText = ArgbEncode(255, word.WordProps.dwWordColor);
if (wrSelect.IsExist()) {
bSelect = place.WordCmp(wrSelect.BeginPos) > 0 &&
place.WordCmp(wrSelect.EndPos) <= 0;
if (bSelect) {
crCurText = crWhite;
}
}
if (bSelect) {
CPVT_Line line;
pIterator->GetLine(line);
CFX_PathData pathSelBK;
pathSelBK.AppendRect(word.ptWord.x + ptOffset.x,
line.ptLine.y + line.fLineDescent + ptOffset.y,
word.ptWord.x + word.fWidth + ptOffset.x,
line.ptLine.y + line.fLineAscent + ptOffset.y);
pDevice->DrawPath(&pathSelBK, pUser2Device, NULL, crSelBK, 0,
FXFILL_WINDING);
}
if (place.LineCmp(oldplace) != 0 ||
word.WordProps.fCharSpace > 0.0f ||
word.WordProps.nHorzScale != 100 ||
FXSYS_memcmp(&word.WordProps, &wp, sizeof(CPVT_WordProps)) != 0 ||
crOld != crCurText) {
if (sTextBuf.GetLength() > 0) {
DrawTextString(
pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize,
pUser2Device, sTextBuf.GetByteString(), crOld, 0,
wp.nHorzScale);
sTextBuf.Clear();
}
wp = word.WordProps;
ptBT = word.ptWord;
crOld = crCurText;
}
sTextBuf << GetPDFWordString(pFontMap, word.WordProps.nFontIndex,
word.Word, 0);
if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) {
CFX_PathData pathUnderline;
CPDF_Rect rcUnderline = GetUnderLineRect(word);
pathUnderline.AppendRect(rcUnderline.left, rcUnderline.bottom,
//.........这里部分代码省略.........
示例13: DrawEdit
//.........这里部分代码省略.........
rcDevClip.top = (int32_t)rcTemp.top;
rcDevClip.bottom = (int32_t)rcTemp.bottom;
pDevice->SetClip_Rect(&rcDevClip);
}
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) {
if (IFX_Edit_FontMap* pFontMap = pEdit->GetFontMap()) {
if (pRange)
pIterator->SetAt(pRange->BeginPos);
else
pIterator->SetAt(0);
CPVT_WordPlace oldplace;
while (pIterator->NextWord()) {
CPVT_WordPlace place = pIterator->GetAt();
if (pRange && place.WordCmp(pRange->EndPos) > 0)
break;
if (wrSelect.IsExist()) {
bSelect = place.WordCmp(wrSelect.BeginPos) > 0 &&
place.WordCmp(wrSelect.EndPos) <= 0;
if (bSelect) {
crCurFill = crWhite;
} else {
crCurFill = crTextFill;
}
}
if (pSystemHandler && pSystemHandler->IsSelectionImplemented()) {
crCurFill = crTextFill;
crOldFill = crCurFill;
}
CPVT_Word word;
if (pIterator->GetWord(word)) {
if (bSelect) {
CPVT_Line line;
pIterator->GetLine(line);
if (pSystemHandler && pSystemHandler->IsSelectionImplemented()) {
CPDF_Rect rc(word.ptWord.x, line.ptLine.y + line.fLineDescent,
word.ptWord.x + word.fWidth,
line.ptLine.y + line.fLineAscent);
rc.Intersect(rcClip);
// CFX_Edit* pEt = (CFX_Edit*)pEdit;
// CPDF_Rect rcEdit = pEt->VTToEdit(rc);
pSystemHandler->OutputSelectedRect(pFFLData, rc);
} else {
CFX_PathData pathSelBK;
pathSelBK.AppendRect(word.ptWord.x,
line.ptLine.y + line.fLineDescent,
word.ptWord.x + word.fWidth,
line.ptLine.y + line.fLineAscent);
pDevice->DrawPath(&pathSelBK, pUser2Device, NULL, crSelBK, 0,
FXFILL_WINDING);
}
}
if (bContinuous) {
if (place.LineCmp(oldplace) != 0 || word.nFontIndex != nFontIndex ||
crOldFill != crCurFill) {
if (sTextBuf.GetLength() > 0) {
DrawTextString(pDevice, CPDF_Point(ptBT.x + ptOffset.x,
ptBT.y + ptOffset.y),
pFontMap->GetPDFFont(nFontIndex), fFontSize,
pUser2Device, sTextBuf.GetByteString(),
crOldFill, crTextStroke, nHorzScale);
sTextBuf.Clear();
}
nFontIndex = word.nFontIndex;
ptBT = word.ptWord;
crOldFill = crCurFill;
}
sTextBuf << GetPDFWordString(pFontMap, word.nFontIndex, word.Word,
SubWord);
} else {
DrawTextString(
pDevice, CPDF_Point(word.ptWord.x + ptOffset.x,
word.ptWord.y + ptOffset.y),
pFontMap->GetPDFFont(word.nFontIndex), fFontSize, pUser2Device,
GetPDFWordString(pFontMap, word.nFontIndex, word.Word, SubWord),
crCurFill, crTextStroke, nHorzScale);
}
oldplace = place;
}
}
if (sTextBuf.GetLength() > 0) {
DrawTextString(
pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device,
sTextBuf.GetByteString(), crOldFill, crTextStroke, nHorzScale);
}
}
}
pDevice->RestoreState();
}
示例14: ReadString
CFX_ByteString CPDF_StreamParser::ReadString()
{
if (m_Size <= m_Pos) {
return CFX_ByteString();
}
int ch = m_pBuf[m_Pos++];
CFX_ByteTextBuf buf;
int parlevel = 0;
int status = 0, iEscCode = 0;
while (1) {
switch (status) {
case 0:
if (ch == ')') {
if (parlevel == 0) {
if (buf.GetLength() > MAX_STRING_LENGTH) {
return CFX_ByteString(buf.GetBuffer(), MAX_STRING_LENGTH);
}
return buf.GetByteString();
}
parlevel --;
buf.AppendChar(')');
} else if (ch == '(') {
parlevel ++;
buf.AppendChar('(');
} else if (ch == '\\') {
status = 1;
} else {
buf.AppendChar((char)ch);
}
break;
case 1:
if (ch >= '0' && ch <= '7') {
iEscCode = ch - '0';
status = 2;
break;
}
if (ch == 'n') {
buf.AppendChar('\n');
} else if (ch == 'r') {
buf.AppendChar('\r');
} else if (ch == 't') {
buf.AppendChar('\t');
} else if (ch == 'b') {
buf.AppendChar('\b');
} else if (ch == 'f') {
buf.AppendChar('\f');
} else if (ch == '\r') {
status = 4;
break;
} else if (ch == '\n') {
} else {
buf.AppendChar(ch);
}
status = 0;
break;
case 2:
if (ch >= '0' && ch <= '7') {
iEscCode = iEscCode * 8 + ch - '0';
status = 3;
} else {
buf.AppendChar(iEscCode);
status = 0;
continue;
}
break;
case 3:
if (ch >= '0' && ch <= '7') {
iEscCode = iEscCode * 8 + ch - '0';
buf.AppendChar(iEscCode);
status = 0;
} else {
buf.AppendChar(iEscCode);
status = 0;
continue;
}
break;
case 4:
status = 0;
if (ch != '\n') {
continue;
}
break;
}
if (m_Size <= m_Pos) {
break;
}
ch = m_pBuf[m_Pos++];
}
if (m_Size > m_Pos) {
ch = m_pBuf[m_Pos++];
}
if (buf.GetLength() > MAX_STRING_LENGTH) {
return CFX_ByteString(buf.GetBuffer(), MAX_STRING_LENGTH);
}
return buf.GetByteString();
}
示例15: GetEditAppearanceStream
CFX_ByteString IFX_Edit::GetEditAppearanceStream(
IFX_Edit* pEdit,
const CPDF_Point& ptOffset,
const CPVT_WordRange* pRange /* = NULL*/,
FX_BOOL bContinuous /* = TRUE*/,
FX_WORD SubWord /* = 0*/) {
CFX_ByteTextBuf sEditStream, sWords;
CPDF_Point ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f);
int32_t nCurFontIndex = -1;
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) {
if (pRange)
pIterator->SetAt(pRange->BeginPos);
else
pIterator->SetAt(0);
CPVT_WordPlace oldplace;
while (pIterator->NextWord()) {
CPVT_WordPlace place = pIterator->GetAt();
if (pRange && place.WordCmp(pRange->EndPos) > 0)
break;
if (bContinuous) {
if (place.LineCmp(oldplace) != 0) {
if (sWords.GetSize() > 0) {
sEditStream << GetWordRenderString(sWords.GetByteString());
sWords.Clear();
}
CPVT_Word word;
if (pIterator->GetWord(word)) {
ptNew = CPDF_Point(word.ptWord.x + ptOffset.x,
word.ptWord.y + ptOffset.y);
} else {
CPVT_Line line;
pIterator->GetLine(line);
ptNew = CPDF_Point(line.ptLine.x + ptOffset.x,
line.ptLine.y + ptOffset.y);
}
if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) {
sEditStream << ptNew.x - ptOld.x << " " << ptNew.y - ptOld.y
<< " Td\n";
ptOld = ptNew;
}
}
CPVT_Word word;
if (pIterator->GetWord(word)) {
if (word.nFontIndex != nCurFontIndex) {
if (sWords.GetSize() > 0) {
sEditStream << GetWordRenderString(sWords.GetByteString());
sWords.Clear();
}
sEditStream << GetFontSetString(pEdit->GetFontMap(),
word.nFontIndex, word.fFontSize);
nCurFontIndex = word.nFontIndex;
}
sWords << GetPDFWordString(pEdit->GetFontMap(), nCurFontIndex,
word.Word, SubWord);
}
oldplace = place;
} else {
CPVT_Word word;
if (pIterator->GetWord(word)) {
ptNew = CPDF_Point(word.ptWord.x + ptOffset.x,
word.ptWord.y + ptOffset.y);
if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) {
sEditStream << ptNew.x - ptOld.x << " " << ptNew.y - ptOld.y
<< " Td\n";
ptOld = ptNew;
}
if (word.nFontIndex != nCurFontIndex) {
sEditStream << GetFontSetString(pEdit->GetFontMap(),
word.nFontIndex, word.fFontSize);
nCurFontIndex = word.nFontIndex;
}
sEditStream << GetWordRenderString(GetPDFWordString(
pEdit->GetFontMap(), nCurFontIndex, word.Word, SubWord));
}
}
}
if (sWords.GetSize() > 0) {
sEditStream << GetWordRenderString(sWords.GetByteString());
sWords.Clear();
}
}
CFX_ByteTextBuf sAppStream;
if (sEditStream.GetSize() > 0) {
//.........这里部分代码省略.........