コード例 #1
0
  /**
   * Instantiates a new default button click action.
   *
   * @param poly the poly
   */
  public DefaultButtonClickAction(AbstractShape poly) {
    this.polyButton = poly;
    this.sizeChangeValue = 3;

    this.width = polyButton.getWidthXY(TransformSpace.RELATIVE_TO_PARENT);

    this.height = polyButton.getHeightXY(TransformSpace.RELATIVE_TO_PARENT);
  }
コード例 #2
0
 public void setBrush(AbstractShape brush) {
   this.drawShape = brush;
   this.localBrushCenter = drawShape.getCenterPointLocal();
   this.brushWidthHalf = drawShape.getWidthXY(TransformSpace.LOCAL) / 2f;
   this.brushHeightHalf = drawShape.getHeightXY(TransformSpace.LOCAL) / 2f;
   this.stepDistance = brushWidthHalf / 2.8f;
   this.drawShape.setFillColor(this.brushColor);
   this.drawShape.setStrokeColor(this.brushColor);
 }