Example #1
0
  public ULineHand(ULine line) {
    final double endX = line.getDX();
    final double endY = line.getDY();
    final HandJiggle jiggle = new HandJiggle(0, 0, 2.0);
    jiggle.lineTo(endX, endY);

    this.path = jiggle.toUPath();
  }
Example #2
0
  public void drawU(UGraphic ug) {

    ug.getParam().setStroke(new UStroke(thickness));

    final double startX = Math.max(armsLenght, legsX) - headDiam / 2.0 + thickness;

    final UEllipse head = new UEllipse(headDiam, headDiam);
    final double centerX = startX + headDiam / 2;

    final ULine body = new ULine(0, bodyLenght);
    final ULine arms = new ULine(armsLenght * 2, 0);

    final double y = headDiam + thickness + bodyLenght;

    final ULine legs1 = new ULine(-legsX, legsY);
    final ULine legs2 = new ULine(legsX, legsY);
    if (deltaShadow != 0) {
      head.setDeltaShadow(deltaShadow);
      body.setDeltaShadow(deltaShadow);
      arms.setDeltaShadow(deltaShadow);
      legs1.setDeltaShadow(deltaShadow);
      legs2.setDeltaShadow(deltaShadow);
    }

    ug.getParam().setBackcolor(backgroundColor);
    ug.getParam().setColor(foregroundColor);
    ug.draw(startX, thickness, head);

    ug.draw(centerX, headDiam + thickness, body);
    ug.draw(centerX - armsLenght, headDiam + thickness + armsY, arms);
    ug.draw(centerX, y, legs1);
    ug.draw(centerX, y, legs2);

    ug.getParam().setStroke(new UStroke());
  }