/** * Constructs a new MultiRectArea consists of single rectangle */ public MultiRectArea(int x0, int y0, int x1, int y1) { rect = MultiRectAreaOp.createBuf(0); if (x1 >= x0 && y1 >= y0) { rect[0] = 5; rect[1] = x0; rect[2] = y0; rect[3] = x1; rect[4] = y1; } check(this, "MultiRectArea(Rectangle)"); //$NON-NLS-1$ }
/** * Constructs a new MultiRectArea as a copy of another one */ public MultiRectArea(MultiRectArea mra) { if (mra == null) { rect = MultiRectAreaOp.createBuf(0); } else { rect = new int[mra.rect.Length]; java.lang.SystemJ.arraycopy(mra.rect, 0, rect, 0, mra.rect.Length); check(this, "MultiRectArea(MRA)"); //$NON-NLS-1$ } }
/** * Constructs a new MultiRectArea consists of single rectangle */ public MultiRectArea(java.awt.Rectangle r) { rect = MultiRectAreaOp.createBuf(0); if (r != null && !r.isEmpty()) { rect[0] = 5; rect[1] = r.x; rect[2] = r.y; rect[3] = r.x + r.width - 1; rect[4] = r.y + r.height - 1; } check(this, "MultiRectArea(Rectangle)"); //$NON-NLS-1$ }
/** * Constructs a new empty MultiRectArea */ public MultiRectArea() { rect = MultiRectAreaOp.createBuf(0); }