Package org.polyfrost.polyui.data
Class PolyImage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumPolyImage.TypeTypes for images in PolyUI.
public enumPolyImage.MaterialStyleStyles for Google Material icons
-
Constructor Summary
Constructors Constructor Description PolyImage(String resourcePath, PolyImage.Type type)PolyImage(String resourcePath)
-
Method Summary
Modifier and Type Method Description final FloatgetWidth()final UnitsetWidth(Float width)final FloatgetHeight()final UnitsetHeight(Float height)final Vec2getSize()final UnitsetSize(Vec2 size)final PolyImage.TypegetType()StringtoString()IntegerhashCode()Booleanequals(Object other)final static PolyImage.Typefrom(String fileName)final static PolyImagegetMaterialIcon(String icon, PolyImage.MaterialStyle style)Get an SVG icon from the Google Material Icons repository on GitHub. final static PolyImagegetMaterialIcon(String icon)Get an SVG icon from the Google Material Icons repository on GitHub. -
-
Constructor Detail
-
PolyImage
PolyImage(String resourcePath, PolyImage.Type type)
- Parameters:
resourcePath- the path to the resourcetype- the image type.
-
PolyImage
PolyImage(String resourcePath)
- Parameters:
resourcePath- the path to the resource
-
-
Method Detail
-
getType
final PolyImage.Type getType()
-
from
final static PolyImage.Type from(String fileName)
-
getMaterialIcon
@JvmOverloads() final static PolyImage getMaterialIcon(String icon, PolyImage.MaterialStyle style)
Get an SVG icon from the Google Material Icons repository on GitHub.
Note that these icons are licensed under the Apache 2.0 License.
- Parameters:
icon- the name of the icon, as a path as it is on the repo, using either dots or slashes, for examplecamera.11mporactions.abc.style- the Material icon style to use.- Since:
0.16.0
-
getMaterialIcon
@JvmOverloads() final static PolyImage getMaterialIcon(String icon)
Get an SVG icon from the Google Material Icons repository on GitHub.
Note that these icons are licensed under the Apache 2.0 License.
- Parameters:
icon- the name of the icon, as a path as it is on the repo, using either dots or slashes, for examplecamera.11mporactions.abc.- Since:
0.16.0
-
-
-
-