/**
* @param geometry
* geometry to fill
* @param viewport
* viewport
* @param graphics
* graphics to draw into
*/
@SuppressWarnings("unchecked")
public static void fill(final IGeometry geometry, final Viewport viewport,
final Graphics2D graphics, double opacity) {
if (geometry.isPolygon()) {
try {
Shape shape = viewport.toShape(geometry);
if (shape != null) {
graphics.fill(shape);
}
} catch (NoninvertibleTransformException e) {
e.printStackTrace();
}
} else {
if (geometry.isMultiSurface()) {
GM_Aggregate<IGeometry> aggregate = (GM_Aggregate<IGeometry>) geometry;
for (IGeometry element : aggregate) {
RenderUtil.fill(element, viewport, graphics, opacity);
}
}
}
}
RenderUtil.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:geoxygene
作者:
评论列表
文章目录