protected void doPreRender(KMLTraversalContext tc, DrawContext dc) { if (this.getRenderable() == null) { this.initializeRenderable(tc); } KMLRenderable r = this.getRenderable(); if (r != null) { r.preRender(tc, dc); } }
protected void doRender(KMLTraversalContext tc, DrawContext dc) { // We've already initialized the screen image renderable during the preRender pass. Render the screen image // without any further preparation. KMLRenderable r = this.getRenderable(); if (r != null) { r.render(tc, dc); } // Render the feature balloon (if any) this.renderBalloon(tc, dc); }
protected bool isFeatureActive(KMLTraversalContext tc, DrawContext dc) { if (this.getVisibility() != null && !this.getVisibility()) { return(false); } KMLRegion region = this.getRegion(); if (region == null) { region = tc.peekRegion(); } return(region == null || region.isActive(tc, dc)); }
/** * Create the renderable that will represent the overlay. * * @param tc the current KML traversal context. */ protected void initializeRenderable(KMLTraversalContext tc) { final String altitudeMode = this.getAltitudeMode(); if ("absolute".Equals(altitudeMode)) { this.renderable = new KMLGroundOverlayPolygonImpl(tc, this); } else // Default to clampToGround { // If the overlay has an icon, create a surface image renderable. Otherwise, create a surface polygon to // render the overlay as a colored polygon. if (this.getIcon() != null && this.getIcon().getHref() != null) { this.renderable = new KMLSurfaceImageImpl(tc, this); } else { this.renderable = new KMLSurfacePolygonImpl(tc, this); } } }
/** * Create the renderable that will represent the overlay. * * @param tc the current KML traversal context. */ protected void initializeRenderable(KMLTraversalContext tc) { renderable = new KMLScreenImageImpl(tc, this); }