Class UIPainter2D

java.lang.Object
net.risingworld.api.ui.UIElement
net.risingworld.api.ui.UIPainter2D
All Implemented Interfaces:
Serializable

public class UIPainter2D extends UIElement
A simplified version of the UIMesh element. It enables you to create custom shapes and elements, but instead of providing individual vertices, this class uses a Vector API to creates lines and shapes more easily.

Please note that most style properties have no impact on the UIMesh!
See Also:
  • Constructor Details

    • UIPainter2D

      public UIPainter2D()
  • Method Details

    • arc

      public void arc(Vector2f center, float radius, int startAngle, int endAngle, UIPainter2D.ArcDirection direction)
    • arcTo

      public void arcTo(Vector2f p1, Vector2f p2, float radius)
    • bezierCurveTo

      public void bezierCurveTo(Vector2f p1, Vector2f p2, Vector2f p3)
    • beginPath

      public void beginPath()
    • closePath

      public void closePath()
    • fill

      public void fill(UIPainter2D.FillRule fillRule)
    • lineTo

      public void lineTo(Vector2f pos)
    • moveTo

      public void moveTo(Vector2f pos)
    • quadraticCurveTo

      public void quadraticCurveTo(Vector2f p1, Vector2f p2)
    • stroke

      public void stroke()
    • setFillColor

      public void setFillColor(float r, float g, float b, float a)
    • setLineCap

      public void setLineCap(UIPainter2D.LineCap lineCap)
    • setLineJoin

      public void setLineJoin(UIPainter2D.LineJoin lineJoin)
    • setLineWith

      public void setLineWith(float lineWidth)
    • setMiterLimit

      public void setMiterLimit(float miterLimit)
    • setStrokeColor

      public void setStrokeColor(float r, float g, float b, float a)
    • clear

      public void clear()
    • update

      public void update()