code: public void paint(Paintable paintable, Object group, MapContext context) {
  		RasterLayer layer = (RasterLayer) paintable;
  		PictureStyle opacityStyle = new PictureStyle(layer.getOpacity());
  
  		// Create the needed groups in the correct order:
  		context.getRasterContext().drawGroup(mapWidget.getGroup(RenderGroup.RASTER), layer, opacityStyle); 
  
  		// Check layer visibility:
  		if (layer.isShowing()) {
  			context.getRasterContext().unhide(layer);
  		} else {
  			context.getRasterContext().hide(layer);
  		}
  
  	}
docs: The actual painting function. Draws the groups.
  
  @param paintable
  A {@link RasterLayer} object.
  @param group
  The group where the object resides in (optional).
  @param context
  A MapContext object, responsible for actual drawing.