Class ScalebarDrawer
java.lang.Object
org.mapfish.print.processor.map.scalebar.ScalebarDrawer
- Direct Known Subclasses:
BarScalebarDrawer
,LineScalebarDrawer
Base class for drawing a scale bar.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ScalebarDrawer
(Graphics2D graphics2d, ScaleBarRenderSettings settings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
draw()
Start the rendering of the scalebar.protected abstract void
drawBar()
Draws the bar itself.final Graphics2D
final ScaleBarRenderSettings
-
Constructor Details
-
ScalebarDrawer
Constructor.- Parameters:
graphics2d
- The graphics context.settings
- Parameters for rendering the scalebar.
-
-
Method Details
-
draw
public final void draw()Start the rendering of the scalebar. -
drawBar
protected abstract void drawBar()Draws the bar itself. The transformation is setup in a manner where the bar should be drawn into the rectangle (0, 0) (intervals*intervalWidth, -barSize). -
getGraphics2d
-
getSettings
-
getParams
-