Package heronarts.glx.ui.vg
Class VGraphics
java.lang.Object
heronarts.glx.ui.vg.VGraphics
Pretty much just a wrapper around the LWJGL NanoVGBGFX library, that makes it a bit more
idiomatic java style and doesn't require the API client to keep track of the NanoVG context
handle or prefix everything with nvg. Also makes for simpler method chaining calls.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
class
class
class
static enum
static enum
class
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionarc
(float cx, float cy, float r, float a0, float a1) arc
(float cx, float cy, float r, float a0, float a1, VGraphics.Winding dir) arcTo
(float x1, float y1, float x2, float y2, float radius) beginFrame
(float width, float height) beginPathMoveToArcFill
(float cx, float cy, float r, float a0, float a1) bezierTo
(float c1x, float c1y, float c2x, float c2y, float x, float y) void
bindFramebuffer
(VGraphics.Framebuffer framebuffer) circle
(float cx, float cy, float r) createFramebuffer
(UI2dContext context, float w, float h, int imageFlags) void
deleteFrameBuffer
(VGraphics.Framebuffer framebuffer) ellipse
(float cx, float cy, float rx, float ry) endFrame()
fill()
fillColor
(float r, float g, float b) fillColor
(float r, float g, float b, float a) fillColor
(int argb) fillLinearGradient
(float sx, float sy, float ex, float ey, int scolor, int ecolor) fillPaint
(VGraphics.Paint paint) fontBlur
(float blur) fontFace
(VGraphics.Font font) fontSize
(float size) long
image
(VGraphics.Image image, float x, float y) image
(VGraphics.Image image, float x, float y, float alpha) imagePattern
(float ox, float oy, float ex, float ey, float alpha, int image) imagePattern
(float ox, float oy, float ex, float ey, int image) intersectScissor
(float x, float y, float w, float h) line
(float x1, float y1, float x2, float y2) lineCap
(VGraphics.LineCap lineCap) lineJoin
(VGraphics.LineJoin lineJoin) lineTo
(float x, float y) moveTo
(float x, float y) void
quadTo
(float cx, float cy, float x, float y) rect
(float x, float y, float w, float h) rect
(float x, float y, float w, float h, float r) reset()
restore()
rotate
(float angle) roundedRect
(float x, float y, float w, float h, float r) roundedRectVarying
(float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft) save()
scissor
(float x, float y, float w, float h) scissorPush
(float x, float y, float w, float h) stroke()
strokeColor
(float r, float g, float b) strokeColor
(float r, float g, float b, float a) strokeColor
(int argb) strokeColor
(UIColor color) strokeWidth
(float strokeWidth) float
textAlign
(VGraphics.Align horizontal) textAlign
(VGraphics.Align horizontal, VGraphics.Align vertical) float
textBoxHeight
(String str, float width) textLetterSpacing
(float spacing) textLineHeight
(float lineHeight) float
translate
(float tx, float ty)
-
Constructor Details
-
VGraphics
-
-
Method Details
-
getHandle
public long getHandle() -
createFramebuffer
public VGraphics.Framebuffer createFramebuffer(UI2dContext context, float w, float h, int imageFlags) -
bindFramebuffer
-
deleteFrameBuffer
-
notifyContentScaleChanged
public void notifyContentScaleChanged() -
fillLinearGradient
-
fillColor
-
fillColor
-
fillColor
-
fillColor
-
fillPaint
-
strokeColor
-
strokeColor
-
strokeWidth
-
strokeColor
-
strokeColor
-
lineJoin
-
lineCap
-
beginFrame
-
endFrame
-
beginPath
-
closePath
-
pathWinding
-
moveTo
-
line
-
lineTo
-
bezierTo
-
quadTo
-
arcTo
-
arc
-
arc
-
beginPathMoveToArcFill
-
rect
-
rect
-
roundedRect
-
roundedRectVarying
public VGraphics roundedRectVarying(float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft) -
ellipse
-
circle
-
image
-
image
-
imagePattern
-
imagePattern
-
fill
-
stroke
-
loadImage
- Throws:
IOException
-
loadIcon
- Throws:
IOException
-
loadFont
- Throws:
IOException
-
fontSize
-
fontBlur
-
textLetterSpacing
-
textLineHeight
-
textAlign
-
textAlign
-
fontFace
-
text
-
textBox
-
textBoxHeight
-
textWidth
-
translate
-
rotate
-
scissor
-
intersectScissor
-
reset
-
resetScissor
-
scissorPush
-
scissorPop
-
save
-
restore
-