/** * Returns the rectangle that should be used as the perimeter of the cell. * * @return Returns the rectangle that defines the perimeter. */ public mxRectangle getPerimeterBounds(double border) { mxRectangle bounds = new mxRectangle(getRectangle()); if (border != 0) { bounds.grow(border); } return bounds; }
/** * Returns the rectangle that should be used as the perimeter of the cell. * * @return Returns the rectangle that defines the perimeter. */ public mxRectangle getPerimeterBounds(double border) { mxRectangle bounds = new mxRectangle(getRectangle()); if (border != 0) { bounds.grow(border); } return bounds; }
dirty.grow(1);
dirty.grow(2);
/** * */ public void reset() { if (handle.getParent() != null) { handle.getParent().remove(handle); } mxRectangle dirty = null; if (currentState != null && first != null) { dirty = mxUtils.getBoundingBox(currentState, currentAngle * mxConstants.DEG_PER_RAD); dirty.grow(1); } currentState = null; currentAngle = 0; first = null; if (dirty != null) { graphComponent.getGraphControl().repaint(dirty.getRectangle()); } }
/** * */ public void reset() { if (handle.getParent() != null) { handle.getParent().remove(handle); } mxRectangle dirty = null; if (currentState != null && first != null) { dirty = mxUtils.getBoundingBox(currentState, currentAngle * mxConstants.DEG_PER_RAD); dirty.grow(1); } currentState = null; currentAngle = 0; first = null; if (dirty != null) { graphComponent.getGraphControl().repaint(dirty.getRectangle()); } }
/** * */ protected Rectangle getDirtyRect(mxRectangle dirty) { if (previewState != null) { mxRectangle tmp = graphComponent.getGraph().getPaintBounds( new Object[] { previewState.getCell() }); if (dirty != null) { dirty.add(tmp); } else { dirty = tmp; } if (dirty != null) { // TODO: Take arrow size into account dirty.grow(2); return dirty.getRectangle(); } } return null; }
/** * */ protected Rectangle getDirtyRect(mxRectangle dirty) { if (previewState != null) { mxRectangle tmp = graphComponent.getGraph().getPaintBounds( new Object[] { previewState.getCell() }); if (dirty != null) { dirty.add(tmp); } else { dirty = tmp; } if (dirty != null) { // TODO: Take arrow size into account dirty.grow(2); return dirty.getRectangle(); } } return null; }
mxConstants.STYLE_STROKEWIDTH) * graph.getView().getScale()) + 1; tmp.grow(border);
mxConstants.STYLE_STROKEWIDTH) * graph.getView().getScale()) + 1; tmp.grow(border);
public void invoke(Object source, mxEventObject evt) { updateScaleAndTranslate(); mxRectangle dirty = (mxRectangle) evt.getProperty("region"); if (dirty != null) { repaintClip = new mxRectangle(dirty); } else { repaintBuffer = true; } if (dirty != null) { updateFinder(true); dirty.grow(1 / scale); dirty.setX(dirty.getX() * scale + translate.x); dirty.setY(dirty.getY() * scale + translate.y); dirty.setWidth(dirty.getWidth() * scale); dirty.setHeight(dirty.getHeight() * scale); repaint(dirty.getRectangle()); } else { updateFinder(false); repaint(); } } };
public void invoke(Object source, mxEventObject evt) { updateScaleAndTranslate(); mxRectangle dirty = (mxRectangle) evt.getProperty("region"); if (dirty != null) { repaintClip = new mxRectangle(dirty); } else { repaintBuffer = true; } if (dirty != null) { updateFinder(true); dirty.grow(1 / scale); dirty.setX(dirty.getX() * scale + translate.x); dirty.setY(dirty.getY() * scale + translate.y); dirty.setWidth(dirty.getWidth() * scale); dirty.setHeight(dirty.getHeight() * scale); repaint(dirty.getRectangle()); } else { updateFinder(false); repaint(); } } };
repaintClip.grow(1 / scale);
repaintClip.grow(1 / scale);