Beatmup
Kernels::DrawBars5< out_t > Class Template Reference

Static Public Member Functions

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

Detailed Description

template<typename out_t>
class Kernels::DrawBars5< out_t >

Definition at line 69 of file signal_plot.cpp.

Member Function Documentation

◆ process()

template<typename out_t >
static void Kernels::DrawBars5< out_t >::process ( AbstractBitmap bitmap,
int  x,
int  y,
int  y1,
int  y2,
int  y3,
int  y4,
int  y5,
const color4i color1,
const color4i color2,
const color4i color3 
)
inlinestatic

Plots five 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 (excluded)
y3End of third bar (included)
y4End of fourth bar (included)
y5End of fifth bar (included)
color1Color of 1st and 5th bars
color2Color of 2nd and 4th bars
color3Color of 3rd bar

Definition at line 86 of file signal_plot.cpp.

90  {
91  out_t ptr(bitmap, x, y);
92  out_t ref = ptr;
93  ref.goTo(x, y1);
94  while (ptr < ref) {
95  ptr = pixint4::fromColor(color1);
96  ptr += ptr.getWidth();
97  }
98  ref.goTo(x, y2);
99  while (ptr < ref) {
100  ptr = pixint4::fromColor(color2);
101  ptr += ptr.getWidth();
102  }
103  ref.goTo(x, y3);
104  while (ptr < ref) {
105  ptr = pixint4::fromColor(color3);
106  ptr += ptr.getWidth();
107  }
108  ptr = pixint4::fromColor(color3);
109  ptr += ptr.getWidth();
110  ref.goTo(x, y4);
111  while (ptr < ref) {
112  ptr = pixint4::fromColor(color2);
113  ptr += ptr.getWidth();
114  }
115  if (y3 < y4) {
116  ptr = pixint4::fromColor(color2);
117  ptr += ptr.getWidth();
118  }
119  ref.goTo(x, y5);
120  while (ptr < ref) {
121  ptr = pixint4::fromColor(color1);
122  ptr += ptr.getWidth();
123  }
124  ptr = pixint4::fromColor(color1);
125  }
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: