src/main/java/com/spinyowl/legui/system/renderer/nvg/util/NvgShapes.java
public static void drawRect(long nvg, Vector4fc rectangle, Vector4fc bgColor, Vector4f radius) {
    if (radius != null && !radius.equals(ZERO_CORNDERS)) {
      try (NVGColor fillColor = NvgColorUtil.create(bgColor)) {
        nvgBeginPath(nvg);
        nvgFillColor(nvg, fillColor);
        nvgRoundedRectVarying(nvg, rectangle.x(), rectangle.y(), rectangle.z(), rectangle.w(),
            radius.x, radius.y, radius.z, radius.w);
        nvgFill(nvg);
      }
    } else {
      drawRect(nvg, rectangle, bgColor, radius);
    }
  }
/**
   * Used to draw rectangle.
   *
   * @param nvg       nanovg context
   * @param rectangle rectangle size and position.
   * @param bgColor   rectangle background color.
   * @param radius    cornder radius
   */
Used to draw rectangle.
@param nvg       nanovg context
@param rectangle rectangle size and position.
@param bgColor   rectangle background color.
@param radius    cornder radius
Used to draw rectangle . @param nvg nanovg context @param rectangle rectangle size and position . @param bgColor rectangle background color . @param radius cornder radius
public static void drawRect(long nvg, Vector4fc rectangle, Vector4fc bgColor, Vector4f radius) {
    if (radius != null && !radius.equals(ZERO_CORNDERS)) {
      try (NVGColor fillColor = NvgColorUtil.create(bgColor)) {
        nvgBeginPath(nvg);
        nvgFillColor(nvg, fillColor);
        nvgRoundedRectVarying(nvg, rectangle.x(), rectangle.y(), rectangle.z(), rectangle.w(),
            radius.x, radius.y, radius.z, radius.w);
        nvgFill(nvg);
      }
    } else {
      drawRect(nvg, rectangle, bgColor, radius);
    }
  }
public static void drawRect ( long nvg , Vector4fc rectangle , Vector4fc bgColor , Vector4f radius ) { if ( radius != null && ! radius . equals ( ZERO_CORNDERS ) ) { try ( NVGColor fillColor = NvgColorUtil . create ( bgColor ) ) { nvgBeginPath ( nvg ) ; nvgFillColor ( nvg , fillColor ) ; nvgRoundedRectVarying ( nvg , rectangle . x ( ) , rectangle . y ( ) , rectangle . z ( ) , rectangle . w ( ) , radius . x , radius . y , radius . z , radius . w ) ; nvgFill ( nvg ) ; } } else { drawRect ( nvg , rectangle , bgColor , radius ) ; } }
Used to draw rectangle.
Used to draw rectangle .