diff options
author | 2017-06-27 09:58:56 -0400 | |
---|---|---|
committer | 2017-06-27 15:33:35 +0000 | |
commit | b964238f0bded00bae59c26c5f366a7780a0ef5f (patch) | |
tree | ce1869a71baf1bd518b8edafe00507af0deafb67 /src/xps | |
parent | ca0b43803b45d6e24c13edb118cc3862bb00f7ae (diff) |
SkDevice::drawBitmap takes x,y, not matrix
Motivation: a simpler call should make it easier for SkPDF to learn how
to do drawBitmap with A8 bitmap and a maskfilter.
Change-Id: I1a5d190b40b0e9e08fa8876d265a9835a3e9987d
Reviewed-on: https://skia-review.googlesource.com/20961
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/xps')
-rw-r--r-- | src/xps/SkXPSDevice.cpp | 6 | ||||
-rw-r--r-- | src/xps/SkXPSDevice.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp index 202259090e..801b80c0b0 100644 --- a/src/xps/SkXPSDevice.cpp +++ b/src/xps/SkXPSDevice.cpp @@ -1780,7 +1780,9 @@ HRESULT SkXPSDevice::clipToPath(IXpsOMVisual* xpsVisual, } void SkXPSDevice::drawBitmap(const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint& paint) { + SkScalar x, + SkScalar y, + const SkPaint& paint) { if (this->cs().isEmpty(size(*this))) { return; } @@ -1807,7 +1809,7 @@ void SkXPSDevice::drawBitmap(const SkBitmap& bitmap, HRVM(shadedGeometry->GetFigures(&shadedFigures), "Could not get the figures for bitmap."); - SkMatrix transform = matrix; + SkMatrix transform = SkMatrix::MakeTrans(x, y); transform.postConcat(this->ctm()); SkTScopedComPtr<IXpsOMMatrixTransform> xpsTransform; diff --git a/src/xps/SkXPSDevice.h b/src/xps/SkXPSDevice.h index a0b4257071..7aa60a0830 100644 --- a/src/xps/SkXPSDevice.h +++ b/src/xps/SkXPSDevice.h @@ -88,7 +88,9 @@ protected: const SkMatrix* prePathMatrix = NULL, bool pathIsMutable = false) override; void drawBitmap(const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint& paint) override; + SkScalar x, + SkScalar y, + const SkPaint& paint) override; void drawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint& paint) override; void drawBitmapRect(const SkBitmap&, |