Package com.cburch.logisim.data

Examples of com.cburch.logisim.data.Bounds.rotate()


    } else {
      int x = -20;
      int y = reversed ? -10 : -(outputs * 10 + 10);
      bds = Bounds.create(x, y, 40, outputs * 10 + 20);
    }
    return bds.rotate(Direction.EAST, facing, 0, 0);
  }
 
  @Override
  public boolean contains(Location loc, AttributeSet attrs) {
    Direction facing = attrs.getValue(StdAttr.FACING).reverse();
View Full Code Here


  @Override
  public Bounds getOffsetBounds(AttributeSet attrs) {
    Direction facing = attrs.getValue(StdAttr.FACING);
    Direction defaultFacing = source.getAppearance().getFacing();
    Bounds bds = source.getAppearance().getOffsetBounds();
    return bds.rotate(defaultFacing, facing, 0, 0);
  }

  @Override
  public AttributeSet createAttributeSet() {
    return new CircuitAttributes(source);
View Full Code Here

      bds = Bounds.create(0, -20, 30, 40);
    } else {
      bds = Bounds.create(0, -(outputs / 2) * 10 - 10,
          40, outputs * 10 + 20);
    }
    return bds.rotate(Direction.EAST, facing, 0, 0);
  }
 
  @Override
  public boolean contains(Location loc, AttributeSet attrs) {
    Direction facing = attrs.getValue(StdAttr.FACING).reverse();
View Full Code Here

 
  @Override
  public Bounds getOffsetBounds(AttributeSet attrs) {
    Direction facing = attrs.getValue(StdAttr.FACING);
    Bounds base = Bounds.create(-30, -15, 30, 30);
    return base.rotate(Direction.EAST, facing, 0, 0);
  }
 
  @Override
  protected void configureNewInstance(Instance instance) {
    instance.addAttributeListener();
View Full Code Here

            bds = Bounds.create(0, -20, 30, 40);
        } else {
            bds = Bounds.create(0, -(outputs / 2) * 10 - 10,
                    40, outputs * 10 + 20);
        }
        return bds.rotate(Direction.EAST, facing, 0, 0);
    }

    @Override
    public boolean contains(Location loc, AttributeSet attrs) {
        Direction facing = attrs.getValue(StdAttr.FACING).reverse();
View Full Code Here

    @Override
    public Bounds getOffsetBounds(AttributeSet attrs) {
        Direction facing = attrs.getValue(StdAttr.FACING);
        Bounds base = Bounds.create(-30, -15, 30, 30);
        return base.rotate(Direction.EAST, facing, 0, 0);
    }

    @Override
    protected void configureNewInstance(Instance instance) {
        instance.addAttributeListener();
View Full Code Here

        } else {
            int x = -20;
            int y = reversed ? -10 : -(outputs * 10 + 10);
            bds = Bounds.create(x, y, 40, outputs * 10 + 20);
        }
        return bds.rotate(Direction.EAST, facing, 0, 0);
    }

    @Override
    public boolean contains(Location loc, AttributeSet attrs) {
        Direction facing = attrs.getValue(StdAttr.FACING).reverse();
View Full Code Here

    @Override
    public Bounds getOffsetBounds(AttributeSet attrs) {
        Direction facing = attrs.getValue(StdAttr.FACING);
        Direction defaultFacing = source.getAppearance().getFacing();
        Bounds bds = source.getAppearance().getOffsetBounds();
        return bds.rotate(defaultFacing, facing, 0, 0);
    }

    @Override
    public boolean contains(Location loc, AttributeSet attrs) {
        if (super.contains(loc, attrs)) {
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.