/** * Concatenates the current <code>Graphics2D</code> * <code>Transform</code> with a shearing transform. * Subsequent renderings are sheared by the specified * multiplier relative to the previous position. * This is equivalent to calling <code>transform(SH)</code>, where SH * is an <code>AffineTransform</code> represented by the following * matrix: * <pre> * [ 1 shx 0 ] * [ shy 1 0 ] * [ 0 0 1 ] * </pre> * @param shx the multiplier by which coordinates are shifted in * the positive X axis direction as a function of their Y coordinate * @param shy the multiplier by which coordinates are shifted in * the positive Y axis direction as a function of their X coordinate */ public void shear(double shx, double shy){ _transform.shear(shx, shy); }
public void shear(double d, double d1) { getTrans().shear(d, d1); }
/** Checks for {@linkplain #checkPermission permission} before shearing this transform. */ @Override public void shear(double shx, double shy) { checkPermission(); super.shear(shx, shy); }
/** * @see Graphics2D#shear(double, double) */ @Override public void shear(double shx, double shy) { transform.shear(shx, shy); }
100 * random.nextDouble()); transform.scale(2 * random.nextDouble(), 2 * random.nextDouble()); transform.shear(2 * random.nextDouble(), 2 * random.nextDouble()); transform.translate(100 * random.nextDouble(), 100 * random.nextDouble()); compareTransforms(
/** * @see Graphics2D#shear(double, double) */ public void shear(double shx, double shy) { transform.shear(shx, shy); }
/** * @see Graphics2D#shear(double, double) */ @Override public void shear( final double shx, final double shy ) { transform.shear( shx, shy ); }
/** * @see Graphics2D#shear(double, double) */ public void shear(double shx, double shy) { transform.shear(shx, shy); }
@Override public void shear(double shx, double shy) { transform.shear(shx, shy); }
@Override public void shear(double shx, double shy) { transform.shear(shx, shy); }
double sa_x = 100, sa_y = 100; // or whatever AffineTransform at = new AffineTransform(); // S3: Move back to original origin at.translate(sa_x, sa_y); // S2: Shear at.shear(1, 0); // S1: Set origin at.translate(-sa_x, -sa_y);
/** * Checks for {@linkplain #checkPermission() permission} before shearing this transform. */ @Override public final void shear(double shx, double shy) { checkPermission(); super.shear(shx, shy); }
/** {@inheritDoc} */ public void shear(final double shx, final double shy) { transform.shear(shx, shy); updateSWTTransform(); }
/** * Checks for {@linkplain #checkPermission() permission} before shearing this transform. */ @Override public final void shear(double shx, double shy) { checkPermission(); super.shear(shx, shy); }
public void shear(double d, double d1) { getTrans().shear(d, d1); }
@Override public void shear(double shx, double shy) { getTransform0().shear(shx, shy); dirtyMatrix = true; }
public static BufferedImage getTransformedImage(BufferedImage image,double scaleX,double scaleY,double shearX,double shearY){ AffineTransform transform = new AffineTransform(); if ( scaleX > 0 && scaleY > 0 ) transform.scale(scaleX, scaleY); if ( shearX > 0 && shearY > 0 ) transform.shear(shearX, shearY); AffineTransformOp op = new AffineTransformOp(transform,AffineTransformOp.TYPE_BILINEAR); BufferedImage dest = new BufferedImage(image.getWidth(),image.getHeight(),image.getType()); op.filter(image, dest); return dest; }
private void initTransform(Rectangle _bounds, AffineTransform _transform) { double centerY = _bounds.getCenterY(); double centerX = _bounds.getCenterX(); _transform.translate(centerX, centerY); _transform.shear(shearX_, shearY_); _transform.rotate(rotation_); _transform.translate(-centerX, -centerY); }
@Override public void shear(double shx, double shy) { getTransform0().shear(shx, shy); flushTransformToOpenGL(); }
@Override public void shear(double shx, double shy) { if (shx == 0.0 && shy == 0.0) { return; } AffineTransform txNew = getTransform(); txNew.shear(shx, shy); emit(new ShearCommand(shx, shy)); state.setTransform(txNew); }