public RenderingOp(EffectTracker effector, java.awt.geom.Rectangle2D.Float effectClip, float trueOffsetX, float trueOffsetY) { effect = true; effectTracker = effector; if (effectClip != null) { destRect = new java.awt.geom.Rectangle2D.Float(); destRect.setFrame(effectClip); } if (trueOffsetX != 0 || trueOffsetY != 0) { srcRect = new java.awt.geom.Rectangle2D.Float(trueOffsetX, trueOffsetY, 0, 0); } }
/** * {@inheritDoc} */ public void recomputeLayout() { super.recomputeLayout(); Rectangle2D b = getBoundsReference(); if (b != null && smallTextBounds != null) smallTextBounds.setFrame( b.getX(), b.getY() + (int)(effective_y0*b.getHeight()), b.getWidth(), (int)(effective_h*b.getHeight())); }
graphics.setColor(boxColor); Rectangle2D.Float rect = new Rectangle2D.Float(); rect.setFrame(posX - outlineSize / 2f, y - (fm.getAscent() + fm.getDescent()) / 2f - outlineSize / 2f, fm.stringWidth(label) + outlineSize,
layoutWidth -= padX; kidSize.setFrame(kid.getPreferredSize(layoutWidth, layoutHeight, orgLayoutWidth, orgLayoutHeight, 0)); kidSize.height = Math.min(layoutHeight, kidSize.height); kidSize.width = Math.min(layoutWidth, kidSize.width); layoutHeight -= padY; kidSize.setFrame(kid.getPreferredSize(layoutWidth, layoutHeight, orgLayoutWidth, orgLayoutHeight, 0)); kidSize.height = Math.min(layoutHeight, kidSize.height); kidSize.width = Math.min(layoutWidth, kidSize.width); kidSize.setFrame(kid.getPreferredSize(layoutWidth, layoutHeight, orgLayoutWidth, orgLayoutHeight, 0)); if (pseudoKid == null || !uiMgr.disableParentClip() || (pseudoKid.validLayoutBits & FIXEDW_LAYOUT) == 0) kidSize.width = Math.min(layoutWidth, kidSize.width);
clipRect, xoff, yoff)); clipRect.setFrame(orgclipx, orgclipy, orgclipw, orgcliph); if (addedSurfaceCache != null) opList.add(new RenderingOp(addedSurfaceCache, getTrueBoundsf(), false));
clipRect.setFrame(orgclipx, orgclipy, orgclipw, orgcliph); opList.add(new RenderingOp(null)); opList.addAll(cachedRenderOps); clipRect.setFrame(orgclipx, orgclipy, orgclipw, orgcliph); return; cachedBounds.setFrame(trueBoundsf); cachedBounds.x += xoff; cachedBounds.y += yoff; cachedClipRect.setFrame(clipRect); if (crossEffectIn != null) opList.add(new RenderingOp(null)); clipRect.setFrame(orgclipx, orgclipy, orgclipw, orgcliph);
clipRect.setFrame(orgclipx, orgclipy, orgclipw, orgcliph);
destRect.setFrame(currBounds); orgDestRect = new java.awt.geom.Rectangle2D.Float(destRect.x, destRect.y, destRect.width, destRect.height); orgSrcRect = srcRect; destRect.setFrame(currBounds); srcRect.setFrame(currBounds); orgDestRect = new java.awt.geom.Rectangle2D.Float(destRect.x, destRect.y, destRect.width, destRect.height); orgSrcRect = new java.awt.geom.Rectangle2D.Float(srcRect.x, srcRect.y, srcRect.width, srcRect.height);
prefSize.setFrame(0, 0, availableWidth, availableHeight); else prefSize.setFrame(0, 0, 0, 0); if (ass*availableHeight <= availableWidth) prefSize.setFrame(0, 0, ass*availableHeight, availableHeight); prefSize.setFrame(0, 0, availableWidth, availableWidth/ass); prefSize.setFrame(0, 0, myImage.getWidth(), myImage.getHeight()); return prefSize;
clipRect.setFrame(orgclipx, orgclipy, orgclipw, orgcliph);
/** * Creates a path representing the rectangle provided. * * @param x left of rectangle * @param y top of rectangle * @param width width of rectangle * @param height height of rectangle * @return created rectangle */ public static PSWTPath createRectangle(final float x, final float y, final float width, final float height) { TEMP_RECTANGLE.setFrame(x, y, width, height); final PSWTPath result = new PSWTPath(TEMP_RECTANGLE); result.setPaint(Color.white); return result; }
public RenderingOp(String surfaceName, String animationName, long duration, long delay, java.awt.geom.Rectangle2D.Float surfaceArea, float srcAlpha, boolean interruptable) { anime = new Animation(animationName, duration, delay); anime.interruptable = interruptable; surface = surfaceName; // all alpha blending outside of fade animations is handled by the individual components that make up a surface alphaFactor = 1.0f;//srcAlpha; // we need to obey this alpha!! //1.0f; // prevents culling of the op destRect = new java.awt.geom.Rectangle2D.Float(); destRect.setFrame(surfaceArea); srcRect = new java.awt.geom.Rectangle2D.Float(); srcRect.setFrame(surfaceArea); }
/** * Resets the path to a rectangle with the dimensions and position provided. * * @param x left of the rectangle * @param y top of te rectangle * @param width width of the rectangle * @param height height of the rectangle */ public void setPathToRectangle(final float x, final float y, final float width, final float height) { TEMP_RECTANGLE.setFrame(x, y, width, height); setShape(TEMP_RECTANGLE); }
public RenderingOp(java.awt.geom.Rectangle2D.Float dr, java.util.ArrayList regionOps) { video = true; destRect = new java.awt.geom.Rectangle2D.Float(); destRect.setFrame(dr); srcRect = new java.awt.geom.Rectangle2D.Float(); srcRect.setFrame(destRect); legacyRegions = regionOps; alphaFactor = 1.0f; }
@Override protected void rectImpl(float x1, float y1, float x2, float y2) { rect.setFrame(x1, y1, x2-x1, y2-y1); drawShape(rect); }