OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #ifndef SkPDFTypes_DEFINED | 9 #ifndef SkPDFTypes_DEFINED |
10 #define SkPDFTypes_DEFINED | 10 #define SkPDFTypes_DEFINED |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 SK_DECLARE_INST_COUNT(SkPDFArray) | 250 SK_DECLARE_INST_COUNT(SkPDFArray) |
251 | 251 |
252 static const int kMaxLen = 8191; | 252 static const int kMaxLen = 8191; |
253 | 253 |
254 /** Create a PDF array. Maximum length is 8191. | 254 /** Create a PDF array. Maximum length is 8191. |
255 */ | 255 */ |
256 SkPDFArray(); | 256 SkPDFArray(); |
257 virtual ~SkPDFArray(); | 257 virtual ~SkPDFArray(); |
258 | 258 |
259 // The SkPDFObject interface. | 259 // The SkPDFObject interface. |
260 virtual void emitObject(SkWStream* stream, | 260 void emitObject(SkWStream* stream, |
261 const SkPDFObjNumMap& objNumMap, | 261 const SkPDFObjNumMap& objNumMap, |
262 const SkPDFSubstituteMap& substitutes) override; | 262 const SkPDFSubstituteMap& substitutes) override; |
263 virtual void addResources(SkPDFObjNumMap*, | 263 void addResources(SkPDFObjNumMap*, |
264 const SkPDFSubstituteMap&) const override; | 264 const SkPDFSubstituteMap&) const override; |
265 | 265 |
266 /** The size of the array. | 266 /** The size of the array. |
267 */ | 267 */ |
268 int size() const; | 268 int size() const; |
269 | 269 |
270 /** Preallocate space for the given number of entries. | 270 /** Preallocate space for the given number of entries. |
271 * @param length The number of array slots to preallocate. | 271 * @param length The number of array slots to preallocate. |
272 */ | 272 */ |
273 void reserve(int length); | 273 void reserve(int length); |
274 | 274 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 SkPDFDict(); | 312 SkPDFDict(); |
313 | 313 |
314 /** Create a PDF dictionary with a Type entry. | 314 /** Create a PDF dictionary with a Type entry. |
315 * @param type The value of the Type entry. | 315 * @param type The value of the Type entry. |
316 */ | 316 */ |
317 explicit SkPDFDict(const char type[]); | 317 explicit SkPDFDict(const char type[]); |
318 | 318 |
319 virtual ~SkPDFDict(); | 319 virtual ~SkPDFDict(); |
320 | 320 |
321 // The SkPDFObject interface. | 321 // The SkPDFObject interface. |
322 virtual void emitObject(SkWStream* stream, | 322 void emitObject(SkWStream* stream, |
323 const SkPDFObjNumMap& objNumMap, | 323 const SkPDFObjNumMap& objNumMap, |
324 const SkPDFSubstituteMap& substitutes) override; | 324 const SkPDFSubstituteMap& substitutes) override; |
325 virtual void addResources(SkPDFObjNumMap*, | 325 void addResources(SkPDFObjNumMap*, |
326 const SkPDFSubstituteMap&) const override; | 326 const SkPDFSubstituteMap&) const override; |
327 | 327 |
328 /** The size of the dictionary. | 328 /** The size of the dictionary. |
329 */ | 329 */ |
330 int size() const; | 330 int size() const; |
331 | 331 |
332 /** Add the value to the dictionary with the given key. Refs value. | 332 /** Add the value to the dictionary with the given key. Refs value. |
333 * @param key The key for this dictionary entry. | 333 * @param key The key for this dictionary entry. |
334 * @param value The value for this dictionary entry. | 334 * @param value The value for this dictionary entry. |
335 * @return The value argument is returned. | 335 * @return The value argument is returned. |
336 */ | 336 */ |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 429 |
430 SkPDFObject* operator()(SkPDFObject* o) const { | 430 SkPDFObject* operator()(SkPDFObject* o) const { |
431 return this->getSubstitute(o); | 431 return this->getSubstitute(o); |
432 } | 432 } |
433 | 433 |
434 private: | 434 private: |
435 SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap; | 435 SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap; |
436 }; | 436 }; |
437 | 437 |
438 #endif | 438 #endif |
OLD | NEW |