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

Unified Diff: include/core/SkCanvas.h

Issue 2382893002: Add a src rect to drawImageLattice() API (Closed)
Patch Set: Fix win Created 4 years, 3 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
« no previous file with comments | « gm/lattice.cpp ('k') | include/private/SkRecords.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 7bf84c978fed4aa0d549c4c29ab94b3f19084aa6..6251917301ae4725909d0985b559995cba642153 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -964,20 +964,20 @@ public:
};
// An array of x-coordinates that divide the bitmap vertically.
- // These must be unique, increasing, and in the set [0, width).
+ // These must be unique, increasing, and in the set [fBounds.fLeft, fBounds.fRight).
// Does not have ownership.
const int* fXDivs;
// An array of y-coordinates that divide the bitmap horizontally.
- // These must be unique, increasing, and in the set [0, height).
+ // These must be unique, increasing, and in the set [fBounds.fTop, fBounds.fBottom).
// Does not have ownership.
const int* fYDivs;
// If non-null, the length of this array must be equal to
// (fXCount + 1) * (fYCount + 1). Note that we allow the first rect
- // in each direction to empty (divs[0] = 0). In this case, the
- // caller still must specify a flag (as a placeholder) for these
- // empty rects.
+ // in each direction to be empty (ex: fXDivs[0] = fBounds.fLeft).
+ // In this case, the caller still must specify a flag (as a placeholder)
+ // for these empty rects.
// The flags correspond to the rects in the lattice, first moving
// left to right and then top to bottom.
const Flags* fFlags;
@@ -987,6 +987,10 @@ public:
// The number of fYDivs.
int fYCount;
+
+ // The bound to draw from. Will ofetn be equal to the bounds of the
+ // input SkImage.
reed1 2016/09/29 21:11:38 1. could take a ptr to a rect, and null means the
+ SkIRect fBounds;
};
/**
« no previous file with comments | « gm/lattice.cpp ('k') | include/private/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698