From 92eda4db6cf6aae9fb9954c2555742ad7d1cd96a Mon Sep 17 00:00:00 2001 From: Luke Song Date: Tue, 19 Sep 2017 10:51:35 -0700 Subject: vr_ui: drawing changes Change drawing of horizontal bars. Implement image and background drawing. Bug: 65556996 Test: Viewed graphics test Change-Id: I68ddd997123607dbebf972af5a455ce8ef0c7075 --- screen_ui.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index 3a28a09de..f05761c42 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -124,12 +124,23 @@ class ScreenRecoveryUI : public RecoveryUI { virtual int GetProgressBaseline() const; virtual int GetTextBaseline() const; + // Returns pixel width of draw buffer. + virtual int ScreenWidth() const; + // Returns pixel height of draw buffer. + virtual int ScreenHeight() const; + // Draws a highlight bar at (x, y) - (x + width, y + height). virtual void DrawHighlightBar(int x, int y, int width, int height) const; // Draws a horizontal rule at Y. Returns the offset it should be moving along Y-axis. virtual int DrawHorizontalRule(int y) const; // Draws a line of text. Returns the offset it should be moving along Y-axis. virtual int DrawTextLine(int x, int y, const char* line, bool bold) const; + // Draws surface portion (sx, sy, w, h) at screen location (dx, dy). + virtual void DrawSurface(GRSurface* surface, int sx, int sy, int w, int h, int dx, int dy) const; + // Draws rectangle at (x, y) - (x + w, y + h). + virtual void DrawFill(int x, int y, int w, int h) const; + // Draws given surface (surface->pixel_bytes = 1) as text at (x, y). + virtual void DrawTextIcon(int x, int y, GRSurface* surface) const; // Draws multiple text lines. Returns the offset it should be moving along Y-axis. int DrawTextLines(int x, int y, const char* const* lines) const; // Similar to DrawTextLines() to draw multiple text lines, but additionally wraps long lines. -- cgit v1.2.3