/** * 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); }
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); }