diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-06-25 00:28:09 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-06-25 00:28:09 +0000 |
| commit | 934941294b27b3e9a9012be1abe86f4e05db2204 (patch) | |
| tree | b704b66f0c8936ba78bdc6a69c2126cf0dba3314 /apps | |
| parent | 24a1f94cd7cc50fbda6689d33c5d2dbcf123dab5 (diff) | |
| download | rockbox-934941294b27b3e9a9012be1abe86f4e05db2204.zip rockbox-934941294b27b3e9a9012be1abe86f4e05db2204.tar.gz rockbox-934941294b27b3e9a9012be1abe86f4e05db2204.tar.bz2 rockbox-934941294b27b3e9a9012be1abe86f4e05db2204.tar.xz | |
Core functions taking advantage of the new, optimised lcd_hline() and lcd_vline() functions. Some cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6859 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/debug_menu.c | 6 | ||||
| -rw-r--r-- | apps/recorder/keyboard.c | 4 | ||||
| -rw-r--r-- | apps/recorder/peakmeter.c | 19 | ||||
| -rw-r--r-- | apps/screens.c | 4 |
4 files changed, 15 insertions, 18 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index a1097ba..805c8db 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1143,10 +1143,10 @@ bool view_battery(void) for (i = BAT_LAST_VAL - 1; i >= 0; i--) { y = (power_history[i] - minv) * BAT_YSPACE / (maxv - minv); lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); - lcd_drawline(x, LCD_HEIGHT-1, x, 20); + lcd_vline(x, LCD_HEIGHT-1, 20); lcd_set_drawmode(DRMODE_SOLID); - lcd_drawline(x, LCD_HEIGHT-1, x, - MIN(MAX(LCD_HEIGHT-1 - y, 20), LCD_HEIGHT-1)); + lcd_vline(x, LCD_HEIGHT-1, + MIN(MAX(LCD_HEIGHT-1 - y, 20), LCD_HEIGHT-1)); x++; } diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index cfaf03c..bbca117 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c @@ -167,7 +167,7 @@ int kbd_input(char* text, int buflen) lcd_putsxy(0, 8+i * font_h, line[i]); /* separator */ - lcd_drawline(0, main_y - margin, LCD_WIDTH - 1, main_y - margin); + lcd_hline(0, LCD_WIDTH - 1, main_y - margin); /* write out the text */ curpos = MIN(editpos, max_chars - MIN(len - editpos, 2)); @@ -184,7 +184,7 @@ int kbd_input(char* text, int buflen) /* cursor */ i = (curpos + 1) * font_w; - lcd_drawline(i, main_y, i, main_y + font_h); + lcd_vline(i, main_y, main_y + font_h); #if CONFIG_KEYPAD == RECORDER_PAD /* draw the status bar */ diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index 8fffc95..779200c 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c @@ -938,8 +938,7 @@ void peak_meter_draw(int x, int y, int width, int height) /* draw left */ lcd_fillrect (x, y, left, height / 2 - 2 ); if (peak_meter_max_l > 0) { - lcd_drawline(x + peak_meter_max_l, y, - x + peak_meter_max_l, y + height / 2 - 2 ); + lcd_vline(x + peak_meter_max_l, y, y + height / 2 - 2 ); } if (peak_meter_l_clip) { lcd_fillrect(x + meterwidth, y, 3, height / 2 - 1); @@ -948,17 +947,15 @@ void peak_meter_draw(int x, int y, int width, int height) /* draw right */ lcd_fillrect(x, y + height / 2 + 1, right, height / 2 - 2); if (peak_meter_max_r > 0) { - lcd_drawline( x + peak_meter_max_r, y + height / 2, - x + peak_meter_max_r, y + height - 2); + lcd_vline( x + peak_meter_max_r, y + height / 2, y + height - 2); } if (peak_meter_r_clip) { lcd_fillrect(x + meterwidth, y + height / 2, 3, height / 2 - 1); } /* draw scale end */ - lcd_drawline(x + meterwidth, y, - x + meterwidth, y + height - 2); - + lcd_vline(x + meterwidth, y, y + height - 2); + lcd_set_drawmode(DRMODE_COMPLEMENT); /* draw dots for scale marks */ for (i = 0; i < db_scale_count; i++) { @@ -976,12 +973,12 @@ void peak_meter_draw(int x, int y, int width, int height) ycenter = y + height / 2; /* display threshold value */ start_trigx = x+peak_meter_scale_value(trig_strt_threshold,meterwidth); - lcd_drawline(start_trigx, ycenter - 2, start_trigx, ycenter); + lcd_vline(start_trigx, ycenter - 2, ycenter); start_trigx ++; if (start_trigx < LCD_WIDTH) lcd_drawpixel(start_trigx, ycenter - 1); stop_trigx = x + peak_meter_scale_value(trig_stp_threshold,meterwidth); - lcd_drawline(stop_trigx, ycenter - 2, stop_trigx, ycenter); + lcd_vline(stop_trigx, ycenter - 2, ycenter); if (stop_trigx > 0) lcd_drawpixel(stop_trigx - 1, ycenter - 1); } #endif @@ -1196,7 +1193,7 @@ bool peak_meter_histogram(void) { for (i = 0; i < PEEKS_PER_DRAW_SIZE; i++) { x = peeks_per_redraw[i] * (LCD_WIDTH - 1)/ max; - lcd_drawline(0, y + i, x, y + i); + lcd_hline(0, x, y + i); } y = PEEKS_PER_DRAW_SIZE + 1; @@ -1208,7 +1205,7 @@ bool peak_meter_histogram(void) { for (i = 0; i < TICKS_PER_DRAW_SIZE; i++) { x = ticks_per_redraw[i] * (LCD_WIDTH - 1)/ max; - lcd_drawline(0, y + i, x, y + i); + lcd_hline(0, x, y + i); } lcd_update(); diff --git a/apps/screens.c b/apps/screens.c index c35d20c..1ae7030 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -854,8 +854,8 @@ void splash(int ticks, /* how long the splash is displayed */ lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); lcd_fillrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4); lcd_set_drawmode(DRMODE_SOLID); - lcd_drawline(0, y-2, LCD_WIDTH-1, y-2); - lcd_drawline(0, LCD_HEIGHT-y+2, LCD_WIDTH-1, LCD_HEIGHT-y+2); + lcd_hline(0, LCD_WIDTH-1, y-2); + lcd_hline(0, LCD_WIDTH-1, LCD_HEIGHT-y+2); } } else |