public class FeaturePainter
extends java.lang.Object
Constructor and Description |
---|
FeaturePainter() |
Modifier and Type | Method and Description |
---|---|
void |
fill(com.codename1.ui.Graphics g,
Feature feature)
Fills the specified feature on the graphics context
|
protected void |
fill(com.codename1.ui.Graphics g,
Feature feature,
com.codename1.ui.geom.GeneralPath path)
Fills the specified feature on the provided graphics context.
|
int |
getFillAlpha()
Gets the alpha (0-255) transparency to use for filling feature shapes.
|
int |
getFillColor()
Gets the color to be used for filling features.
|
com.codename1.maps.Projection |
getProjection()
Gets the projection that should be applied to features.
|
com.codename1.ui.Stroke |
getStroke()
Gets the stroke that is currently set to be used for stroking features.
|
int |
getStrokeAlpha()
Gets the alpha (0-255) transparency to use for stroking features.
|
int |
getStrokeColor()
Gets the stroke color that is currently set for stroking features.
|
void |
paint(com.codename1.ui.Graphics g,
Feature feature)
Paints the specified feature onto the given graphics context.
|
void |
setFillAlpha(int fillAlpha)
Sets the alpha (0-255) transparency to use for filling feature shapes.
|
void |
setFillColor(int fillColor)
Sets the color to be used for filling features.
|
void |
setProjection(com.codename1.maps.Projection projection)
Sets the projection that should be applied to features
|
void |
setStroke(com.codename1.ui.Stroke stroke)
Sets the stroke that should be used for stroking features.
|
void |
setStrokeAlpha(int strokeAlpha)
Sets the alpha (0-255) transparency to use for stroking features.
|
void |
setStrokeColor(int strokeColor)
Sets the color to be used for stroking features.
|
void |
stroke(com.codename1.ui.Graphics g,
Feature feature)
Strokes the outline for a specified feature in the given graphics context.
|
protected void |
stroke(com.codename1.ui.Graphics g,
Feature feature,
com.codename1.ui.geom.GeneralPath path)
Strokes the specified feature outline on the provided graphics context.
|
public final void paint(com.codename1.ui.Graphics g, Feature feature)
g
- The graphics context to paint ontofeature
- The feature to be painted.public final void fill(com.codename1.ui.Graphics g, Feature feature)
g
- feature
- public final void stroke(com.codename1.ui.Graphics g, Feature feature)
g
- The graphics context to stroke onto.feature
- The feature to be painted.protected void stroke(com.codename1.ui.Graphics g, Feature feature, com.codename1.ui.geom.GeneralPath path)
GeneralPath
object that has been pre-transformed
using applied projections so that you can paint directly onto the graphics
context using g.drawShape(). That said, it may simply be preferable
to call super.stroke(g,feature,path) from the subclass after applying
the desired settings using setColor(), etc...g
- The graphics context.feature
- The feature to be painted.path
- The precalculated path to stroke.protected void fill(com.codename1.ui.Graphics g, Feature feature, com.codename1.ui.geom.GeneralPath path)
GeneralPath
object that has been pre-transformed
using applied projections so that you can paint directly onto the graphics
context using g.drawShape(). That said, it may simply be preferable
to call super.fill(g,feature,path) from the subclass after applying
the desired settings using setColor(), etc...g
- The graphics context.feature
- The feature to be painted.path
- The precalculated path to stroke.public com.codename1.ui.Stroke getStroke()
public void setStroke(com.codename1.ui.Stroke stroke)
stroke
- the stroke to setpublic int getStrokeColor()
public void setStrokeColor(int strokeColor)
strokeColor
- the strokeColor to setpublic int getFillColor()
public void setFillColor(int fillColor)
fillColor
- the fillColor to setpublic int getStrokeAlpha()
public void setStrokeAlpha(int strokeAlpha)
strokeAlpha
- the strokeAlpha to setpublic int getFillAlpha()
public void setFillAlpha(int fillAlpha)
fillAlpha
- the fillAlpha to setpublic com.codename1.maps.Projection getProjection()
public void setProjection(com.codename1.maps.Projection projection)
projection
- the projection to set