public class EdgeV
extends java.lang.Object
implements java.io.Serializable
For example, the center of the NodeInst simply has multiplier = 0 and adder = 0. The bottom of the NodeInst has multiplier = -0.5 and adder = 0. The point that is 2 below the top has multiplier = 0.5 and adder = -2. The point that is 3 above the center has multiplier = 0 and adder = 3.
Constructor and Description |
---|
EdgeV(double multiplier,
double adder)
Constructs an
EdgeV with the specified values. |
Modifier and Type | Method and Description |
---|---|
static EdgeV |
b(double amt)
Describes a position that moves bottom.
|
static EdgeV |
by(double width,
double amt) |
static EdgeV |
by0(double amt) |
static EdgeV |
by10(double amt) |
static EdgeV |
by2(double amt) |
static EdgeV |
by3(double amt) |
static EdgeV |
by4(double amt) |
static EdgeV |
by6(double amt) |
static EdgeV |
c(double amt)
Describes a position that doesnt't move.
|
boolean |
equals(java.lang.Object other)
Compare to another EdgeV
|
static EdgeV |
fromBottom(double amt)
Describes a position that is in from the bottom by a specified amount.
|
static EdgeV |
fromCenter(double amt)
Describes a position that is away from the center by a specified amount.
|
static EdgeV |
fromTop(double amt)
Describes a position that is in from the top by a specified amount.
|
ECoord |
getAdder()
Returns the adder as ECoord object.
|
long |
getFixpValue(EPoint size)
Returns the fixed-point value of this EdgeV
|
long |
getGridValue(EPoint size)
Returns the grid value of this EdgeV
|
double |
getMultiplier()
Returns the multiplier.
|
int |
hashCode() |
static EdgeV |
makeCenter()
Creates a position that describes the center of the NodeInst.
|
static EdgeV |
t(double amt)
Describes a position that moves top.
|
java.lang.String |
toString()
Returns a printable version of this EdgeV.
|
EdgeV |
withGridAdder(long gridAdder)
Returns EdgeV with the new adder.
|
public EdgeV(double multiplier, double adder)
EdgeV
with the specified values.multiplier
- is the multiplier to store in the EdgeV.adder
- is the adder to store in the EdgeV.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other EdgeV to compare.public int hashCode()
hashCode
in class java.lang.Object
public double getMultiplier()
public ECoord getAdder()
public long getFixpValue(EPoint size)
size
- size of primitivepublic long getGridValue(EPoint size)
size
- size of primitivepublic EdgeV withGridAdder(long gridAdder)
gridAdder
- the new adder.public static EdgeV b(double amt)
amt
- the y-coordinate of the position.public static EdgeV c(double amt)
amt
- the y-coordinate of the position.public static EdgeV t(double amt)
amt
- the y-coordinate of the position.public static EdgeV by(double width, double amt)
public static EdgeV by0(double amt)
public static EdgeV by2(double amt)
public static EdgeV by3(double amt)
public static EdgeV by4(double amt)
public static EdgeV by6(double amt)
public static EdgeV by10(double amt)
public static EdgeV fromTop(double amt)
amt
- the amount to inset from the top of a NodeInst.public static EdgeV fromBottom(double amt)
amt
- the amount to inset from the bottom of a NodeInst.public static EdgeV fromCenter(double amt)
amt
- the amount to move away from the center of the NodeInst.public static EdgeV makeCenter()
public java.lang.String toString()
toString
in class java.lang.Object