OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 #include "SkPDFDevice.h" | 8 #include "SkPDFDevice.h" |
9 | 9 |
10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 SkPath shape; | 2175 SkPath shape; |
2176 shape.addRect(SkRect::MakeWH(SkIntToScalar(subset.width()), | 2176 shape.addRect(SkRect::MakeWH(SkIntToScalar(subset.width()), |
2177 SkIntToScalar( subset.height()))); | 2177 SkIntToScalar( subset.height()))); |
2178 shape.transform(matrix); | 2178 shape.transform(matrix); |
2179 content.setShape(shape); | 2179 content.setShape(shape); |
2180 } | 2180 } |
2181 if (!content.needSource()) { | 2181 if (!content.needSource()) { |
2182 return; | 2182 return; |
2183 } | 2183 } |
2184 | 2184 |
2185 SkAutoTUnref<SkPDFImage> image( | 2185 SkAutoTUnref<SkPDFObject> image( |
2186 SkPDFImage::CreateImage(*bitmap, subset, fEncoder)); | 2186 SkPDFCreateImageObject(*bitmap, subset, fEncoder)); |
2187 if (!image) { | 2187 if (!image) { |
2188 return; | 2188 return; |
2189 } | 2189 } |
2190 | 2190 |
2191 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), | 2191 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), |
2192 &content.entry()->fContent); | 2192 &content.entry()->fContent); |
2193 } | 2193 } |
2194 | 2194 |
OLD | NEW |