public class Polygon extends Primitive
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getBorderColor()
Gets the border color of this polygon.
|
float |
getBorderWidth()
Gets the border width of this polygon.
|
int |
getFillColor()
Gets the fill color of this polygon.
|
int |
hashCode() |
boolean |
isValid() |
boolean |
needsRebuilding()
Whether or not this renderable needs to be rebuilt.
|
void |
remove()
Removes the polygon from the map.
|
protected void |
requestRebuilding()
Sets the flag that indicates that this renderable needs to be rebuilt
because some property changed which does not support on the fly modification.
|
Renderable |
selectTopMostRenderableAt(double[] touchPoint,
double radius)
Returns the renderable at the point provided.
|
void |
setBorderColor(int color)
Sets the border color of this polygon.
|
void |
setBorderWidth(float width)
Sets the border width of this polygon.
|
void |
setFillColor(int color)
Sets the fill color of this polygon.
|
void |
setTexture(android.content.Context context,
int resourceId)
Use the given a resource id as the image to fill this polygon with; so sets a texture to fill
polygon with.
|
void |
setTextureAlpha(int textureAlpha)
Sets a transparency for polygon texture.
|
void |
setVisibility(boolean isVisible)
Sets the visibility of this
Renderable . |
void |
setZIndex(int zIndex)
Sets the zIndex of this
Renderable . |
void |
update()
Prepare this
Renderable for rendering might be better. |
notifyDataChanged, registerDataChangeListener, release, unregisterDataChangeListener
getTag, getZIndex, isSelectable, isVisible, selectable, setTag
public boolean needsRebuilding()
protected void requestRebuilding()
public void setBorderColor(int color)
color
- The color in ARGB formatpublic int getBorderColor()
public void setFillColor(int color)
color
- The color in ARGB formatpublic int getFillColor()
public void setBorderWidth(float width)
width
- the width in screen pixelspublic float getBorderWidth()
public void update()
Renderable
Renderable
for rendering might be better.public boolean isValid()
true
if Renderable
can be rendered by CustomOverlayRenderer
.public void remove()
public void setTexture(android.content.Context context, int resourceId)
context
- The Context
to read the Drawable from.resourceId
- The resource ID of the Drawable to use.public final void setZIndex(int zIndex)
Renderable
Renderable
. Renderable
with higher zIndices are drawn above those with lower indices.public void setTextureAlpha(int textureAlpha)
setTexture(Context, int)
.textureAlpha
- The alpha/transparency value [0, 255], 0 being fully transparent and 255 being
fully opaque.public Renderable selectTopMostRenderableAt(double[] touchPoint, double radius)
Renderable
touchPoint
- the point to check whether a renderable exists, values in world coordinates.radius
- the touchPoint, where the renderables are checked for, in world coordinates.public void setVisibility(boolean isVisible)
Renderable
Renderable
.setVisibility
in class Renderable
isVisible
- If true, then the primitive is visible; if false, it is not.