mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Draw AP for 0-10 types text annot
This commit is contained in:
@ -1269,12 +1269,12 @@ CAnnotText::CAnnotText(PDFDoc* pdfDoc, Object* oAnnotRef, int nPageIndex) : CAnn
|
||||
oObj.free();
|
||||
|
||||
// 16 - Иконка - Name
|
||||
m_unFlags |= (1 << 16);
|
||||
m_nName = 10; // Default: Note
|
||||
if (oAnnot.dictLookup("Name", &oObj)->isName())
|
||||
{
|
||||
m_unFlags |= (1 << 16);
|
||||
std::string sName(oObj.getName());
|
||||
std::vector<std::string> arrName = {"Check", "Checkmark", "Circle", "Comment", "Cross", "CrossHairs", "Help", "Insert", "Key", "NewParagraph", "Note", "Paragraph", "RightArrow", "RightPointer", "Star", "UpArrow", "UpLeftArrow"};
|
||||
m_nName = 10; // Default: Note
|
||||
std::vector<std::string>::iterator p = std::find(arrName.begin(), arrName.end(), sName);
|
||||
if (p != arrName.end())
|
||||
m_nName = p - arrName.begin();
|
||||
|
||||
@ -462,38 +462,102 @@ namespace PdfWriter
|
||||
}
|
||||
void CTextAnnotation::SetAP()
|
||||
{
|
||||
std::string sColor = GetColor(dynamic_cast<CArrayObject*>(Get("C")), false);
|
||||
|
||||
CAnnotAppearance* pAP = new CAnnotAppearance(m_pXref, this);
|
||||
Add("AP", pAP);
|
||||
CAnnotAppearanceObject* pN = pAP->GetNormal();
|
||||
CAnnotAppearanceObject* pR = pAP->GetRollover();
|
||||
|
||||
switch (m_nName)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
pN->AddBBox(0, 0, 19, 19);
|
||||
pN->DrawTextCheck(sColor);
|
||||
pR->AddBBox(0, 0, 19, 19);
|
||||
pR->DrawTextCheck(sColor);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
pN->AddBBox(0, 0, 20, 20);
|
||||
pN->DrawTextCheckmark();
|
||||
pR->AddBBox(0, 0, 20, 20);
|
||||
pR->DrawTextCheckmark();
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
pN->AddBBox(0, 0, 20, 20);
|
||||
pN->DrawTextCircle(sColor);
|
||||
pR->AddBBox(0, 0, 20, 20);
|
||||
pR->DrawTextCircle(sColor);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
CAnnotAppearance* pAP = new CAnnotAppearance(m_pXref, this);
|
||||
Add("AP", pAP);
|
||||
std::string sColor = GetColor(dynamic_cast<CArrayObject*>(Get("C")), false);
|
||||
CAnnotAppearanceObject* pN = pAP->GetNormal();
|
||||
pN->AddBBox(0, 0, 24, 24);
|
||||
pN->DrawTextCommentN(sColor);
|
||||
|
||||
CArrayObject* pArray = new CArrayObject();
|
||||
pN->Add("BBox", pArray);
|
||||
pArray->Add(0);
|
||||
pArray->Add(0);
|
||||
pArray->Add(24);
|
||||
pArray->Add(24);
|
||||
|
||||
CAnnotAppearanceObject* pR = pAP->GetRollover();
|
||||
pR->AddBBox(0, 0, 24, 24);
|
||||
pR->DrawTextCommentR(sColor);
|
||||
|
||||
pArray = new CArrayObject();
|
||||
pR->Add("BBox", pArray);
|
||||
pArray->Add(0);
|
||||
pArray->Add(0);
|
||||
pArray->Add(24);
|
||||
pArray->Add(24);
|
||||
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
pN->AddBBox(0, 0, 19, 19);
|
||||
pN->DrawTextCross(sColor);
|
||||
pR->AddBBox(0, 0, 19, 19);
|
||||
pR->DrawTextCross(sColor);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
pN->AddBBox(0, 0, 20, 20);
|
||||
pN->DrawTextCrossHairs(sColor);
|
||||
pR->AddBBox(0, 0, 20, 20);
|
||||
pR->DrawTextCrossHairs(sColor);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
pN->AddBBox(0, 0, 20, 20);
|
||||
pN->DrawTextHelp(sColor);
|
||||
pR->AddBBox(0, 0, 20, 20);
|
||||
pR->DrawTextHelp(sColor);
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
pN->AddBBox(0, 0, 17, 20);
|
||||
pN->DrawTextInsert(sColor);
|
||||
pR->AddBBox(0, 0, 17, 20);
|
||||
pR->DrawTextInsert(sColor);
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
pN->AddBBox(0, 0, 13, 18);
|
||||
pN->DrawTextKey(sColor);
|
||||
pR->AddBBox(0, 0, 13, 18);
|
||||
pR->DrawTextKey(sColor);
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
pN->AddBBox(0, 0, 13, 20);
|
||||
pN->DrawTextNewParagraph(sColor);
|
||||
pR->AddBBox(0, 0, 13, 20);
|
||||
pR->DrawTextNewParagraph(sColor);
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
default:
|
||||
{
|
||||
pN->AddBBox(0, 0, 18, 20);
|
||||
pN->DrawTextNote(sColor);
|
||||
pR->AddBBox(0, 0, 18, 20);
|
||||
pR->DrawTextNote(sColor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2601,10 +2601,26 @@ namespace PdfWriter
|
||||
m_pStream->WriteStr("ET\012");
|
||||
m_pStream->WriteStr("Q\012EMC\012");
|
||||
}
|
||||
void CAnnotAppearanceObject::AddBBox(double dX, double dY, double dW, double dH)
|
||||
{
|
||||
CArrayObject* pArray = new CArrayObject();
|
||||
Add("BBox", pArray);
|
||||
pArray->Add(dX);
|
||||
pArray->Add(dY);
|
||||
pArray->Add(dW);
|
||||
pArray->Add(dH);
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextCommentN(const std::string& sColor)
|
||||
{
|
||||
CExtGrState* pExtGrState = m_pAnnot->GetDocument()->GetExtGState(0.6, 0.6);
|
||||
const char* sExtGrStateName = m_pAnnot->GetDocument()->GetFieldsResources()->GetExtGrStateName(pExtGrState);
|
||||
|
||||
m_pStream->WriteStr("q 1 1 1 rg 0 i 1 w 4 M 1 j 0 J [] 0 d ");
|
||||
// GS0 gs
|
||||
if (sExtGrStateName)
|
||||
{
|
||||
m_pStream->WriteEscapeName(sExtGrStateName);
|
||||
m_pStream->WriteStr(" gs ");
|
||||
}
|
||||
m_pStream->WriteStr("1 0 0 1 9 5.0908 cm 7.74 12.616 m -7.74 12.616 l -8.274 12.616 -8.707 12.184 -8.707 11.649 c -8.707 -3.831 l -8.707 -4.365 -8.274 -4.798 -7.74 -4.798 c ");
|
||||
m_pStream->WriteStr("7.74 -4.798 l 8.274 -4.798 8.707 -4.365 8.707 -3.831 c 8.707 11.649 l 8.707 12.184 8.274 12.616 7.74 12.616 c h f Q 0 G ");
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
@ -2621,4 +2637,125 @@ namespace PdfWriter
|
||||
m_pStream->WriteStr("-2.33 9.66 m 7.34 9.66 l 7.34 8.83 l -2.33 8.83 l -2.33 9.66 l -2.33 7.28 m 5.88 7.28 l 5.88 6.46 l -2.33 6.46 l -2.33 7.28 l 14.9 23.1235 m -14.9 23.1235 l ");
|
||||
m_pStream->WriteStr("-14.9 -20.345 l 14.9 -20.345 l 14.9 23.1235 l b");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextCheck(const std::string& sColor)
|
||||
{
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 G 0 i 0.59 w 4 M 1 j 0 J [] 0 d 1 0 0 1 7.1836 1.2061 cm 0 0 m 6.691 11.152 11.31 14.196 v 10.773 15.201 9.626 16.892 8.155 17.587 c ");
|
||||
m_pStream->WriteStr("2.293 10.706 -0.255 4.205 y -4.525 9.177 l -6.883 5.608 l h b");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextCheckmark()
|
||||
{
|
||||
m_pStream->WriteStr("q 0.396 0.396 0.396 rg 1 0 0 1 13.5151 16.5 cm 0 0 m -6.7 -10.23 l -8.81 -7 l -13.22 -7 l -6.29 -15 l 4.19 0 l h f Q");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextCircle(const std::string& sColor)
|
||||
{
|
||||
CExtGrState* pExtGrState = m_pAnnot->GetDocument()->GetExtGState(0.6, 0.6);
|
||||
const char* sExtGrStateName = m_pAnnot->GetDocument()->GetFieldsResources()->GetExtGrStateName(pExtGrState);
|
||||
|
||||
m_pStream->WriteStr("q 1 1 1 rg 0 i 1 w 4 M 1 j 0 J [] 0 d ");
|
||||
if (sExtGrStateName)
|
||||
{
|
||||
m_pStream->WriteEscapeName(sExtGrStateName);
|
||||
m_pStream->WriteStr(" gs ");
|
||||
}
|
||||
m_pStream->WriteStr("1 0 0 1 9.999 3.6387 cm 0 0 m -3.513 0 -6.36 2.85 -6.36 6.363 c -6.36 9.875 -3.513 12.724 0 12.724 c 3.514 12.724 6.363 9.875 6.363 6.363 c ");
|
||||
m_pStream->WriteStr("6.363 2.85 3.514 0 0 0 c h f Q ");
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 G 0 i 0.59 w 4 M 1 j 0 J [] 0 d 1 0 0 1 9.999 3.6387 cm 0 0 m -3.513 0 -6.36 2.85 -6.36 6.363 c -6.36 9.875 -3.513 12.724 0 12.724 c ");
|
||||
m_pStream->WriteStr("3.514 12.724 6.363 9.875 6.363 6.363 c 6.363 2.85 3.514 0 0 0 c 0 16.119 m -5.388 16.119 -9.756 11.751 -9.756 6.363 c -9.756 0.973 -5.388 -3.395 0 -3.395 c ");
|
||||
m_pStream->WriteStr("5.391 -3.395 9.757 0.973 9.757 6.363 c 9.757 11.751 5.391 16.119 0 16.119 c b");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextCross(const std::string& sColor)
|
||||
{
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 G 0 i 0.59 w 4 M 1 j 0 J [] 0 d 1 0 0 1 18.6924 3.1357 cm 0 0 m -6.363 6.364 l 0 12.728 l -2.828 15.556 l -9.192 9.192 l -15.556 15.556 l ");
|
||||
m_pStream->WriteStr("-18.384 12.728 l -12.02 6.364 l -18.384 0 l -15.556 -2.828 l -9.192 3.535 l -2.828 -2.828 l h b");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextCrossHairs(const std::string& sColor)
|
||||
{
|
||||
CExtGrState* pExtGrState = m_pAnnot->GetDocument()->GetExtGState(0.6, 0.6);
|
||||
const char* sExtGrStateName = m_pAnnot->GetDocument()->GetFieldsResources()->GetExtGrStateName(pExtGrState);
|
||||
|
||||
m_pStream->WriteStr("q 1 1 1 rg 0 i 1 w 4 M 1 j 0 J [] 0 d ");
|
||||
if (sExtGrStateName)
|
||||
{
|
||||
m_pStream->WriteEscapeName(sExtGrStateName);
|
||||
m_pStream->WriteStr(" gs ");
|
||||
}
|
||||
m_pStream->WriteStr("1 0 0 1 9.9771 1.9443 cm 0 0 m -4.448 0 -8.053 3.604 -8.053 8.053 c -8.053 12.5 -4.448 16.106 0 16.106 c 4.447 16.106 8.054 12.5 8.054 8.053 c ");
|
||||
m_pStream->WriteStr("8.054 3.604 4.447 0 0 0 c h f Q ");
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 G 0 i 0.61 w 4 M 0 j 0 J [] 0 d q 1 0 0 1 9.9771 1.9443 cm 0 0 m -4.448 0 -8.053 3.604 -8.053 8.053 c -8.053 12.5 -4.448 16.106 0 16.106 c ");
|
||||
m_pStream->WriteStr("4.447 16.106 8.054 12.5 8.054 8.053 c 8.054 3.604 4.447 0 0 0 c 0 17.716 m -5.336 17.716 -9.663 13.39 -9.663 8.053 c -9.663 2.716 -5.336 -1.61 0 -1.61 c ");
|
||||
m_pStream->WriteStr("5.337 -1.61 9.664 2.716 9.664 8.053 c 9.664 13.39 5.337 17.716 0 17.716 c b Q q 1 0 0 1 10.7861 14.8325 cm 0 0 m -1.611 0 l -1.611 -4.027 l -5.638 -4.027 l ");
|
||||
m_pStream->WriteStr("-5.638 -5.638 l -1.611 -5.638 l -1.611 -9.665 l 0 -9.665 l 0 -5.638 l 4.026 -5.638 l 4.026 -4.027 l 0 -4.027 l h b Q");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextHelp(const std::string& sColor)
|
||||
{
|
||||
CExtGrState* pExtGrState = m_pAnnot->GetDocument()->GetExtGState(0.6, 0.6);
|
||||
const char* sExtGrStateName = m_pAnnot->GetDocument()->GetFieldsResources()->GetExtGrStateName(pExtGrState);
|
||||
|
||||
m_pStream->WriteStr("q 1 1 1 rg 0 i 1 w 4 M 1 j 0 J [] 0 d ");
|
||||
if (sExtGrStateName)
|
||||
{
|
||||
m_pStream->WriteEscapeName(sExtGrStateName);
|
||||
m_pStream->WriteStr(" gs ");
|
||||
}
|
||||
m_pStream->WriteStr("1 0 0 1 12.1465 10.5137 cm -2.146 9.403 m -7.589 9.403 -12.001 4.99 -12.001 -0.453 c -12.001 -5.895 -7.589 -10.309 -2.146 -10.309 c ");
|
||||
m_pStream->WriteStr("3.296 -10.309 7.709 -5.895 7.709 -0.453 c 7.709 4.99 3.296 9.403 -2.146 9.403 c h f Q ");
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 G 0 i 0.59 w 4 M 1 j 0 J [] 0 d 1 0 0 1 12.1465 10.5137 cm 0 0 m -0.682 -0.756 -0.958 -1.472 -0.938 -2.302 c -0.938 -2.632 l -3.385 -2.632 l ");
|
||||
m_pStream->WriteStr("-3.403 -2.154 l -3.459 -1.216 -3.147 -0.259 -2.316 0.716 c -1.729 1.433 -1.251 2.022 -1.251 2.647 c -1.251 3.291 -1.674 3.715 -2.594 3.751 c ");
|
||||
m_pStream->WriteStr("-3.202 3.751 -3.937 3.531 -4.417 3.2 c -5.041 5.205 l -4.361 5.591 -3.274 5.959 -1.968 5.959 c 0.46 5.959 1.563 4.616 1.563 3.089 c ");
|
||||
m_pStream->WriteStr("1.563 1.691 0.699 0.771 0 0 c -2.227 -6.863 m -2.245 -6.863 l -3.202 -6.863 -3.864 -6.146 -3.864 -5.189 c -3.864 -4.196 -3.182 -3.516 -2.227 -3.516 c ");
|
||||
m_pStream->WriteStr("-1.233 -3.516 -0.589 -4.196 -0.57 -5.189 c -0.57 -6.146 -1.233 -6.863 -2.227 -6.863 c -2.146 9.403 m -7.589 9.403 -12.001 4.99 -12.001 -0.453 c ");
|
||||
m_pStream->WriteStr("-12.001 -5.895 -7.589 -10.309 -2.146 -10.309 c 3.296 -10.309 7.709 -5.895 7.709 -0.453 c 7.709 4.99 3.296 9.403 -2.146 9.403 c b");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextInsert(const std::string& sColor)
|
||||
{
|
||||
m_pStream->WriteStr("0 G ");
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 i 0.59 w 4 M 0 j 0 J [] 0 d 1 0 0 1 8.5386 19.8545 cm 0 0 m -8.39 -19.719 l 8.388 -19.719 l h B");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextKey(const std::string& sColor)
|
||||
{
|
||||
CExtGrState* pExtGrState = m_pAnnot->GetDocument()->GetExtGState(0.6, 0.6);
|
||||
const char* sExtGrStateName = m_pAnnot->GetDocument()->GetFieldsResources()->GetExtGrStateName(pExtGrState);
|
||||
|
||||
m_pStream->WriteStr("q 1 1 1 rg 0 i 1 w 4 M 1 j 0 J [] 0 d ");
|
||||
if (sExtGrStateName)
|
||||
{
|
||||
m_pStream->WriteEscapeName(sExtGrStateName);
|
||||
m_pStream->WriteStr(" gs ");
|
||||
}
|
||||
m_pStream->WriteStr("1 0 0 1 6.5 12.6729 cm 0.001 5.138 m -2.543 5.138 -4.604 3.077 -4.604 0.534 c -4.604 -1.368 -3.449 -3.001 -1.802 -3.702 c ");
|
||||
m_pStream->WriteStr("-1.802 -4.712 l -0.795 -5.719 l -1.896 -6.82 l -0.677 -8.039 l -1.595 -8.958 l -0.602 -9.949 l -1.479 -10.829 l -0.085 -12.483 l 1.728 -10.931 l ");
|
||||
m_pStream->WriteStr("1.728 -3.732 l 1.737 -3.728 1.75 -3.724 1.76 -3.721 c 3.429 -3.03 4.604 -1.385 4.604 0.534 c 4.604 3.077 2.542 5.138 0.001 5.138 c f Q ");
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 G 0 i 0.59 w 4 M 1 j 0 J [] 0 d 1 0 0 1 6.5 12.6729 cm 0 0 m -1.076 0 -1.95 0.874 -1.95 1.95 c -1.95 3.028 -1.076 3.306 0 3.306 c ");
|
||||
m_pStream->WriteStr("1.077 3.306 1.95 3.028 1.95 1.95 c 1.95 0.874 1.077 0 0 0 c 0.001 5.138 m -2.543 5.138 -4.604 3.077 -4.604 0.534 c -4.604 -1.368 -3.449 -3.001 -1.802 -3.702 c ");
|
||||
m_pStream->WriteStr("-1.802 -4.712 l -0.795 -5.719 l -1.896 -6.82 l -0.677 -8.039 l -1.595 -8.958 l -0.602 -9.949 l -1.479 -10.829 l -0.085 -12.483 l 1.728 -10.931 l 1.728 -3.732 l ");
|
||||
m_pStream->WriteStr("1.737 -3.728 1.75 -3.724 1.76 -3.721 c 3.429 -3.03 4.604 -1.385 4.604 0.534 c 4.604 3.077 2.542 5.138 0.001 5.138 c b");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextNewParagraph(const std::string& sColor)
|
||||
{
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr(" 0 G 0 i 0.59 w 4 M 1 j 0 J [] 0 d q 1 0 0 1 6.4995 20 cm 0 0 m -6.205 -12.713 l 6.205 -12.713 l h b Q q 1 0 0 1 1.1909 6.2949 cm 0 0 m 1.278 0 l ");
|
||||
m_pStream->WriteStr("1.353 0 1.362 -0.02 1.391 -0.066 c 2.128 -1.363 3.78 -4.275 3.966 -4.713 c 3.985 -4.713 l 3.976 -4.453 3.957 -3.91 3.957 -3.137 c 3.957 -0.076 l ");
|
||||
m_pStream->WriteStr("3.957 -0.02 3.976 0 4.041 0 c 4.956 0 l 5.021 0 5.04 -0.029 5.04 -0.084 c 5.04 -6.049 l 5.04 -6.113 5.021 -6.133 4.947 -6.133 c 3.695 -6.133 l ");
|
||||
m_pStream->WriteStr("3.621 -6.133 3.611 -6.113 3.574 -6.066 c 3.052 -4.955 1.353 -2.063 0.971 -1.186 c 0.961 -1.186 l 0.999 -1.68 0.999 -2.146 1.008 -3.025 c 1.008 -6.049 l ");
|
||||
m_pStream->WriteStr("1.008 -6.104 0.989 -6.133 0.933 -6.133 c 0.009 -6.133 l -0.046 -6.133 -0.075 -6.123 -0.075 -6.049 c -0.075 -0.066 l -0.075 -0.02 -0.056 0 0 0 c f Q q ");
|
||||
m_pStream->WriteStr("1 0 0 1 9.1367 3.0273 cm 0 0 m 0.075 0 0.215 -0.008 0.645 -0.008 c 1.4 -0.008 2.119 0.281 2.119 1.213 c 2.119 1.969 1.633 2.381 0.737 2.381 c ");
|
||||
m_pStream->WriteStr("0.354 2.381 0.075 2.371 0 2.361 c h -1.146 3.201 m -1.146 3.238 -1.129 3.268 -1.082 3.268 c -0.709 3.275 0.02 3.285 0.729 3.285 c ");
|
||||
m_pStream->WriteStr("2.613 3.285 3.248 2.314 3.258 1.232 c 3.258 -0.27 2.007 -0.914 0.607 -0.914 c 0.327 -0.914 0.057 -0.914 0 -0.904 c 0 -2.789 l ");
|
||||
m_pStream->WriteStr("0 -2.836 -0.019 -2.865 -0.074 -2.865 c -1.082 -2.865 l -1.119 -2.865 -1.146 -2.846 -1.146 -2.799 c h f Q");
|
||||
}
|
||||
void CAnnotAppearanceObject::DrawTextNote(const std::string& sColor)
|
||||
{
|
||||
m_pStream->WriteStr(sColor.c_str());
|
||||
m_pStream->WriteStr("0 G 0 i 0.61 w 4 M 0 j 0 J [] 0 d q 1 0 0 1 16.959 1.3672 cm 0 0 m 0 -0.434 -0.352 -0.785 -0.784 -0.785 c -14.911 -0.785 l");
|
||||
m_pStream->WriteStr("-15.345 -0.785 -15.696 -0.434 -15.696 0 c -15.696 17.266 l -15.696 17.699 -15.345 18.051 -14.911 18.051 c -0.784 18.051 l -0.352 18.051 0 17.699 0 17.266 c ");
|
||||
m_pStream->WriteStr("h b Q q 1 0 0 1 4.4023 13.9243 cm 0 0 m 9.418 0 l S Q q 1 0 0 1 4.4019 11.2207 cm 0 0 m 9.418 0 l S Q q 1 0 0 1 4.4023 8.5176 cm 0 0 m 9.418 0 l S Q q ");
|
||||
m_pStream->WriteStr("1 0 0 1 4.4023 5.8135 cm 0 0 m 9.418 0 l S Q");
|
||||
}
|
||||
}
|
||||
|
||||
@ -389,6 +389,7 @@ namespace PdfWriter
|
||||
void DrawTextLine(const double& dX, const double& dY, const unsigned short* pCodes, const unsigned int& unCount, CFontCidTrueType** ppFonts, const double* pShifts);
|
||||
void DrawTextLine(const double &dX, const double &dY, const std::wstring& wsText);
|
||||
void EndDrawText();
|
||||
void AddBBox(double dX, double dY, double dW, double dH);
|
||||
|
||||
void StartDraw(const double& dWidth, const double& dHeight);
|
||||
void StartText(CFontDict* pFont, const double& dFontSize);
|
||||
@ -398,6 +399,17 @@ namespace PdfWriter
|
||||
|
||||
void DrawTextCommentN(const std::string& sColor);
|
||||
void DrawTextCommentR(const std::string& sColor);
|
||||
void DrawTextCheck(const std::string& sColor);
|
||||
void DrawTextCheckmark();
|
||||
void DrawTextCircle(const std::string& sColor);
|
||||
void DrawTextCross(const std::string& sColor);
|
||||
void DrawTextCrossHairs(const std::string& sColor);
|
||||
void DrawTextHelp(const std::string& sColor);
|
||||
void DrawTextInsert(const std::string& sColor);
|
||||
void DrawTextKey(const std::string& sColor);
|
||||
void DrawTextNewParagraph(const std::string& sColor);
|
||||
void DrawTextNote(const std::string& sColor);
|
||||
|
||||
CStream* GetStream() { return m_pStream; }
|
||||
|
||||
bool m_bStart;
|
||||
|
||||
Reference in New Issue
Block a user