public class ArcToCommand extends java.lang.Object implements ArcToCommandIf
<arcTo wR="wr" hR="hr" stAng="stAng" swAng="swAng"/>
Where wr and wh are the height and width radii
of the supposed circle being used to draw the arc. This gives the circle
a total height of (2 * hR) and a total width of (2 * wR)
stAng is the start angle and swAng is the swing angle
Java class for CT_Path2DArcTo complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="CT_Path2DArcTo">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<attribute name="wR" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
<attribute name="hR" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjCoordinate" />
<attribute name="stAng" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjAngle" />
<attribute name="swAng" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_AdjAngle" />
</restriction>
</complexContent>
</complexType>
| Constructor and Description |
|---|
ArcToCommand() |
| Modifier and Type | Method and Description |
|---|---|
static double |
convertOoxml2AwtAngle(double ooAngle,
double width,
double height)
Arc2D angles are skewed, OOXML aren't ...
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getHR() |
java.lang.String |
getStAng() |
java.lang.String |
getSwAng() |
java.lang.String |
getWR() |
int |
hashCode() |
void |
setHR(java.lang.String hr) |
void |
setStAng(java.lang.String stAng) |
void |
setSwAng(java.lang.String swAng) |
void |
setWR(java.lang.String wr) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitexecutepublic void setHR(java.lang.String hr)
setHR in interface ArcToCommandIfpublic java.lang.String getHR()
getHR in interface ArcToCommandIfpublic java.lang.String getStAng()
getStAng in interface ArcToCommandIfpublic java.lang.String getWR()
getWR in interface ArcToCommandIfpublic void setWR(java.lang.String wr)
setWR in interface ArcToCommandIfpublic void setStAng(java.lang.String stAng)
setStAng in interface ArcToCommandIfpublic java.lang.String getSwAng()
getSwAng in interface ArcToCommandIfpublic void setSwAng(java.lang.String swAng)
setSwAng in interface ArcToCommandIf@Internal public static double convertOoxml2AwtAngle(double ooAngle, double width, double height)
Furthermore, ooxml angle starts at the X-axis and increases clock-wise, whereas Arc2D api states "45 degrees always falls on the line from the center of the ellipse to the upper right corner of the framing rectangle" so we need to reverse it
AWT: OOXML:
|90/-270 |270/-90 (16200000)
| |
+/-180-----------0 +/-180-----------0
| (10800000) |
|270/-90 |90/-270 (5400000)
ooAngle - the angle in OOXML units divided by 60000width - the width of the bounding boxheight - the height of the bounding boxpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright 2022 The Apache Software Foundation or its licensors, as applicable.