@Test public void builderToBottomRightTest() throws IOException, InterruptedException { AbstractLinearGradientBuilder gradientBuilder = new StrategyBasedLinearGradientBuilder() .setGradientDirectionAsStrategy(StrategyBasedLinearGradientBuilder.GradientStrategy.TO_BOTTOM_RIGHT) .addColorStop(new GradientColorStop(ColorConstants.RED.getColorValue(), 0d, OffsetType.RELATIVE)) .addColorStop(new GradientColorStop(ColorConstants.GREEN.getColorValue(), 0.5, OffsetType.RELATIVE)) .addColorStop(new GradientColorStop(ColorConstants.BLUE.getColorValue(), 1d, OffsetType.RELATIVE)); generateAndComparePdfs("builderToBottomRightTest.pdf", null, gradientBuilder); }
public StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(GradientStrategy gradientStrategy) { this.gradientStrategy = gradientStrategy != null ? gradientStrategy : GradientStrategy.TO_BOTTOM; this.isCentralRotationAngleStrategy = false; return this; }
StrategyBasedLinearGradientBuilder extends AbstractLinearGradientBuilder { public StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(GradientStrategy gradientStrategy) { this.gradientStrategy = gradientStrategy != null ? gradientStrategy : GradientStrategy.TO_BOTTOM; this.isCentralRotationAngleStrategy = false; return this; } }
StrategyBasedLinearGradientBuilder extends AbstractLinearGradientBuilder { public StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(GradientStrategy gradientStrategy) { this.gradientStrategy = gradientStrategy != null ? gradientStrategy : GradientStrategy.TO_BOTTOM; this.isCentralRotationAngleStrategy = false; return this; } StrategyBasedLinearGradientBuilder(); }
StrategyBasedLinearGradientBuilder extends AbstractLinearGradientBuilder { public StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(GradientStrategy gradientStrategy) { this.gradientStrategy = gradientStrategy != null ? gradientStrategy : GradientStrategy.TO_BOTTOM; this.isCentralRotationAngleStrategy = false; return this; } StrategyBasedLinearGradientBuilder(); StrategyBasedLinearGradientBuilder setGradientDirectionAsCentralRotationAngle(double radians); StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(GradientStrategy gradientStrategy); double getRotateVectorAngle(); GradientStrategy getGradientStrategy(); boolean isCentralRotationAngleStrategy(); }
StrategyBasedLinearGradientBuilder extends AbstractLinearGradientBuilder { public StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(GradientStrategy gradientStrategy) { this.gradientStrategy = gradientStrategy != null ? gradientStrategy : GradientStrategy.TO_BOTTOM; this.isCentralRotationAngleStrategy = false; return this; } StrategyBasedLinearGradientBuilder(); StrategyBasedLinearGradientBuilder setGradientDirectionAsCentralRotationAngle(double radians); StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(GradientStrategy gradientStrategy); double getRotateVectorAngle(); GradientStrategy getGradientStrategy(); boolean isCentralRotationAngleStrategy();  }