private Point[] getIncludedPositions(Rectangle[] rectangles, Rectangle widgetBounds) { List result= new ArrayList(); for (int i= 0; i < rectangles.length; i++) { Rectangle rectangle= rectangles[i]; Rectangle intersect= widgetBounds.intersection(rectangle); if (intersect != null && intersect.height == rectangle.height) { result.add(new Point(intersect.x, intersect.y + intersect.height)); } } return (Point[]) result.toArray(new Point[result.size()]); }
private Point[] getIncludedPositions(Rectangle[] rectangles, Rectangle widgetBounds) { List result = new ArrayList(); for (Rectangle rectangle : rectangles) { Rectangle intersect = widgetBounds.intersection(rectangle); if (intersect != null && intersect.height == rectangle.height) { result.add(new Point(intersect.x, intersect.y + intersect.height)); } } return (Point[]) result.toArray(new Point[result.size()]); }
/** * This method isn't really supported by SWT - so will use the shape bounds. * * @param s shape of the clipping region to apply to graphics operations */ public void clip(final Shape s) { final Rectangle2D clipBds = s.getBounds2D(); SWTShapeManager.transform(clipBds, transform); SWTShapeManager.awtToSWT(clipBds, SWT_RECT); org.eclipse.swt.graphics.Rectangle clip = gc.getClipping(); clip = clip.intersection(SWT_RECT); gc.setClipping(SWT_RECT); }
/** {@inheritDoc} */ public void clipRect(final int x, final int y, final int width, final int height) { TEMP_RECT.setRect(x, y, width, height); SWTShapeManager.transform(TEMP_RECT, transform); SWTShapeManager.awtToSWT(TEMP_RECT, SWT_RECT); org.eclipse.swt.graphics.Rectangle clip = gc.getClipping(); clip = clip.intersection(SWT_RECT); gc.setClipping(clip); }
case 1: Rectangle bounds= items[0].getBounds(); Rectangle intersect= clientArea.intersection(bounds); if (intersect != null && intersect.height == bounds.height) { return new Point(
case 1: Rectangle bounds = items[0].getBounds(); Rectangle intersect = clientArea.intersection(bounds); if (intersect != null && intersect.height == bounds.height) { return new Point(Math.max(0, bounds.x
Rectangle bounds = items[0].getBounds(0); Rectangle iBounds = items[0].getImageBounds(0); Rectangle intersect = clientArea.intersection(bounds); if (intersect != null && intersect.height == bounds.height) { return new Point(Math.max(0, bounds.x + iBounds.width
Rectangle bounds= items[0].getBounds(0); Rectangle iBounds= items[0].getImageBounds(0); Rectangle intersect= clientArea.intersection(bounds); if (intersect != null && intersect.height == bounds.height) { return new Point(
Rectangle rect = bounds.intersection (monitors [i].getBounds ()); int area = rect.width * rect.height; if (area > 0 && area > value) {
Rectangle handleRect = fHorizontalScrollHandler.getHandleRect(); if (!handleRect.equals(fLastHorizontalHandleRect)) { if (clipping.intersection(handleRect).height != handleRect.height) { Rectangle handleRect = fVerticalScrollHandler.getHandleRect(); if (!handleRect.equals(fLastVerticalHandleRect)) { if (clipping.intersection(handleRect).width != handleRect.width) {
toolBounds.x = pt.x; toolBounds.y = pt.y; Rectangle intersection = itemBounds.intersection (toolBounds); if (!intersection.equals (toolBounds)) break; i++;
Rectangle intersection = monitorBounds.intersection(bounds); if (intersection.width != bounds.width) { bounds.x = monitorBounds.x + monitorBounds.width - WIDTH;
Rectangle trimmedShellBounds = shellBounds.intersection(monitorClientArea);
rect = rect.intersection(new Rectangle(destX, destY, destWidth, destHeight)); if (rect.isEmpty()) return;
event.detail = selected ? SWT.SELECTED : SWT.NONE; Rectangle newClip = bounds.intersection(itemBounds);
area.intersection(cellBounds), true, false, SWT.RIGHT);