public class EdgeH
extends java.lang.Object
implements java.io.Serializable
For example, the center of the NodeInst simply has multiplier = 0 and adder = 0. The left edge of the NodeInst has multiplier = -0.5 and adder = 0. The point that is 2 left of the right edge has multiplier = 0.5 and adder = -2. The point that is 3 right of the center has multiplier = 0 and adder = 3.
Constructor and Description |
---|
EdgeH(double multiplier,
double adder)
Constructs an
EdgeH with the specified values. |
Modifier and Type | Method and Description |
---|---|
static EdgeH |
by(double width,
double amt) |
static EdgeH |
by0(double amt) |
static EdgeH |
by10(double amt) |
static EdgeH |
by2(double amt) |
static EdgeH |
by3(double amt) |
static EdgeH |
by4(double amt) |
static EdgeH |
by6(double amt) |
static EdgeH |
by8(double amt) |
static EdgeH |
c(double amt)
Describes a position that doesnt't move.
|
boolean |
equals(java.lang.Object other)
Compare to another EdgeH
|
static EdgeH |
fromCenter(double amt)
Describes a position that is away from the center by a specified amount.
|
static EdgeH |
fromLeft(double amt)
Describes a position that is in from the left by a specified amount.
|
static EdgeH |
fromRight(double amt)
Describes a position that is in from the right by a specified amount.
|
ECoord |
getAdder()
Returns the adder as ECoord object.
|
long |
getFixpValue(EPoint size)
Returns the fixed-point value of this EdgeH
|
long |
getGridValue(EPoint size)
Returns the grid value of this EdgeH
|
double |
getMultiplier()
Returns the multiplier.
|
int |
hashCode() |
static EdgeH |
l(double amt)
Describes a position that moves left.
|
static EdgeH |
makeCenter()
Creates a position that describes the center of the NodeInst.
|
static EdgeH |
r(double amt)
Describes a position that moves right.
|
java.lang.String |
toString()
Returns a printable version of this EdgeH.
|
EdgeH |
withGridAdder(long gridAdder)
Returns EdgeH with the new adder.
|
public EdgeH(double multiplier, double adder)
EdgeH
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 EdgeH 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 EdgeH withGridAdder(long gridAdder)
gridAdder
- the new adder.public static EdgeH l(double amt)
amt
- the x-coordinate of the position.public static EdgeH c(double amt)
amt
- the x-coordinate of the position.public static EdgeH r(double amt)
amt
- the x-coordinate of the position.public static EdgeH by(double width, double amt)
public static EdgeH by0(double amt)
public static EdgeH by2(double amt)
public static EdgeH by3(double amt)
public static EdgeH by4(double amt)
public static EdgeH by6(double amt)
public static EdgeH by8(double amt)
public static EdgeH by10(double amt)
public static EdgeH fromLeft(double amt)
amt
- the amount to inset from the left of a NodeInst.public static EdgeH fromRight(double amt)
amt
- the amount to inset from the right of a NodeInst.public static EdgeH fromCenter(double amt)
amt
- the amount to move away from the center of the NodeInst.public static EdgeH makeCenter()
public java.lang.String toString()
toString
in class java.lang.Object