} else if (object instanceof SurfaceImpl) {
object_type = PaintGMObject.TYPE_LINES;
SurfaceBoundary sb = ((SurfaceImpl) object).getBoundary();
Ring exterior = sb.getExterior();
LineList coords = new LineList();
coords.addRingToCoords((RingImplUnsafe)exterior);
List<Ring> interiors = sb.getInteriors();
for (int i=0; i<interiors.size(); i++) {
coords.addRingToCoords((RingImplUnsafe) interiors.get(i));
}
object_x = new int[coords.size()*2];
object_y = new int[coords.size()*2];
int z = 0;
for (int i=0; i<coords.size(); i++) {
object_x[z] = coords.getXFrom(i);
object_y[z] = coords.getYFrom(i);
z++;
object_x[z] = coords.getXTo(i);
object_y[z] = coords.getYTo(i);
z++;
}
} else if (object instanceof MultiSurfaceImpl) {
object_type = PaintGMObject.TYPE_LINES;
Iterator surfaces = ((MultiSurfaceImpl)object).getElements().iterator();
LineList coords = new LineList();
while (surfaces.hasNext()) {
SurfaceBoundary sb = ((SurfaceImpl)surfaces.next()).getBoundary();
Ring exterior = sb.getExterior();
coords.addRingToCoords((RingImplUnsafe) exterior);
List<Ring> interiors = sb.getInteriors();
for (int i=0; i<interiors.size(); i++) {
coords.addRingToCoords((RingImplUnsafe) interiors.get(i));
}
}