/** * Gets the bounding box for the output of <code>ScaleOpImage</code>. This method satisfies the implementation of CRIF. */ public Rectangle2D getBounds2D(ParameterBlock paramBlock) { RenderableImage source = paramBlock.getRenderableSource(0); float scale_x = paramBlock.getFloatParameter(0); float scale_y = paramBlock.getFloatParameter(1); float trans_x = paramBlock.getFloatParameter(2); float trans_y = paramBlock.getFloatParameter(3); // Get the source dimensions float x0 = source.getMinX(); float y0 = source.getMinY(); float w = source.getWidth(); float h = source.getHeight(); // Forward map the source using x0, y0, w and h float d_x0 = x0 * scale_x + trans_x; float d_y0 = y0 * scale_y + trans_y; float d_w = w * scale_x; float d_h = h * scale_y; return new Rectangle2D.Float(d_x0, d_y0, d_w, d_h); }
/** * Gets the bounding box for the output of <code>ScaleOpImage</code>. This method satisfies the implementation of CRIF. */ public Rectangle2D getBounds2D(ParameterBlock paramBlock) { RenderableImage source = paramBlock.getRenderableSource(0); float scale_x = paramBlock.getFloatParameter(0); float scale_y = paramBlock.getFloatParameter(1); float trans_x = paramBlock.getFloatParameter(2); float trans_y = paramBlock.getFloatParameter(3); // Get the source dimensions float x0 = source.getMinX(); float y0 = source.getMinY(); float w = source.getWidth(); float h = source.getHeight(); // Forward map the source using x0, y0, w and h float d_x0 = x0 * scale_x + trans_x; float d_y0 = y0 * scale_y + trans_y; float d_w = w * scale_x; float d_h = h * scale_y; return new Rectangle2D.Float(d_x0, d_y0, d_w, d_h); }
/** * Gets the bounding box for the output of <code>ScaleOpImage</code>. This method satisfies the implementation of CRIF. */ public Rectangle2D getBounds2D(ParameterBlock paramBlock) { RenderableImage source = paramBlock.getRenderableSource(0); float scale_x = paramBlock.getFloatParameter(0); float scale_y = paramBlock.getFloatParameter(1); float trans_x = paramBlock.getFloatParameter(2); float trans_y = paramBlock.getFloatParameter(3); // Get the source dimensions float x0 = source.getMinX(); float y0 = source.getMinY(); float w = source.getWidth(); float h = source.getHeight(); // Forward map the source using x0, y0, w and h float d_x0 = x0 * scale_x + trans_x; float d_y0 = y0 * scale_y + trans_y; float d_w = w * scale_x; float d_h = h * scale_y; return new Rectangle2D.Float(d_x0, d_y0, d_w, d_h); }
/** * Gets the bounding box for the output of <code>ScaleOpImage</code>. This method satisfies the implementation of CRIF. */ public Rectangle2D getBounds2D(ParameterBlock paramBlock) { RenderableImage source = paramBlock.getRenderableSource(0); float scale_x = paramBlock.getFloatParameter(0); float scale_y = paramBlock.getFloatParameter(1); float trans_x = paramBlock.getFloatParameter(2); float trans_y = paramBlock.getFloatParameter(3); // Get the source dimensions float x0 = source.getMinX(); float y0 = source.getMinY(); float w = source.getWidth(); float h = source.getHeight(); // Forward map the source using x0, y0, w and h float d_x0 = x0 * scale_x + trans_x; float d_y0 = y0 * scale_y + trans_y; float d_w = w * scale_x; float d_h = h * scale_y; return new Rectangle2D.Float(d_x0, d_y0, d_w, d_h); }
RenderableImage source = paramBlock.getRenderableSource(0); Object arg0 = paramBlock.getObjectParameter(0); AffineTransform forward_tr = (AffineTransform) arg0;
RenderableImage source = paramBlock.getRenderableSource(0); Object arg0 = paramBlock.getObjectParameter(0); AffineTransform forward_tr = (AffineTransform) arg0;