79 |
*/ |
*/ |
80 |
public void setDimensions(int width, int height) |
public void setDimensions(int width, int height) |
81 |
{ |
{ |
82 |
|
if (consumer != null) |
83 |
consumer.setDimensions(this.width, this.height); |
consumer.setDimensions(this.width, this.height); |
84 |
} |
} |
85 |
|
|
94 |
public void setProperties(Hashtable props) |
public void setProperties(Hashtable props) |
95 |
{ |
{ |
96 |
props.put("filters", "CropImageFilter"); |
props.put("filters", "CropImageFilter"); |
97 |
consumer.setProperties(props); |
if (consumer != null) |
98 |
|
consumer.setProperties(props); |
99 |
} |
} |
100 |
|
|
101 |
/** |
/** |
132 |
cropped[i * bounds.width + j] = pixels[start + bounds.x + j]; |
cropped[i * bounds.width + j] = pixels[start + bounds.x + j]; |
133 |
} |
} |
134 |
|
|
135 |
consumer.setPixels(bounds.x, bounds.y, |
if (consumer != null) |
136 |
bounds.width, bounds.height, |
consumer.setPixels(0, 0, |
137 |
model, cropped, 0, bounds.width); |
bounds.width, bounds.height, |
138 |
|
model, cropped, 0, bounds.width); |
139 |
} |
} |
140 |
} |
} |
141 |
|
|
173 |
cropped[i * bounds.width + j] = pixels[start + bounds.x + j]; |
cropped[i * bounds.width + j] = pixels[start + bounds.x + j]; |
174 |
} |
} |
175 |
|
|
176 |
consumer.setPixels(bounds.x, bounds.y, |
if (consumer != null) |
177 |
bounds.width, bounds.height, |
consumer.setPixels(0, 0, |
178 |
model, cropped, 0, bounds.width); |
bounds.width, bounds.height, |
179 |
|
model, cropped, 0, bounds.width); |
180 |
} |
} |
181 |
} |
} |
182 |
|
|