| Index: src/device/xps/SkXPSDevice.cpp
|
| diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp
|
| index c1105a2e94c034eb6b0dac5aee6bc20ad5fa5d4b..6253b8464f976c5d3b8aaf861fd4fe3fe7297f4f 100644
|
| --- a/src/device/xps/SkXPSDevice.cpp
|
| +++ b/src/device/xps/SkXPSDevice.cpp
|
| @@ -5,13 +5,16 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| +#include "SkTypes.h"
|
| +
|
| +#ifdef SK_SUPPORT_XPS
|
| +
|
| #ifndef UNICODE
|
| #define UNICODE
|
| #endif
|
| #ifndef _UNICODE
|
| #define _UNICODE
|
| #endif
|
| -#include "SkTypes.h"
|
| #include <ObjBase.h>
|
| #include <XpsObjectModel.h>
|
| #include <T2EmbApi.h>
|
| @@ -23,6 +26,7 @@
|
| #include "SkDraw.h"
|
| #include "SkDrawProcs.h"
|
| #include "SkEndian.h"
|
| +#include "SkGeometry.h"
|
| #include "SkGlyphCache.h"
|
| #include "SkHRESULT.h"
|
| #include "SkImageEncoder.h"
|
| @@ -1363,6 +1367,20 @@ HRESULT SkXPSDevice::addXpsPathGeometry(
|
| segmentData.push(SkScalarToFLOAT(points[3].fX));
|
| segmentData.push(SkScalarToFLOAT(points[3].fY));
|
| break;
|
| + case SkPath::kConic_Verb: {
|
| + const SkScalar tol = SK_Scalar1 / 4;
|
| + SkAutoConicToQuads converter;
|
| + const SkPoint* quads = converter.computeQuads(points, iter.conicWeight(), tol);
|
| + for (int i = 0; i < converter.countQuads(); ++i) {
|
| + segmentTypes.push(XPS_SEGMENT_TYPE_QUADRATIC_BEZIER);
|
| + segmentStrokes.push(stroke);
|
| + segmentData.push(SkScalarToFLOAT(quads[2 * i + 1].fX));
|
| + segmentData.push(SkScalarToFLOAT(quads[2 * i + 1].fY));
|
| + segmentData.push(SkScalarToFLOAT(quads[2 * i + 2].fX));
|
| + segmentData.push(SkScalarToFLOAT(quads[2 * i + 2].fY));
|
| + }
|
| + break;
|
| + }
|
| case SkPath::kClose_Verb:
|
| // we ignore these, and just get the whole segment from
|
| // the corresponding line/quad/cubic verbs
|
| @@ -2207,13 +2225,6 @@ void SkXPSDevice::drawPosText(const SkDraw& d,
|
| paint));
|
| }
|
|
|
| -void SkXPSDevice::drawTextOnPath(const SkDraw& d, const void* text, size_t len,
|
| - const SkPath& path, const SkMatrix* matrix,
|
| - const SkPaint& paint) {
|
| - //This will call back into the device to do the drawing.
|
| - d.drawTextOnPath((const char*)text, len, path, matrix, paint);
|
| -}
|
| -
|
| void SkXPSDevice::drawDevice(const SkDraw& d, SkBaseDevice* dev,
|
| int x, int y,
|
| const SkPaint&) {
|
| @@ -2275,3 +2286,5 @@ SkXPSDevice::SkXPSDevice(IXpsOMObjectFactory* xpsFactory)
|
| bool SkXPSDevice::allowImageFilter(const SkImageFilter*) {
|
| return false;
|
| }
|
| +
|
| +#endif // SK_SUPPORT_XPS
|
|
|