本文整理汇总了C++中CPDF_Font::IsVertWriting方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDF_Font::IsVertWriting方法的具体用法?C++ CPDF_Font::IsVertWriting怎么用?C++ CPDF_Font::IsVertWriting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDF_Font
的用法示例。
在下文中一共展示了CPDF_Font::IsVertWriting方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddTextObject
void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs,
FX_FLOAT fInitKerning,
FX_FLOAT* pKerning,
int nsegs) {
CPDF_Font* pFont = m_pCurStates->m_TextState.GetFont();
if (!pFont) {
return;
}
if (fInitKerning != 0) {
if (!pFont->IsVertWriting()) {
m_pCurStates->m_TextX -=
FXSYS_Mul(fInitKerning, m_pCurStates->m_TextState.GetFontSize()) /
1000;
} else {
m_pCurStates->m_TextY -=
FXSYS_Mul(fInitKerning, m_pCurStates->m_TextState.GetFontSize()) /
1000;
}
}
if (nsegs == 0) {
return;
}
int textmode;
if (pFont->GetFontType() == PDFFONT_TYPE3) {
textmode = 0;
} else {
textmode = m_pCurStates->m_TextState.GetObject()->m_TextMode;
}
CPDF_TextObject* pText = new CPDF_TextObject;
m_pLastTextObject = pText;
SetGraphicStates(pText, TRUE, TRUE, TRUE);
if (textmode && textmode != 3 && textmode != 4 && textmode != 7) {
FX_FLOAT* pCTM = pText->m_TextState.GetModify()->m_CTM;
pCTM[0] = m_pCurStates->m_CTM.a;
pCTM[1] = m_pCurStates->m_CTM.c;
pCTM[2] = m_pCurStates->m_CTM.b;
pCTM[3] = m_pCurStates->m_CTM.d;
}
pText->SetSegments(pStrs, pKerning, nsegs);
pText->m_PosX = m_pCurStates->m_TextX;
pText->m_PosY = m_pCurStates->m_TextY + m_pCurStates->m_TextRise;
ConvertTextSpace(pText->m_PosX, pText->m_PosY);
FX_FLOAT x_advance, y_advance;
pText->CalcPositionData(&x_advance, &y_advance, m_pCurStates->m_TextHorzScale,
m_Level);
m_pCurStates->m_TextX += x_advance;
m_pCurStates->m_TextY += y_advance;
if (textmode > 3) {
CPDF_TextObject* pCopy = new CPDF_TextObject;
pCopy->Copy(pText);
m_ClipTextList.Add(pCopy);
}
m_pObjectList->m_ObjectList.AddTail(pText);
if (pKerning && pKerning[nsegs - 1] != 0) {
if (!pFont->IsVertWriting()) {
m_pCurStates->m_TextX -=
FXSYS_Mul(pKerning[nsegs - 1],
m_pCurStates->m_TextState.GetFontSize()) /
1000;
} else {
m_pCurStates->m_TextY -=
FXSYS_Mul(pKerning[nsegs - 1],
m_pCurStates->m_TextState.GetFontSize()) /
1000;
}
}
}