| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfSquareOrCircleAnnotation | 1 #ifndef __DEFINED__SkPdfSquareOrCircleAnnotation |
| 2 #define __DEFINED__SkPdfSquareOrCircleAnnotation | 2 #define __DEFINED__SkPdfSquareOrCircleAnnotation |
| 3 | 3 |
| 4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
| 5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
| 6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
| 7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
| 8 | 8 |
| 9 // Additional entries specific to a square or circle annotation | 9 // Additional entries specific to a square or circle annotation |
| 10 class SkPdfSquareOrCircleAnnotation : public SkPdfDictionary { | 10 class SkPdfSquareOrCircleAnnotation : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfSquareOrCircleAnnotation& operator=(const SkPdfSquareOrCircleAnnotation&
from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r
eturn *this;} | 526 SkPdfSquareOrCircleAnnotation& operator=(const SkPdfSquareOrCircleAnnotation&
from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r
eturn *this;} |
| 527 | 527 |
| 528 /** (Required) The type of annotation that this dictionary describes; must be Sq
uare | 528 /** (Required) The type of annotation that this dictionary describes; must be Sq
uare |
| 529 * or Circle for a square or circle annotation, respectively. | 529 * or Circle for a square or circle annotation, respectively. |
| 530 **/ | 530 **/ |
| 531 bool has_Subtype() const { | 531 bool has_Subtype() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Subtype() const { | 535 std::string Subtype() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) The text to be displayed in the pop-up window when the annotation | 536 /** (Required) The text to be displayed in the pop-up window when the annotation |
| 543 * is opened. Carriage returns may be used to separate the text into paragraphs
. | 537 * is opened. Carriage returns may be used to separate the text into paragraphs
. |
| 544 **/ | 538 **/ |
| 545 bool has_Contents() const { | 539 bool has_Contents() const { |
| 546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
| 547 } | 541 } |
| 548 | 542 |
| 549 std::string Contents() const { | 543 std::string Contents() const; |
| 550 std::string ret; | |
| 551 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | |
| 552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 553 return ""; | |
| 554 } | |
| 555 | |
| 556 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying
the | 544 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying
the |
| 557 * line width and dash pattern to be used in drawing the rectangle or ellipse. | 545 * line width and dash pattern to be used in drawing the rectangle or ellipse. |
| 558 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the | 546 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the |
| 559 * Rect and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearan
ce | 547 * Rect and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearan
ce |
| 560 * Streams." | 548 * Streams." |
| 561 **/ | 549 **/ |
| 562 bool has_BS() const { | 550 bool has_BS() const { |
| 563 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS",
"", NULL)); | 551 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS",
"", NULL)); |
| 564 } | 552 } |
| 565 | 553 |
| 566 SkPdfDictionary* BS() const { | 554 SkPdfDictionary* BS() const; |
| 567 SkPdfDictionary* ret; | |
| 568 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS",
"", &ret)) return ret; | |
| 569 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 570 return NULL; | |
| 571 } | |
| 572 | |
| 573 /** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0 specif
ying | 555 /** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0 specif
ying |
| 574 * the components, in the DeviceRGB color space, of the interior color with whi
ch to | 556 * the components, in the DeviceRGB color space, of the interior color with whi
ch to |
| 575 * fill the annotation's rectangle or ellipse (see Table 8.19). If this entry i
s absent, | 557 * fill the annotation's rectangle or ellipse (see Table 8.19). If this entry i
s absent, |
| 576 * the interior of the annotation is left transparent. | 558 * the interior of the annotation is left transparent. |
| 577 **/ | 559 **/ |
| 578 bool has_IC() const { | 560 bool has_IC() const { |
| 579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC",
"", NULL)); | 561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC",
"", NULL)); |
| 580 } | 562 } |
| 581 | 563 |
| 582 SkPdfArray* IC() const { | 564 SkPdfArray* IC() const; |
| 583 SkPdfArray* ret; | |
| 584 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", &
ret)) return ret; | |
| 585 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 586 return NULL; | |
| 587 } | |
| 588 | |
| 589 }; | 565 }; |
| 590 | 566 |
| 591 #endif // __DEFINED__SkPdfSquareOrCircleAnnotation | 567 #endif // __DEFINED__SkPdfSquareOrCircleAnnotation |
| OLD | NEW |