-//printf("BC_Meter::draw_face image_number %d pixel %d pixels %d in_start %d in_span %d\n", image_number, pixel, pixels, in_start, in_span);
-//printf("BC_Meter::draw_face %d %d %d %d\n", orientation, region, images[image_number]->get_h() - in_start - in_span);
- if(orientation == METER_HORIZ)
- {
- draw_pixmap(images[image_number],
- pixel,
- x,
- in_span + 1,
- get_h(),
- in_start,
- 0);
+// printf("BC_Meter::draw_face %d dst_y=%d src_y=%d"
+// " pixels=%d pixel=%d in_h=%d in_start=%d in_span=%d in_third=%d in_third3=%d\n",
+// __LINE__, get_h() - pixel - in_span, in_h - in_start - in_span,
+// pixels, pixel, in_h, in_start, in_span, in_third, in_third3);
+ draw_pixmap(images[image_number], x, get_h() - pixel - in_span,
+ get_w(), in_span + 1, 0, in_h - in_start - in_span);
+ pixel += in_span;
+ }
+ }
+ else {
+ while( pixel < pixels ) {
+// Select image to draw
+ if( pixel < level_pixel ||
+ (pixel >= peak_pixel1 && pixel < peak_pixel2) ) {
+ if( pixel < low_division )
+ image_number = METER_GREEN;
+ else
+ if( pixel < medium_division )
+ image_number = METER_YELLOW;
+ else
+ if( pixel < high_division )
+ image_number = METER_RED;
+ else
+ image_number = METER_WHITE;
+ }
+ else {
+ image_number = METER_NORMAL;
+ }
+
+// Select region of image to duplicate
+ if( pixel < left_pixel ) {
+ region = METER_LEFT;
+ in_start = pixel + region_pixel(region);
+ in_span = region_pixels(region) - (in_start - region_pixel(region));