93 lines
1.9 KiB
Markdown
93 lines
1.9 KiB
Markdown
# UIGraphicsComponent.text
|
|
|
|
[← UIGraphicsComponent](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 3/5 · [önceki](text-2.md) · [sonraki](text-4.md)
|
|
|
|
image
|
|
|
|
public Graphic image(java.lang.String image,
|
|
int x,
|
|
int y,
|
|
int w,
|
|
int h)
|
|
|
|
Draw an image relative to graphics component's frame.
|
|
|
|
Image argument is a so called "resource location." For example, if you want to draw pig's skin on the screen you can input "minecraft:textures/entity/pig/pig.png" and it will draw
|
|
it on the screen.
|
|
|
|
If you have Blockbuster enabled, it can also display images from internet by inputting image's URL. Although, sometimes it won't work due to incorrect headers that doesn't
|
|
identify a web-browser.
|
|
|
|
image
|
|
|
|
public Graphic image(java.lang.String image,
|
|
int x,
|
|
int y,
|
|
int w,
|
|
int h,
|
|
int textureWidth,
|
|
int textureHeight)
|
|
|
|
Draw an image relative to graphics component's frame with known texture size.
|
|
|
|
image
|
|
|
|
public Graphic image(java.lang.String image,
|
|
int x,
|
|
int y,
|
|
int w,
|
|
int h,
|
|
int textureWidth,
|
|
int textureHeight,
|
|
int primary)
|
|
|
|
Draw an image relative to graphics component's frame with known texture size and color.
|
|
|
|
text
|
|
|
|
public Graphic text(java.lang.String text,
|
|
int x,
|
|
int y,
|
|
int color)
|
|
|
|
Draw a text label relative to graphics component's frame.
|
|
|
|
Parameters:
|
|
color - ARGB text's font color.
|
|
|
|
text
|
|
|
|
public Graphic text(java.lang.String text,
|
|
int x,
|
|
int y,
|
|
int color,
|
|
float anchorX,
|
|
float anchorY)
|
|
|
|
Draw a text label with an anchor relative to graphics component's frame.
|
|
|
|
Parameters:
|
|
color - ARGB text's font color.
|
|
anchorX - Horizontal anchor (0..1).
|
|
anchorY - Vertical anchor (0..1).
|
|
|
|
text
|
|
|
|
public Graphic text(java.lang.String text,
|
|
int x,
|
|
int y,
|
|
int w,
|
|
int h,
|
|
|
|
|
|
|
|
int color,
|
|
float anchorX,
|
|
float anchorY)
|
|
|
|
Draw a text label with an anchor relative to graphics component's frame.
|
|
|
|
Parameters:
|