| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfBorderStyleDictionary | 1 #ifndef __DEFINED__SkPdfBorderStyleDictionary |
| 2 #define __DEFINED__SkPdfBorderStyleDictionary | 2 #define __DEFINED__SkPdfBorderStyleDictionary |
| 3 | 3 |
| 4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
| 5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
| 6 #include "SkPdfDictionary_autogen.h" | 6 #include "SkPdfDictionary_autogen.h" |
| 7 | 7 |
| 8 // Entries in a border style dictionary |
| 8 class SkPdfBorderStyleDictionary : public SkPdfDictionary { | 9 class SkPdfBorderStyleDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kBorderStyleDictionary_SkPdfO
bjectType;} | 11 virtual SkPdfObjectType getType() const { return kBorderStyleDictionary_SkPdfO
bjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kBorderS
tyleDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kBorderS
tyleDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfBorderStyleDictionary* asBorderStyleDictionary() {return this;} | 14 virtual SkPdfBorderStyleDictionary* asBorderStyleDictionary() {return this;} |
| 14 virtual const SkPdfBorderStyleDictionary* asBorderStyleDictionary() const {ret
urn this;} | 15 virtual const SkPdfBorderStyleDictionary* asBorderStyleDictionary() const {ret
urn this;} |
| 15 | 16 |
| 16 private: | 17 private: |
| 17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 515 |
| 515 public: | 516 public: |
| 516 private: | 517 private: |
| 517 public: | 518 public: |
| 518 SkPdfBorderStyleDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb
ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfBorderStyleDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb
ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfBorderStyleDictionary& operator=(const SkPdfBorderStyleDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} | 523 SkPdfBorderStyleDictionary& operator=(const SkPdfBorderStyleDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} |
| 523 | 524 |
| 525 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be |
| 526 * Border for a border style dictionary. |
| 527 **/ |
| 528 bool has_Type() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 530 } |
| 531 |
| 524 std::string Type() const { | 532 std::string Type() const { |
| 525 std::string ret; | 533 std::string ret; |
| 526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 535 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return ""; | 536 return ""; |
| 529 } | 537 } |
| 530 | 538 |
| 539 /** (Optional) The border width in points. If this value is 0, no border is draw
n. Default |
| 540 * value: 1. |
| 541 **/ |
| 542 bool has_W() const { |
| 543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "
", NULL)); |
| 544 } |
| 545 |
| 531 double W() const { | 546 double W() const { |
| 532 double ret; | 547 double ret; |
| 533 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &
ret)) return ret; | 548 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &
ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 549 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return 0; | 550 return 0; |
| 536 } | 551 } |
| 537 | 552 |
| 553 /** (Optional) The border style: |
| 554 * S (Solid) A solid rectangle surrounding the annotation. |
| 555 * D (Dashed) A dashed rectangle surrounding the annotation. The dash pa
ttern |
| 556 * is specified by the D entry (see below). |
| 557 * B (Beveled) A simulated embossed rectangle that appears to be raised
above the |
| 558 * surface of the page. |
| 559 * I (Inset) A simulated engraved rectangle that appears to be recessed
below the |
| 560 * surface of the page. |
| 561 * U (Underline) A single line along the bottom of the annotation rectan
gle. |
| 562 * Other border styles may be defined in the future. (See implementation note 6
4 in |
| 563 * Appendix H.) Default value: S. |
| 564 **/ |
| 565 bool has_S() const { |
| 566 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 567 } |
| 568 |
| 538 std::string S() const { | 569 std::string S() const { |
| 539 std::string ret; | 570 std::string ret; |
| 540 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | 571 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 572 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return ""; | 573 return ""; |
| 543 } | 574 } |
| 544 | 575 |
| 576 /** (Optional) A dash array defining a pattern of dashes and gaps to be used in
drawing a |
| 577 * dashed border (border style D above). The dash array is specified in the sam
e format |
| 578 * as in the line dash pattern parameter of the graphics state (see "Line Dash
Pattern" on |
| 579 * page 155). The dash phase is not specified and is assumed to be 0. For examp
le, a D |
| 580 * entry of [3 2] specifies a border drawn with 3-point dashes alternating with
2-point |
| 581 * gaps. Default value: [3]. |
| 582 **/ |
| 583 bool has_D() const { |
| 584 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "
", NULL)); |
| 585 } |
| 586 |
| 545 SkPdfArray D() const { | 587 SkPdfArray D() const { |
| 546 SkPdfArray ret; | 588 SkPdfArray ret; |
| 547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r
et)) return ret; | 589 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r
et)) return ret; |
| 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 590 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 549 return SkPdfArray(); | 591 return SkPdfArray(); |
| 550 } | 592 } |
| 551 | 593 |
| 552 }; | 594 }; |
| 553 | 595 |
| 554 #endif // __DEFINED__SkPdfBorderStyleDictionary | 596 #endif // __DEFINED__SkPdfBorderStyleDictionary |
| OLD | NEW |