public class ShapeArc extends ShapeOval
UNKNOWN_NAME
Constructor and Description |
---|
ShapeArc()
Constructs an arc with default attributes.
|
ShapeArc(boolean ispublic,
double x,
double y,
double rotation,
java.awt.Paint lineColor,
java.awt.Paint fillColor,
double radiusX,
double radiusY,
double angleStart,
double angle,
double lineWidth,
LineStyle lineStyle)
Constructs a 2D-only arc with specific attributes.
|
ShapeArc(ShapeDrawMode drawMode,
boolean ispublic,
double x,
double y,
double z,
double rotation,
java.awt.Paint lineColor,
java.awt.Paint fillColor,
double radiusX,
double radiusY,
double zHeight,
double dz,
double angleStart,
double angle,
double lineWidth,
LineStyle lineStyle)
Constructs an arc with specific attributes.
|
Modifier and Type | Method and Description |
---|---|
ShapeArc |
clone()
Creates and returns a copy of this shape (i.e. new shape instance).
|
boolean |
contains(double px,
double py)
|
double |
getAngle()
Returns the angular extent of the arc in radians, clockwise.
|
double |
getAngleStart()
Returns the starting angle of the arc (0 means 3 o'clock) in radians, clockwise.
|
double |
getDz()
Returns the difference of z coordinates of the arc end and start points.
|
void |
postSVGShapeSpecificAttributes(java.util.List<java.lang.String> att,
java.util.List<java.lang.String> val,
boolean publicOnly)
Posts general properties specific to a particular shape class.
|
Point |
randomPointInside(java.util.Random rng)
Returns the randomly chosen point inside the shape area.
|
void |
setAngle(double angle)
Sets the angular extent of the arc in radians, clockwise.
|
void |
setAngleStart(double angleStart)
Sets the starting angle of the arc (0 means 3 o'clock) in radians, clockwise.
|
void |
setDz(double dz)
Sets the difference of z coordinates of the arc end and start points.
|
getRadiusX, getRadiusY, setRadius, setRadiusX, setRadiusY
getFillColor, getFillTexture, getLineColor, getLineStyle, getLineTexture, getLineWidth, getPresentable, getZHeight, getZOffset, setContextReference_xjal, setFillColor, setFillColor, setLineColor, setLineColor, setLineStyle, setLineWidth, setZHeight
canHandleClick, getDrawMode, getScaleZ, getZ, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZ
executeUserAction, findSVGElement, getGroup, getLevel, getName, getRotation, getScaleX, getScaleY, getSVGId, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, restoreOwner, setLevel, setPublic_xjal, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getX, getY
initializeInternal, postInitialize
public ShapeArc()
public ShapeArc(boolean ispublic, double x, double y, double rotation, java.awt.Paint lineColor, java.awt.Paint fillColor, double radiusX, double radiusY, double angleStart, double angle, double lineWidth, LineStyle lineStyle)
ispublic
- if true
, the shape is visible on container's presentationx
- the x coordinate of the arc centery
- the y coordinate of the arcrotation
- the rotation of the arc in radianslineColor
- line color (or Texture
) of the arcfillColor
- fill color (or Texture
) of the arcradiusX
- "horizontal" radius of the arcradiusY
- "vertical" radius of the arcangleStart
- the starting angle of the arc (0 means 3 o'clock) in radians, clockwiseangle
- the angular extent of the arc in radians, clockwiselineWidth
- the line width of the arclineStyle
- the line stroke style of the arc (solid, dotted, dashed)public ShapeArc(ShapeDrawMode drawMode, boolean ispublic, double x, double y, double z, double rotation, java.awt.Paint lineColor, java.awt.Paint fillColor, double radiusX, double radiusY, double zHeight, double dz, double angleStart, double angle, double lineWidth, LineStyle lineStyle)
drawMode
- where to draw this shape: 2D, 3D or 2D+3Dispublic
- if true
, the shape is visible on container's presentationx
- the x coordinate of the arc centery
- the y coordinate of the arc centerz
- the z coordinate of the arc centerrotation
- the rotation of the arc in radianslineColor
- line color (or Texture
) of the arcfillColor
- fill color (or Texture
) of the arcradiusX
- the radius of the arc along X-axisradiusY
- the radius of the arc along Y-axiszHeight
- the height of the arc along Z-axisdz
- the difference of z coordinates of the arc end and start pointsangleStart
- the starting angle of the arc (0 means 3 o'clock) in radians, clockwiseangle
- the angular extent of the arc in radians, clockwiselineWidth
- the line width of the arclineStyle
- the line stroke style of the arc
(only solid is supported)public void setAngleStart(double angleStart)
angleStart
- the starting angle of the arcpublic double getAngleStart()
public void setAngle(double angle)
angle
- the angular extent of the arcpublic double getAngle()
public void setDz(double dz)
dz
- the new difference of z coordinates of the arc end and start pointspublic double getDz()
public Point randomPointInside(java.util.Random rng)
Shape
randomPointInside
in class ShapeOval
rng
- the random number generator.public boolean contains(double px, double py)
Shape
public ShapeArc clone()
Shape
public void postSVGShapeSpecificAttributes(java.util.List<java.lang.String> att, java.util.List<java.lang.String> val, boolean publicOnly)
Shape
postSVGShapeSpecificAttributes
in class ShapeOval
att
- attribute namesval
- attribute valuespublicOnly
- TODOCopyright © AnyLogic North America, LLC. All Rights Reserved.