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 #ifndef UNICODE | 8 #ifndef UNICODE |
9 #define UNICODE | 9 #define UNICODE |
10 #endif | 10 #endif |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 segmentTypes , segmentData, segmentStrokes), | 1152 segmentTypes , segmentData, segmentStrokes), |
1153 "Could not add segment data to quad."); | 1153 "Could not add segment data to quad."); |
1154 | 1154 |
1155 // Set the closed and filled properties of the figure. | 1155 // Set the closed and filled properties of the figure. |
1156 HRM((*xpsQuad)->SetIsClosed(stroke), "Could not set quad close."); | 1156 HRM((*xpsQuad)->SetIsClosed(stroke), "Could not set quad close."); |
1157 HRM((*xpsQuad)->SetIsFilled(fill), "Could not set quad fill."); | 1157 HRM((*xpsQuad)->SetIsFilled(fill), "Could not set quad fill."); |
1158 | 1158 |
1159 return S_OK; | 1159 return S_OK; |
1160 } | 1160 } |
1161 | 1161 |
1162 void SkXPSDevice::clear(SkColor color) { | |
1163 //TODO: override this for XPS | |
1164 SkDEBUGF(("XPS clear not yet implemented.")); | |
1165 } | |
1166 | |
1167 void SkXPSDevice::drawPoints(const SkDraw& d, SkCanvas::PointMode mode, | 1162 void SkXPSDevice::drawPoints(const SkDraw& d, SkCanvas::PointMode mode, |
1168 size_t count, const SkPoint points[], | 1163 size_t count, const SkPoint points[], |
1169 const SkPaint& paint) { | 1164 const SkPaint& paint) { |
1170 //This will call back into the device to do the drawing. | 1165 //This will call back into the device to do the drawing. |
1171 d.drawPoints(mode, count, points, paint, true); | 1166 d.drawPoints(mode, count, points, paint, true); |
1172 } | 1167 } |
1173 | 1168 |
1174 void SkXPSDevice::drawVertices(const SkDraw&, SkCanvas::VertexMode, | 1169 void SkXPSDevice::drawVertices(const SkDraw&, SkCanvas::VertexMode, |
1175 int vertexCount, const SkPoint verts[], | 1170 int vertexCount, const SkPoint verts[], |
1176 const SkPoint texs[], const SkColor colors[], | 1171 const SkPoint texs[], const SkColor colors[], |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2274 IID_PPV_ARGS(&this->fXpsFactory)), | 2269 IID_PPV_ARGS(&this->fXpsFactory)), |
2275 "Could not create factory for layer."); | 2270 "Could not create factory for layer."); |
2276 | 2271 |
2277 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), | 2272 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
2278 "Could not create canvas for layer."); | 2273 "Could not create canvas for layer."); |
2279 } | 2274 } |
2280 | 2275 |
2281 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { | 2276 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { |
2282 return false; | 2277 return false; |
2283 } | 2278 } |
OLD | NEW |