Home | History | Annotate | Download | only in graphics

Lines Matching refs:Canvas

23  * A Picture records drawing calls (via the canvas returned by beginRecording)
24 * and can then play them back into Canvas (via {@link Picture#draw(Canvas)} or
25 * {@link Canvas#drawPicture(Picture)}).For most content (e.g. text, lines, rectangles),
31 * be replayed on a hardware accelerated canvas.</p>
74 * To record a picture, call beginRecording() and then draw into the Canvas
76 * commands (e.g. {@link Canvas#drawRect(Rect, Paint)}) will be recorded.
77 * To stop recording, call endRecording(). After endRecording() the Canvas
81 public Canvas beginRecording(int width, int height) {
93 * may be drawn, but the canvas that was returned by beginRecording must not
95 * or {@link Canvas#drawPicture(Picture)} is called.
123 * drawn to a hardware-accelerated canvas. If this returns true then this Picture can only
124 * be drawn to another Picture or to a Canvas where canvas.isHardwareAccelerated() is true.
129 * @return true if the Picture can only be drawn to a hardware-accelerated canvas,
137 * Draw this picture on the canvas.
140 * have the side effect of changing the matrix and clip of the canvas
147 * @param canvas The picture is drawn to this canvas
149 public void draw(Canvas canvas) {
153 if (mRequiresHwAcceleration && !canvas.isHardwareAccelerated()) {
154 canvas.onHwBitmapInSwMode();
156 nativeDraw(canvas.getNativeCanvasWrapper(), mNativePicture);
208 private static class PictureCanvas extends Canvas {
221 throw new RuntimeException("Cannot call setBitmap on a picture canvas");
227 throw new RuntimeException("Cannot draw a picture into its recording canvas");