} else if (other.getBBox() != null) {
return false;
}
- if (shading.getDomain() != null) {
- if (!shading.getDomain().equals(other.getDomain())) {
- return false;
- }
- } else if (other.getDomain() != null) {
- return false;
- }
if (shading.getMatrix() != null) {
if (!shading.getMatrix().equals(other.getMatrix())) {
return false;
*/
private final List<Double> background;
- /**
- * Optional for Type 1: Array of four numbers, xmin, xmax, ymin, ymax.
- * Default is [0 1 0 1]
- * Optional for Type 2: An array of two numbers between which the blend
- * varies between start and end points. Default is 0, 1.
- * Optional for Type 3: An array of two numbers between which the blend
- * varies between start and end points. Default is 0, 1.
- */
- private final List<Double> domain;
-
/**
* Required for Type 4,5,6, and 7: Array of Doubles which specifies
* how to decode coordinate and color component values.
this.bbox = null;
this.antiAlias = false;
this.coords = coords;
- this.domain = Arrays.asList(0.0, 1.0);
this.function = function;
this.extend = Arrays.asList(true, true);
this.matrix = null;
return background;
}
- public List<Double> getDomain() {
- return domain;
- }
-
public List<Double> getDecode() {
return decode;
}
private void outputShadingType1(StringBuilder out, DoubleFormatter doubleFormatter,
Shading.FunctionRenderer functionRenderer) {
- out.append("/Domain ");
- GradientMaker.outputDoubles(out, doubleFormatter, domain);
- out.append("\n");
-
if (matrix != null) {
out.append("/Matrix ");
GradientMaker.outputDoubles(out, doubleFormatter, matrix);
out.append("\n");
}
- out.append("/Domain ");
- GradientMaker.outputDoubles(out, doubleFormatter, domain);
- out.append("\n");
-
out.append("/Extend [ ");
for (Boolean b : extend) {
out.append(b);
return this;
}
- ShadingChecker domain(Double... expectedDomain) {
- assertArrayEquals(expectedDomain, shading.getDomain().toArray());
- return this;
- }
-
ShadingChecker extend(Boolean... expectedExtend) {
assertArrayEquals(expectedExtend, shading.getExtend().toArray());
return this;
ShadingChecker shadingChecker = patternChecker.shading()
.shadingType(2)
.coords(0.0, 0.0, 100.0, 100.0)
- .domain(0.0, 1.0)
.extend(true, true);
FunctionChecker functionChecker = shadingChecker.function()
.functionType(3)