Package net.sf.latexdraw.glib.models.interfaces.shape

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint.translate()


  @Override
  public IPoint add(final IPoint pt) {
    final IPoint added = ShapeFactory.createPoint((IPoint)this);
    if(pt!=null)
      added.translate(pt.getX(), pt.getY());
    return added;
  }
}
View Full Code Here



  @Override
  public void undo() {
    final IPoint pt = ShapeFactory.createPoint(getPoint());
    pt.translate(-tx, -ty);

    if(isFirstCtrlPt)
      move(pt, pt.centralSymmetry(shape.getPtAt(indexPt)));
    else
      move(pt.centralSymmetry(shape.getPtAt(indexPt)), pt);
View Full Code Here

  @Override
  public IPoint getFullBottomRightPoint() {
    final double gap = getBorderGap();
    final IPoint br  = getBottomRightPoint();

    br.translate(gap, gap);

    return br;
  }

View Full Code Here

  @Override
  public IPoint getFullTopLeftPoint() {
    final double gap = getBorderGap();
    final IPoint tl  = getTopLeftPoint();

    tl.translate(-gap, -gap);

    return tl;
  }

View Full Code Here

  public IPoint convertToOrigin(final IPoint pt) {
    final IPoint convertion;
    if(pt==null) convertion = null;
    else {
      convertion = ShapeFactory.createPoint(pt);
      convertion.translate(-ORIGIN.getX(), -ORIGIN.getY());
    }
    return convertion;
  }
}
View Full Code Here

    shape.setHasDbleBord(false);
    shape.setBordersPosition(BorderPos.INTO);
    pt  = shape.getBottomRightPoint();
    gap = shape.getBorderGap();

    pt.translate(gap, gap);
    assertEquals(pt, shape.getFullBottomRightPoint());

    shape.setThickness(20.);
    shape.setHasDbleBord(false);
    shape.setBordersPosition(BorderPos.MID);
View Full Code Here

    shape.setHasDbleBord(false);
    shape.setBordersPosition(BorderPos.MID);
    pt  = shape.getBottomRightPoint();
    gap = shape.getBorderGap();

    pt.translate(gap, gap);
    assertEquals(pt, shape.getFullBottomRightPoint());

    shape.setThickness(30.);
    shape.setHasDbleBord(false);
    shape.setBordersPosition(BorderPos.OUT);
View Full Code Here

    shape.setHasDbleBord(false);
    shape.setBordersPosition(BorderPos.OUT);
    pt  = shape.getBottomRightPoint();
    gap = shape.getBorderGap();

    pt.translate(gap, gap);
    assertEquals(pt, shape.getFullBottomRightPoint());

    shape.setThickness(10.);
    shape.setHasDbleBord(true);
    shape.setBordersPosition(BorderPos.INTO);
View Full Code Here

    shape.setHasDbleBord(true);
    shape.setBordersPosition(BorderPos.INTO);
    pt  = shape.getBottomRightPoint();
    gap = shape.getBorderGap();

    pt.translate(gap, gap);
    assertEquals(pt, shape.getFullBottomRightPoint());

    shape.setThickness(20.);
    shape.setHasDbleBord(true);
    shape.setBordersPosition(BorderPos.MID);
View Full Code Here

    shape.setHasDbleBord(true);
    shape.setBordersPosition(BorderPos.MID);
    pt  = shape.getBottomRightPoint();
    gap = shape.getBorderGap();

    pt.translate(gap, gap);
    assertEquals(pt, shape.getFullBottomRightPoint());

    shape.setThickness(30.);
    shape.setHasDbleBord(true);
    shape.setBordersPosition(BorderPos.OUT);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.