| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfBoxStyleDictionary | 1 #ifndef __DEFINED__SkPdfBoxStyleDictionary |
| 2 #define __DEFINED__SkPdfBoxStyleDictionary | 2 #define __DEFINED__SkPdfBoxStyleDictionary |
| 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 box style dictionary |
| 8 class SkPdfBoxStyleDictionary : public SkPdfDictionary { | 9 class SkPdfBoxStyleDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kBoxStyleDictionary_SkPdfObje
ctType;} | 11 virtual SkPdfObjectType getType() const { return kBoxStyleDictionary_SkPdfObje
ctType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kBoxStyl
eDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kBoxStyl
eDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfBoxStyleDictionary* asBoxStyleDictionary() {return this;} | 14 virtual SkPdfBoxStyleDictionary* asBoxStyleDictionary() {return this;} |
| 14 virtual const SkPdfBoxStyleDictionary* asBoxStyleDictionary() const {return th
is;} | 15 virtual const SkPdfBoxStyleDictionary* asBoxStyleDictionary() const {return th
is;} |
| 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 SkPdfBoxStyleDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec
t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfBoxStyleDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec
t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfBoxStyleDictionary& operator=(const SkPdfBoxStyleDictionary& from) {this-
>fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;
} | 523 SkPdfBoxStyleDictionary& operator=(const SkPdfBoxStyleDictionary& from) {this-
>fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;
} |
| 523 | 524 |
| 525 /** (Required) An array of three numbers in the range 0.0 to 1.0, representing t
he com- |
| 526 * ponents in the DeviceRGB color space of the color to be used for displaying
the |
| 527 * guidelines. Default value: [0.0 0.0 0.0]. |
| 528 **/ |
| 529 bool has_C() const { |
| 530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); |
| 531 } |
| 532 |
| 524 SkPdfArray C() const { | 533 SkPdfArray C() const { |
| 525 SkPdfArray ret; | 534 SkPdfArray ret; |
| 526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &r
et)) return ret; | 535 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &r
et)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 536 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return SkPdfArray(); | 537 return SkPdfArray(); |
| 529 } | 538 } |
| 530 | 539 |
| 540 /** (Optional) The guideline width in default user space units. Default 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 guideline style: |
| 554 * S (Solid) A solid rectangle. |
| 555 * D (Dashed) A dashed rectangle. The dash pattern is specified by the D
entry |
| 556 * (see below). |
| 557 * Other guideline styles may be defined in the future. Default value: S. |
| 558 **/ |
| 559 bool has_S() const { |
| 560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 561 } |
| 562 |
| 538 std::string S() const { | 563 std::string S() const { |
| 539 std::string ret; | 564 std::string ret; |
| 540 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | 565 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return ""; | 567 return ""; |
| 543 } | 568 } |
| 544 | 569 |
| 570 /** (Optional) A dash array defining a pattern of dashes and gaps to be used in
drawing |
| 571 * dashed guidelines (guideline style D above). The dash array is specified in
default |
| 572 * user space units, in the same format as in the line dash pattern parameter o
f the |
| 573 * graphics state (see "Line Dash Pattern" on page 155). The dash phase is not
speci- |
| 574 * fied and is assumed to be 0. For example, a D entry of [3 2] specifies guide
lines |
| 575 * drawn with 3-point dashes alternating with 2-point gaps. Default value: [3]. |
| 576 **/ |
| 577 bool has_D() const { |
| 578 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "
", NULL)); |
| 579 } |
| 580 |
| 545 SkPdfArray D() const { | 581 SkPdfArray D() const { |
| 546 SkPdfArray ret; | 582 SkPdfArray ret; |
| 547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r
et)) return ret; | 583 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r
et)) return ret; |
| 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 584 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 549 return SkPdfArray(); | 585 return SkPdfArray(); |
| 550 } | 586 } |
| 551 | 587 |
| 552 }; | 588 }; |
| 553 | 589 |
| 554 #endif // __DEFINED__SkPdfBoxStyleDictionary | 590 #endif // __DEFINED__SkPdfBoxStyleDictionary |
| OLD | NEW |