Examples of IPoint


Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint


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

    br.translate(gap, gap);

    return br;
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint


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

    tl.translate(-gap, -gap);

    return tl;
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint

  }


  @Override
  public IPoint getPtAt(final int position) {
    final IPoint point;

    if(points.isEmpty() || position<-1 || position>=points.size())
      point = null;
    else
      point = position==-1 ? points.get(points.size()-1) : points.get(position);
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint

  @Override
  public void mirrorHorizontal(final IPoint origin) {
    if(!GLibUtilities.isValidPoint(origin))
      return ;

    IPoint pt1;

    for(final IPoint pt : points) {
      pt1 = pt.horizontalSymmetry(origin);

      if(pt1!=null)
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint

  @Override
  public void mirrorVertical(final IPoint origin) {
    if(!GLibUtilities.isValidPoint(origin))
      return ;

    IPoint pt1;

    for(final IPoint pt : points) {
      pt1 = pt.verticalSymmetry(origin);

      if(pt1!=null)
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint

  }


  @Override
  public IPoint getBottomRightPoint() {
    final IPoint br = ShapeFactory.createPoint();

    if(!points.isEmpty()) {
      IPoint pt = points.get(0);
      br.setPoint(pt);

      for(int i=1, size=points.size(); i<size; i++) {
        pt = points.get(i);

        if(pt.getX()>br.getX()) br.setX(pt.getX());
        if(pt.getY()>br.getY()) br.setY(pt.getY());
      }
    }

    return br;
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint

  }


  @Override
  public IPoint getBottomLeftPoint() {
    final IPoint bl = ShapeFactory.createPoint();

    if(!points.isEmpty()) {
      IPoint pt = points.get(0);
      bl.setPoint(pt);

      for(int i=1, size=points.size(); i<size; i++) {
        pt = points.get(i);

        if(pt.getX()<bl.getX()) bl.setX(pt.getX());
        if(pt.getY()>bl.getY()) bl.setY(pt.getY());
      }
    }

    return bl;
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint

    final StringBuilder code;
    final double angle = shape.getRotationAngle();

        if (LNumber.equalsDouble(angle, 0.)) code = null;
        else {
            final IPoint gravityCenter = shape.getGravityCentre();
            final double cx = (gravityCenter.getX() - position.getX()) / ppc;
            final double cy = (position.getY() - gravityCenter.getY()) / ppc;
            final double x = LNumber.getCutNumber(-Math.cos(-angle) * cx + Math.sin(-angle) * cy + cx);
            final double y = LNumber.getCutNumber(-Math.sin(-angle) * cx - Math.cos(-angle) * cy + cy);

            code = new StringBuilder();
            code.append("\\rput{").append((float) LNumber.getCutNumber(-Math.toDegrees(shape.getRotationAngle()) % 360)).append('}').append('('); //$NON-NLS-1$
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPoint

  }


  @Override
  public IPoint getTopLeftPoint() {
    final IPoint tl = ShapeFactory.createPoint();

    if(!points.isEmpty()) {
      IPoint pt = points.get(0);
      tl.setPoint(pt);

      for(int i=1, size=points.size(); i<size; i++) {
        pt = points.get(i);

        if(pt.getX()<tl.getX()) tl.setX(pt.getX());
        if(pt.getY()<tl.getY()) tl.setY(pt.getY());
      }
    }

    return tl;
  }
View Full Code Here

Examples of pythagoras.f.IPoint

    }

    /** Updates the position of the content to match the flicker. If force is set, then the
     * relevant values will be updated even if there was no change. */
    protected void update (boolean force) {
        IPoint pos = _flicker.position();
        boolean dx = hrange.set(pos.x()), dy = vrange.set(pos.y());
        if (dx || dy || force) {
            _clippable.setPosition(-pos.x(), -pos.y());

            // now check the child elements for visibility
            if (!force) updateVisibility();

            firePositionChange();
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.