public void process(DXFDocument doc, Map<String,String> context) throws ProcessorException {
//set all blocks to color gray
Iterator<DXFBlock> i = doc.getDXFBlockIterator();
while (i.hasNext()) {
DXFBlock b = (DXFBlock) i.next();
Iterator<DXFEntity> ie = b.getDXFEntitiesIterator();
while (ie.hasNext()) {
DXFEntity entity = (DXFEntity) ie.next();
//set to gray
entity.setColor(9);
}
}
DXFEntity left = null;
DXFEntity top = null;
DXFEntity right = null;
DXFEntity bottom = null;
Bounds b = doc.getBounds();
double x = b.getMinimumX() + (b.getWidth() / 2);
double y = b.getMinimumY() + (b.getHeight() / 2);
//starting at the center point of the draft
Bounds lBounds = new Bounds(x, x, y, y);
Bounds rBounds = new Bounds(x, x, y, y);
Bounds tBounds = new Bounds(x, x, y, y);