Class NvgShapes
java.lang.Object
com.spinyowl.legui.system.renderer.nvg.util.NvgShapes
NanoVG Shape utility. Used to draw shapes with NanoVG.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final org.joml.Vector4fc -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawLine(long nvg, float width, org.joml.Vector4f color, int lineCap, float fromX, float fromY, float toX, float toY) Used to render line.static voiddrawLine(long nvg, float width, org.joml.Vector4f color, int lineCap, org.joml.Vector2fc from, org.joml.Vector2fc to) Used to render line.static voiddrawRect(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc bgColor) Used to draw rectangle.static voiddrawRect(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc bgColor, float radius) Used to draw rectangle.static voiddrawRect(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc bgColor, org.joml.Vector4f radius) Used to draw rectangle.static voiddrawRect(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc bgColor) Used to draw rectangle.static voiddrawRect(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc bgColor, float radius) Used to draw rectangle.static voiddrawRect(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc bgColor, org.joml.Vector4f radius) Used to draw rectangle.static voiddrawRectStroke(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc rectStrokeColor, float strokeWidth) Used to draw rectangle stroke.static voiddrawRectStroke(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc rectStrokeColor, float strokeWidth, float radius) Used to draw rectangle stroke.static voiddrawRectStroke(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc rectStrokeColor, float strokeWidth, org.joml.Vector4f radius) Used to draw rectangle stroke.static voiddrawRectStroke(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc rectStrokeColor, float strokeWidth) Used to draw rectangle stroke.static voiddrawRectStroke(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc rectStrokeColor, float strokeWidth, float radius) Used to draw rectangle stroke.static voiddrawRectStroke(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc rectStrokeColor, float strokeWidth, org.joml.Vector4f radius) Used to draw rectangle stroke.
-
Field Details
-
ZERO_CORNDERS
public static final org.joml.Vector4fc ZERO_CORNDERS -
MIN_ALPHA
public static final float MIN_ALPHA- See Also:
-
-
Method Details
-
drawRect
public static void drawRect(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc bgColor) Used to draw rectangle.- Parameters:
nvg- nanovg context.position- rectangle position.size- rectangle size.bgColor- rectangle background color.
-
drawRect
public static void drawRect(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc bgColor) Used to draw rectangle.- Parameters:
nvg- nanovg contextrectangle- rectangle size and position.bgColor- rectangle background color.
-
drawRect
public static void drawRect(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc bgColor, float radius) Used to draw rectangle.- Parameters:
nvg- nanovg context.position- rectangle position.size- rectangle size.bgColor- rectangle background color.radius- cornder radius
-
drawRect
public static void drawRect(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc bgColor, org.joml.Vector4f radius) Used to draw rectangle.- Parameters:
nvg- nanovg context.position- rectangle position.size- rectangle size.bgColor- rectangle background color.radius- cornder radius
-
drawRect
public static void drawRect(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc bgColor, float radius) Used to draw rectangle.- Parameters:
nvg- nanovg contextrectangle- rectangle size and position.bgColor- rectangle background color.radius- cornder radius
-
drawRect
public static void drawRect(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc bgColor, org.joml.Vector4f radius) Used to draw rectangle.- Parameters:
nvg- nanovg contextrectangle- rectangle size and position.bgColor- rectangle background color.radius- cornder radius
-
drawRectStroke
public static void drawRectStroke(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc rectStrokeColor, float strokeWidth) Used to draw rectangle stroke.- Parameters:
nvg- nanovg context.position- rectangle position.size- rectangle size.rectStrokeColor- rectangle color.strokeWidth- stroke width.
-
drawRectStroke
public static void drawRectStroke(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc rectStrokeColor, float strokeWidth) Used to draw rectangle stroke.- Parameters:
nvg- nanovg contextrectangle- rectangle size and position.rectStrokeColor- rectangle color.strokeWidth- stroke width.
-
drawRectStroke
public static void drawRectStroke(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc rectStrokeColor, float strokeWidth, org.joml.Vector4f radius) Used to draw rectangle stroke.- Parameters:
nvg- nanovg contextrectangle- rectangle size and position.rectStrokeColor- rectangle color.strokeWidth- stroke width.radius- radius vector.
-
drawRectStroke
public static void drawRectStroke(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc rectStrokeColor, float strokeWidth, float radius) Used to draw rectangle stroke.- Parameters:
nvg- nanovg context.position- rectangle position.size- rectangle size.rectStrokeColor- rectangle color.radius- corner radiusstrokeWidth- stroke width.
-
drawRectStroke
public static void drawRectStroke(long nvg, org.joml.Vector2fc position, org.joml.Vector2fc size, org.joml.Vector4fc rectStrokeColor, float strokeWidth, org.joml.Vector4f radius) Used to draw rectangle stroke.- Parameters:
nvg- nanovg context.position- rectangle position.size- rectangle size.rectStrokeColor- rectangle color.strokeWidth- stroke width.radius- radius vector.
-
drawRectStroke
public static void drawRectStroke(long nvg, org.joml.Vector4fc rectangle, org.joml.Vector4fc rectStrokeColor, float strokeWidth, float radius) Used to draw rectangle stroke.- Parameters:
nvg- nanovg contextrectangle- rectangle size and position.rectStrokeColor- rectangle color.strokeWidth- stroke width.radius- corner radius.
-
drawLine
public static void drawLine(long nvg, float width, org.joml.Vector4f color, int lineCap, float fromX, float fromY, float toX, float toY) Used to render line.- Parameters:
nvg- nanoVG context.color- color to renderwidth- line width (end of the line)lineCap- line cap. One of:BUTT,ROUND,SQUARE,BEVEL,MITERfromX- x coordinate of start point of linefromY- y coordinate of start point of linetoX- x coordinate of end point of linetoY- y coordinate of end point of line
-
drawLine
public static void drawLine(long nvg, float width, org.joml.Vector4f color, int lineCap, org.joml.Vector2fc from, org.joml.Vector2fc to) Used to render line.- Parameters:
nvg- nanoVG context.color- color to renderwidth- line width (end of the line)lineCap- line cap. One of:BUTT,ROUND,SQUARE,BEVEL,MITERfrom- start point of lineto- end point of line
-