src/main/java/com/spinyowl/legui/system/renderer/nvg/util/NvgShapes.java
public static void drawRect(long nvg, Vector2fc position, Vector2fc size, Vector4fc bgColor) {
    if (bgColor.w() <= MIN_ALPHA) {
      return;
    }
    try (NVGColor fillColor = NvgColorUtil.create(bgColor)) {
      nvgBeginPath(nvg);
      nvgFillColor(nvg, fillColor);
      nvgRect(nvg, position.x(), position.y(), size.x(), size.y());
      nvgFill(nvg);
    }
  }
/**
   * Used to draw rectangle.
   *
   * @param nvg      nanovg context.
   * @param position rectangle position.
   * @param size     rectangle size.
   * @param bgColor  rectangle background color.
   */
Used to draw rectangle.
@param nvg      nanovg context.
@param position rectangle position.
@param size     rectangle size.
@param bgColor  rectangle background color.
Used to draw rectangle . @param nvg nanovg context . @param position rectangle position . @param size rectangle size . @param bgColor rectangle background color .
public static void drawRect(long nvg, Vector2fc position, Vector2fc size, Vector4fc bgColor) {
    if (bgColor.w() <= MIN_ALPHA) {
      return;
    }
    try (NVGColor fillColor = NvgColorUtil.create(bgColor)) {
      nvgBeginPath(nvg);
      nvgFillColor(nvg, fillColor);
      nvgRect(nvg, position.x(), position.y(), size.x(), size.y());
      nvgFill(nvg);
    }
  }
public static void drawRect ( long nvg , Vector2fc position , Vector2fc size , Vector4fc bgColor ) { if ( bgColor . w ( ) <= MIN_ALPHA ) { return ; } try ( NVGColor fillColor = NvgColorUtil . create ( bgColor ) ) { nvgBeginPath ( nvg ) ; nvgFillColor ( nvg , fillColor ) ; nvgRect ( nvg , position . x ( ) , position . y ( ) , size . x ( ) , size . y ( ) ) ; nvgFill ( nvg ) ; } }
Used to draw rectangle.
Used to draw rectangle .