@Override public Canvas clearRect(float x, float y, float width, float height) { ctx.clearRect(x, y, width, height); isDirty = true; return this; }
@Override public Canvas clearRect(float x, float y, float width, float height) { ctx.clearRect(x, y, width, height); isDirty = true; return this; }
@Override public Canvas clearRect(float x, float y, float width, float height) { ctx.clearRect(x, y, width, height); isDirty = true; return this; }
@Override public Canvas clear() { operations.clear(); addOperation(() -> context2d.clearRect(0, 0, control.getOffsetWidth(), control.getOffsetHeight())); return this; }
ctx.clearRect(oldBbox.getX(), oldBbox.getY(), oldBbox.getWidth(), oldBbox.getHeight()); } else if (oldBbox == null || (newBbox.contains(oldBbox.getX(), oldBbox.getY()) && newBbox.contains(oldBbox.getX() + oldBbox.getWidth(), oldBbox.getY() + oldBbox.getHeight()))) { ctx.clearRect(newBbox.getX(), newBbox.getY(), newBbox.getWidth(), newBbox.getHeight()); } else { ctx.clearRect(oldBbox.getX(), oldBbox.getY(), oldBbox.getWidth(), oldBbox.getHeight()); ctx.clearRect(newBbox.getX(), newBbox.getY(), newBbox.getWidth(), newBbox.getHeight());
super.onComplete(); context.closePath(); context.clearRect(0, 0, centerX*2, centerY*2);
private void clearCanvas(Canvas canvas) { canvas.getContext2d().save(); canvas.getContext2d().setTransform(1, 0, 0, 1, 0, 0); canvas.getContext2d().clearRect(0, 0, canvas.getCoordinateSpaceWidth(), canvas.getCoordinateSpaceHeight()); canvas.getContext2d().restore(); }
private void clearCanvas(Canvas canvas) { canvas.getContext2d().save(); canvas.getContext2d().setTransform(1, 0, 0, 1, 0, 0); canvas.getContext2d().clearRect(0, 0, canvas.getCoordinateSpaceWidth(), canvas.getCoordinateSpaceHeight()); canvas.getContext2d().restore(); }
if ( m_canvas != null && m_canvas.isAttached() ) context2d.clearRect( 0, 0, m_canvas.getOffsetWidth(), m_canvas.getOffsetHeight() );
context.clearRect(0, 0, context.getCanvas().getWidth(), context.getCanvas().getHeight());
@Override public void draw() { super.draw(); if (surfaceElement == null) { surfaceElement = Document.get().createCanvasElement().cast(); getCanvas().setWidth(width); getCanvas().setHeight(height); container.appendChild(surfaceElement); } getContext().clearRect(0, 0, width, height); //TODO only sort, clear, re-render modified sprites (where they were, where they are) //as a test to see if that gives us a bump in speed Collections.sort(sprites, zIndexComparator()); //collect viewbox if (component.isViewBox()) { int temp = sprites.indexOf(backgroundSprite); sprites.remove(temp); PreciseRectangle bbox = sprites.getBBox(); sprites.add(temp, backgroundSprite); setViewBox(bbox.getX(), bbox.getY(), bbox.getWidth(), bbox.getHeight()); backgroundSprite.setWidth(bbox.getWidth()); backgroundSprite.setHeight(bbox.getHeight()); } appendAll(); } /**