chore(api): tweak ImPlot api (#273)

- Added missing PlotBarGroups/PlotBarGroupsH methods
- Tweaked args for PlotBars/PlotBarsH
This commit is contained in:
SpaiR authored and GitHub committed 2024-09-23 10:28:27 +03:00
1 parent 9d44168335
commit 6a66fb761f
2 files changed
+2040 -743

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -580,107 +580,144 @@ public final class ImPlot {
// values // values
/** /**
* Plots a vertical bar graph. #width and #shift are in X units. * Plots a vertical bar graph. #bar_width and #x0 are in X units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBars(String labelId, public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count, @ArgValue(callValue = "LEN(values)") Void count,
@OptArg double width, @OptArg double barWidth,
@OptArg double shift, @OptArg double x0,
@OptArg int offset); @OptArg int offset);
/** /**
* Plots a vertical bar graph. #width and #shift are in X units. * Plots a vertical bar graph. #bar_width and #x0 are in X units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBars(String labelId, public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count, int count,
@OptArg double width, @OptArg double barWidth,
@OptArg double shift, @OptArg double x0,
@OptArg int offset); @OptArg int offset);
// xs,ys // xs,ys
/** /**
* Plots a vertical bar graph. #width and #shift are in X units. * Plots a vertical bar graph. #bar_width and #x0 are in X units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBars(String labelId, public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count, @ArgValue(callValue = "LEN(xs)") Void count,
double width); @ArgValue(callValue = "0.67") Void barWidth,
@OptArg int offset);
/** /**
* Plots a vertical bar graph. #width and #shift are in X units. * Plots a vertical bar graph. #bar_width and #x0 are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
double barWidth,
@OptArg int offset);
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBars(String labelId, public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count, int count,
double width, double barWidth,
@OptArg int offset); @OptArg int offset);
// values // values
/** /**
* Plots a horizontal bar graph. #height and #shift are in Y units. * Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBarsH(String labelId, public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count, @ArgValue(callValue = "LEN(values)") Void count,
@OptArg double height, @OptArg double barHeight,
@OptArg double shift, @OptArg double y0,
@OptArg int offset); @OptArg int offset);
/** /**
* Plots a horizontal bar graph. #height and #shift are in Y units. * Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBarsH(String labelId, public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count, int count,
@OptArg double height, @OptArg double barHeight,
@OptArg double shift, @OptArg double y0,
@OptArg int offset); @OptArg int offset);
// xs,ys // xs,ys
/** /**
* Plots a horizontal bar graph. #height and #shift are in Y units. * Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBarsH(String labelId, public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count, @ArgValue(callValue = "LEN(xs)") Void count,
double height); @ArgValue(callValue = "0.67") Void barHeight,
@OptArg int offset);
/** /**
* Plots a horizontal bar graph. #height and #shift are in Y units. * Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
double barHeight,
@OptArg int offset);
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBarsH(String labelId, public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count, int count,
double height, double barHeight,
@OptArg int offset); @OptArg int offset);
/** /**
* Plots a horizontal bar graph. #height and #shift are in Y units. * Plots a group of vertical bars. #values is a row-major matrix with #item_count rows and #group_count cols. #label_ids should have #item_count elements.
*/ */
@BindingMethod @BindingMethod
public static native void PlotBarsH(String labelId, public static native void PlotBarGroups(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs, @ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys, int itemCount,
@ArgValue(callValue = "LEN(xs)") Void count, int groupCount,
@ArgValue(callValue = "0.67") Void height, @OptArg double groupWidth,
@OptArg int offset); @OptArg double x0,
@OptArg int flags);
/**
* Plots a group of horizontal bars. #values is a row-major matrix with #item_count rows and #group_count cols. #label_ids should have #item_count elements.
*/
@BindingMethod
public static native void PlotBarGroupsH(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int itemCount,
int groupCount,
@OptArg double groupHeight,
@OptArg double y0,
@OptArg int flags);
/** /**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot. * Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.