structure are copied to the canvas.
*/
explicit SkCanvas(const SkBitmap& bitmap);
+
+ /** Construct a canvas with the specified bitmap to draw into.
+ @param bitmap Specifies a bitmap for the canvas to draw into. Its
+ structure are copied to the canvas.
+ @param props New canvas surface properties.
+ */
+ SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props);
+
virtual ~SkCanvas();
SkMetaData& getMetaData();
};
SkCanvas(const SkIRect& bounds, InitFlags);
SkCanvas(SkBaseDevice*, const SkSurfaceProps*, InitFlags);
- SkCanvas(const SkBitmap&, const SkSurfaceProps&);
// needs gettotalclip()
friend class SkCanvasStateUtils;
}
bm.eraseColor(SK_ColorTRANSPARENT);
- SkCanvas canvas(bm);
+ // Always disable LCD text, since we can't assume our image will be opaque.
+ SkCanvas canvas(bm, SkSurfaceProps(0, kUnknown_SkPixelGeometry));
+
canvas.scale(tileScale.width(), tileScale.height());
canvas.translate(-fTile.x(), -fTile.y());
canvas.drawPicture(fPicture);