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