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