public class NvgRenderer extends AbstractRenderer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IMAGE_REFERENCE_MANAGER |
protected java.util.Map<java.lang.String,Font> |
loadedFonts |
static java.lang.String |
NVG_CONTEXT |
Constructor and Description |
---|
NvgRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
initialize() |
protected void |
postRender(Context context) |
protected void |
preRender(Context context) |
static void |
renderBorder(Component component,
Context context)
Used to render border.
|
static void |
renderBorderWScissor(Component component,
Context context,
long nanovg)
Used to render border with scissor.
|
static void |
renderIcon(Icon icon,
Component component,
Context context)
Used to render icon of component.
|
static void |
renderImage(Image image,
org.joml.Vector2fc position,
org.joml.Vector2fc size,
java.util.Map<java.lang.String,java.lang.Object> properties,
Context context)
Used to render image of component.
|
render
public static final java.lang.String NVG_CONTEXT
public static final java.lang.String IMAGE_REFERENCE_MANAGER
protected java.util.Map<java.lang.String,Font> loadedFonts
public static void renderBorder(Component component, Context context)
component
- component for which should be rendered border.context
- context.public static void renderBorderWScissor(Component component, Context context, long nanovg)
component
- component for which should be rendered border.context
- context.nanovg
- nanovg context.public static void renderIcon(Icon icon, Component component, Context context)
icon
- icon to render.component
- icon owner.context
- context.public static void renderImage(Image image, org.joml.Vector2fc position, org.joml.Vector2fc size, java.util.Map<java.lang.String,java.lang.Object> properties, Context context)
image
- image to render.position
- image position.size
- image size.context
- context.public void initialize()
initialize
in interface Renderer
initialize
in class AbstractRenderer
protected void preRender(Context context)
preRender
in class AbstractRenderer
protected void postRender(Context context)
postRender
in class AbstractRenderer
public void destroy()
destroy
in interface Renderer
destroy
in class AbstractRenderer