| 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 | 9 |
| 10 #ifndef SkPDFShader_DEFINED | 10 #ifndef SkPDFShader_DEFINED |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 In PDF parlance, this is a pattern, used in place of a color when the | 23 In PDF parlance, this is a pattern, used in place of a color when the |
| 24 pattern color space is selected. | 24 pattern color space is selected. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 class SkPDFShader { | 27 class SkPDFShader { |
| 28 public: | 28 public: |
| 29 class State; | 29 class State; |
| 30 | 30 |
| 31 /** Get the PDF shader for the passed SkShader. If the SkShader is | 31 /** Get the PDF shader for the passed SkShader. If the SkShader is |
| 32 * invalid in some way, returns NULL. The reference count of | 32 * invalid in some way, returns nullptr. The reference count of |
| 33 * the object is incremented and it is the caller's responsibility to | 33 * the object is incremented and it is the caller's responsibility to |
| 34 * unreference it when done. This is needed to accommodate the weak | 34 * unreference it when done. This is needed to accommodate the weak |
| 35 * reference pattern used when the returned object is new and has no | 35 * reference pattern used when the returned object is new and has no |
| 36 * other references. | 36 * other references. |
| 37 * @param shader The SkShader to emulate. | 37 * @param shader The SkShader to emulate. |
| 38 * @param matrix The current transform. (PDF shaders are absolutely | 38 * @param matrix The current transform. (PDF shaders are absolutely |
| 39 * positioned, relative to where the page is drawn.) | 39 * positioned, relative to where the page is drawn.) |
| 40 * @param surfceBBox The bounding box of the drawing surface (with matrix | 40 * @param surfceBBox The bounding box of the drawing surface (with matrix |
| 41 * already applied). | 41 * already applied). |
| 42 * @param rasterScale Additional scale to be applied for early | 42 * @param rasterScale Additional scale to be applied for early |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 virtual ~SkPDFImageShader(); | 92 virtual ~SkPDFImageShader(); |
| 93 bool equals(const SkPDFShader::State&) const; | 93 bool equals(const SkPDFShader::State&) const; |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 SkAutoTDelete<const SkPDFShader::State> fShaderState; | 96 SkAutoTDelete<const SkPDFShader::State> fShaderState; |
| 97 SkPDFImageShader(SkPDFShader::State*); | 97 SkPDFImageShader(SkPDFShader::State*); |
| 98 typedef SkPDFStream INHERITED; | 98 typedef SkPDFStream INHERITED; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 #endif | 101 #endif |
| OLD | NEW |