Beatmup
Kernels::DrawBars3< out_t > Class Template Reference

Static Public Member Functions

static void process (AbstractBitmap &bitmap, int x, int y, int y1, int y2, int y3, const color4i &color1, const color4i &color2)
 Plots three vertical bars. More...
 

Detailed Description

template<class out_t>
class Kernels::DrawBars3< out_t >

Definition at line 30 of file signal_plot.cpp.

Member Function Documentation

◆ process()

template<class out_t >
static void Kernels::DrawBars3< out_t >::process ( AbstractBitmap bitmap,
int  x,
int  y,
int  y1,
int  y2,
int  y3,
const color4i color1,
const color4i color2 
)
inlinestatic

Plots three vertical bars.

Parameters
bitmapA bitmap to draw onto
xThe horizontal coordinate
yThe bar top vertical coordinate
y1End of first bar (excluded)
y2End of second bar (included)
y3End of third bar (included)
color1Color of 1st and 3rd bars
color2Color of 2nd bar

Definition at line 44 of file signal_plot.cpp.

44  {
45  out_t ptr(bitmap, x, y);
46  out_t ref = ptr;
47  ref.goTo(x, y1);
48  while (ptr < ref) {
49  ptr = pixint4::fromColor(color1);
50  ptr += ptr.getWidth();
51  }
52  ref.goTo(x, y2);
53  while (ptr < ref) {
54  ptr = pixint4::fromColor(color2);
55  ptr += ptr.getWidth();
56  }
57  ptr = pixint4::fromColor(color2);
58  ptr += ptr.getWidth();
59  ref.goTo(x, y3);
60  while (ptr < ref) {
61  ptr = pixint4::fromColor(color1);
62  ptr += ptr.getWidth();
63  }
64  ptr = pixint4::fromColor(color1);
65  }
JNIEnv jlong jint jint color1
JNIEnv jlong jint jint jint jint y2
JNIEnv jlong jint jint jint color2
JNIEnv jlong jint jint jint y1
jobject jlong jint jint y
jobject jlong jint x
Beatmup::InternalBitmap * bitmap

The documentation for this class was generated from the following file: