| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfLineAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfLineAnnotationDictionary |
| 2 #define __DEFINED__SkPdfLineAnnotationDictionary | 2 #define __DEFINED__SkPdfLineAnnotationDictionary |
| 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 line annotation | 9 // Additional entries specific to a line annotation |
| 10 class SkPdfLineAnnotationDictionary : public SkPdfDictionary { | 10 class SkPdfLineAnnotationDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfLineAnnotationDictionary& operator=(const SkPdfLineAnnotationDictionary&
from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; r
eturn *this;} | 526 SkPdfLineAnnotationDictionary& operator=(const SkPdfLineAnnotationDictionary&
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 Li
ne | 528 /** (Required) The type of annotation that this dictionary describes; must be Li
ne |
| 529 * for a line annotation. | 529 * for a line annotation. |
| 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 /** (Required) An array of four numbers, [x1 y1 x2 y2 ], specifying the starting
and | 544 /** (Required) An array of four numbers, [x1 y1 x2 y2 ], specifying the starting
and |
| 557 * ending coordinates of the line in default user space. | 545 * ending coordinates of the line in default user space. |
| 558 **/ | 546 **/ |
| 559 bool has_L() const { | 547 bool has_L() const { |
| 560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "
", NULL)); | 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "
", NULL)); |
| 561 } | 549 } |
| 562 | 550 |
| 563 SkPdfArray* L() const { | 551 SkPdfArray* L() const; |
| 564 SkPdfArray* ret; | |
| 565 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", &r
et)) return ret; | |
| 566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 567 return NULL; | |
| 568 } | |
| 569 | |
| 570 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying
the | 552 /** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying
the |
| 571 * width and dash pattern to be used in drawing the line. | 553 * width and dash pattern to be used in drawing the line. |
| 572 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the L | 554 * Note: The annotation dictionary's AP entry, if present, takes precedence ove
r the L |
| 573 * and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearance St
reams." | 555 * and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearance St
reams." |
| 574 **/ | 556 **/ |
| 575 bool has_BS() const { | 557 bool has_BS() const { |
| 576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS",
"", NULL)); | 558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS",
"", NULL)); |
| 577 } | 559 } |
| 578 | 560 |
| 579 SkPdfDictionary* BS() const { | 561 SkPdfDictionary* BS() const; |
| 580 SkPdfDictionary* ret; | |
| 581 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS",
"", &ret)) return ret; | |
| 582 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 583 return NULL; | |
| 584 } | |
| 585 | |
| 586 /** (Optional; PDF 1.4) An array of two names specifying the line ending styles
to be | 562 /** (Optional; PDF 1.4) An array of two names specifying the line ending styles
to be |
| 587 * used in drawing the line. The first and second elements of the array specify
the | 563 * used in drawing the line. The first and second elements of the array specify
the |
| 588 * line ending styles for the endpoints defined, respectively, by the first and
second | 564 * line ending styles for the endpoints defined, respectively, by the first and
second |
| 589 * pairs of coordinates, (x1 , y1 ) and (x2 , y2 ), in the L array. Table 8.19
shows the | 565 * pairs of coordinates, (x1 , y1 ) and (x2 , y2 ), in the L array. Table 8.19
shows the |
| 590 * possible values. Default value: [/None /None]. | 566 * possible values. Default value: [/None /None]. |
| 591 **/ | 567 **/ |
| 592 bool has_LE() const { | 568 bool has_LE() const { |
| 593 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE",
"", NULL)); | 569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE",
"", NULL)); |
| 594 } | 570 } |
| 595 | 571 |
| 596 SkPdfArray* LE() const { | 572 SkPdfArray* LE() const; |
| 597 SkPdfArray* ret; | |
| 598 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE", "", &
ret)) return ret; | |
| 599 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 600 return NULL; | |
| 601 } | |
| 602 | |
| 603 /** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0 specif
ying | 573 /** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0 specif
ying |
| 604 * the components, in the DeviceRGB color space, of the interior color with whi
ch to | 574 * the components, in the DeviceRGB color space, of the interior color with whi
ch to |
| 605 * fill the annotation's line endings (see Table 8.19). If this entry is absent
, the inte- | 575 * fill the annotation's line endings (see Table 8.19). If this entry is absent
, the inte- |
| 606 * riors of the line endings are left transparent. | 576 * riors of the line endings are left transparent. |
| 607 **/ | 577 **/ |
| 608 bool has_IC() const { | 578 bool has_IC() const { |
| 609 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC",
"", NULL)); | 579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC",
"", NULL)); |
| 610 } | 580 } |
| 611 | 581 |
| 612 SkPdfArray* IC() const { | 582 SkPdfArray* IC() const; |
| 613 SkPdfArray* ret; | |
| 614 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", &
ret)) return ret; | |
| 615 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 616 return NULL; | |
| 617 } | |
| 618 | |
| 619 }; | 583 }; |
| 620 | 584 |
| 621 #endif // __DEFINED__SkPdfLineAnnotationDictionary | 585 #endif // __DEFINED__SkPdfLineAnnotationDictionary |
| OLD | NEW |