OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkPDFTypes.h" | 9 #include "SkPDFTypes.h" |
10 #include "SkStream.h" | 10 #include "SkStream.h" |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 void SkPDFDict::insertObject(const SkString& key, SkPDFObject* value) { | 511 void SkPDFDict::insertObject(const SkString& key, SkPDFObject* value) { |
512 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(value)); | 512 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(value)); |
513 } | 513 } |
514 | 514 |
515 // DEPRECATED | 515 // DEPRECATED |
516 SkPDFObject* SkPDFDict::insert(const char key[], SkPDFObject* value) { | 516 SkPDFObject* SkPDFDict::insert(const char key[], SkPDFObject* value) { |
517 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(SkRef(value))); | 517 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(SkRef(value))); |
518 return value; | 518 return value; |
519 } | 519 } |
520 | 520 |
| 521 void SkPDFDict::insertBool(const char key[], bool value) { |
| 522 this->set(SkPDFUnion::Name(key), SkPDFUnion::Bool(value)); |
| 523 } |
| 524 |
521 void SkPDFDict::insertInt(const char key[], int32_t value) { | 525 void SkPDFDict::insertInt(const char key[], int32_t value) { |
522 this->set(SkPDFUnion::Name(key), SkPDFUnion::Int(value)); | 526 this->set(SkPDFUnion::Name(key), SkPDFUnion::Int(value)); |
523 } | 527 } |
524 | 528 |
525 void SkPDFDict::insertInt(const char key[], size_t value) { | 529 void SkPDFDict::insertInt(const char key[], size_t value) { |
526 this->insertInt(key, SkToS32(value)); | 530 this->insertInt(key, SkToS32(value)); |
527 } | 531 } |
528 | 532 |
529 void SkPDFDict::insertScalar(const char key[], SkScalar value) { | 533 void SkPDFDict::insertScalar(const char key[], SkScalar value) { |
530 this->set(SkPDFUnion::Name(key), SkPDFUnion::Scalar(value)); | 534 this->set(SkPDFUnion::Name(key), SkPDFUnion::Scalar(value)); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 fObjects.push(obj); | 587 fObjects.push(obj); |
584 return true; | 588 return true; |
585 } | 589 } |
586 | 590 |
587 int32_t SkPDFObjNumMap::getObjectNumber(SkPDFObject* obj) const { | 591 int32_t SkPDFObjNumMap::getObjectNumber(SkPDFObject* obj) const { |
588 int32_t* objectNumberFound = fObjectNumbers.find(obj); | 592 int32_t* objectNumberFound = fObjectNumbers.find(obj); |
589 SkASSERT(objectNumberFound); | 593 SkASSERT(objectNumberFound); |
590 return *objectNumberFound; | 594 return *objectNumberFound; |
591 } | 595 } |
592 | 596 |
OLD | NEW |