Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: src/core/SkNinePatchIter.h

Issue 1992283002: Add drawBitmapLattice() API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add implementation for SkRecorder and SkPictureRecord Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkNinePatchIter.h
diff --git a/src/core/SkNinePatchIter.h b/src/core/SkNinePatchIter.h
index df06c1f630215637e5e005ebf230f491191517f5..54dfee6140b31ec70907a155b6a03064a10a0afb 100644
--- a/src/core/SkNinePatchIter.h
+++ b/src/core/SkNinePatchIter.h
@@ -8,7 +8,9 @@
#ifndef SkNinePatchIter_DEFINED
#define SkNinePatchIter_DEFINED
+#include "SkCanvas.h"
#include "SkScalar.h"
+#include "SkTArray.h"
struct SkIRect;
struct SkRect;
@@ -18,6 +20,12 @@ struct SkRect;
*/
class SkNinePatchIter {
public:
+
+ static bool Valid(int imageWidth, int imageHeight, const SkCanvas::NinePatchDivs& divs);
+
+ SkNinePatchIter(int imageWidth, int imageHeight, const SkCanvas::NinePatchDivs& divs,
+ const SkRect& dst);
+
static bool Valid(int imageWidth, int imageHeight, const SkIRect& center);
SkNinePatchIter(int imageWidth, int imageHeight, const SkIRect& center, const SkRect& dst);
@@ -28,10 +36,10 @@ public:
bool next(SkRect* src, SkRect* dst);
private:
- SkScalar fSrcX[4];
- SkScalar fSrcY[4];
- SkScalar fDstX[4];
- SkScalar fDstY[4];
+ SkTArray<SkScalar> fSrcX;
+ SkTArray<SkScalar> fSrcY;
+ SkTArray<SkScalar> fDstX;
+ SkTArray<SkScalar> fDstY;
int fCurrX;
int fCurrY;

Powered by Google App Engine
This is Rietveld 408576698