Files

118 lines
1.9 KiB
Markdown

# Graphic.Graphic
[← Graphic](index.md) · [← Master](../../wiki.md)
Parça 2/4 · [önceki](Graphic.md) · [sonraki](Graphic-3.md)
void serializeNBT(NBTTagCompound tag)
static NBTTagCompound toNBT(Graphic graphic)
Graphic w(int value)
Set width in pixels.
Graphic wh(int w, int h)
Set width and height in pixels.
Graphic x(int value)
Set X in pixels relative to parent component.
Graphic xy(int x, int y)
Set X and Y in pixels relative to parent component.
Graphic y(int value)
Set Y in pixels relative to parent component.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
pixels
public Area pixels
relativeX
public float relativeX
relativeY
public float relativeY
relativeW
public float relativeW
relativeH
public float relativeH
anchorX
public float anchorX
anchorY
public float anchorY
primary
public int primary
hover
public boolean hover
Constructor Detail
Graphic
public Graphic()
Method Detail
fromNBT
public static Graphic fromNBT(NBTTagCompound tag)
toNBT
public static NBTTagCompound toNBT(Graphic graphic)
x
public Graphic x(int value)
Set X in pixels relative to parent component.
rx
public Graphic rx(float value)
Set X relative in percents to parent component. Passed value should be 0..1, where 0 is fully left, and 1 is
fully right.
rx
public Graphic rx(float value,
int offset)
Set X relative in percents to parent component with offset. Passed value should be 0..1, where 0 is fully
left, and 1 is fully right.
Parameters:
value - Percentage how far into X.
offset - Offset in pixels (can be negative).
y
public Graphic y(int value)
Set Y in pixels relative to parent component.
ry
public Graphic ry(float value)