canvas->saveLayer(&rect, &paint);
canvas->drawBitmap(bitmap, 0, 0);
canvas->restore();
-
+
SkPaint strokePaint;
strokePaint.setColor(0xFFFF0000);
strokePaint.setStyle(SkPaint::kStroke_Style);
rect.outset(SkIntToScalar(outset),
SkIntToScalar(outset));
SkImageFilter::CropRect big_rect(rect, SkImageFilter::CropRect::kHasAll_CropEdge);
-
+
draw(canvas, checkerboard, rect, SkColorFilterImageFilter::Create(
cf_alpha_trans, noop_cropped.get(), &big_rect));
kNeighborFlagCount = 8
};
-// We treat an "edge" as a place where we cross from black to non-black, or vice versa.
+// We treat an "edge" as a place where we cross from black to non-black, or vice versa.
// 'neighborFlags' is used to limit the directions in which we test to avoid indexing
// outside of the image
static bool found_edge(const unsigned char* imagePtr, int width, int neighborFlags) {