aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Song2017-09-19 12:51:35 -0500
committerTao Bao2017-10-05 14:02:13 -0500
commit92eda4db6cf6aae9fb9954c2555742ad7d1cd96a (patch)
treeff3dae97202620c6a9a37f891b580ecf3fd6be7e /screen_ui.h
parent9baa19012a535fa158d00fe37f19b1fbae5381cf (diff)
downloadplatform-bootable-recovery-92eda4db6cf6aae9fb9954c2555742ad7d1cd96a.tar.gz
platform-bootable-recovery-92eda4db6cf6aae9fb9954c2555742ad7d1cd96a.tar.xz
platform-bootable-recovery-92eda4db6cf6aae9fb9954c2555742ad7d1cd96a.zip
vr_ui: drawing changes
Change drawing of horizontal bars. Implement image and background drawing. Bug: 65556996 Test: Viewed graphics test Change-Id: I68ddd997123607dbebf972af5a455ce8ef0c7075
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/screen_ui.h b/screen_ui.h
index 3a28a09d..f05761c4 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -124,12 +124,23 @@ class ScreenRecoveryUI : public RecoveryUI {
124 virtual int GetProgressBaseline() const; 124 virtual int GetProgressBaseline() const;
125 virtual int GetTextBaseline() const; 125 virtual int GetTextBaseline() const;
126 126
127 // Returns pixel width of draw buffer.
128 virtual int ScreenWidth() const;
129 // Returns pixel height of draw buffer.
130 virtual int ScreenHeight() const;
131
127 // Draws a highlight bar at (x, y) - (x + width, y + height). 132 // Draws a highlight bar at (x, y) - (x + width, y + height).
128 virtual void DrawHighlightBar(int x, int y, int width, int height) const; 133 virtual void DrawHighlightBar(int x, int y, int width, int height) const;
129 // Draws a horizontal rule at Y. Returns the offset it should be moving along Y-axis. 134 // Draws a horizontal rule at Y. Returns the offset it should be moving along Y-axis.
130 virtual int DrawHorizontalRule(int y) const; 135 virtual int DrawHorizontalRule(int y) const;
131 // Draws a line of text. Returns the offset it should be moving along Y-axis. 136 // Draws a line of text. Returns the offset it should be moving along Y-axis.
132 virtual int DrawTextLine(int x, int y, const char* line, bool bold) const; 137 virtual int DrawTextLine(int x, int y, const char* line, bool bold) const;
138 // Draws surface portion (sx, sy, w, h) at screen location (dx, dy).
139 virtual void DrawSurface(GRSurface* surface, int sx, int sy, int w, int h, int dx, int dy) const;
140 // Draws rectangle at (x, y) - (x + w, y + h).
141 virtual void DrawFill(int x, int y, int w, int h) const;
142 // Draws given surface (surface->pixel_bytes = 1) as text at (x, y).
143 virtual void DrawTextIcon(int x, int y, GRSurface* surface) const;
133 // Draws multiple text lines. Returns the offset it should be moving along Y-axis. 144 // Draws multiple text lines. Returns the offset it should be moving along Y-axis.
134 int DrawTextLines(int x, int y, const char* const* lines) const; 145 int DrawTextLines(int x, int y, const char* const* lines) const;
135 // Similar to DrawTextLines() to draw multiple text lines, but additionally wraps long lines. 146 // Similar to DrawTextLines() to draw multiple text lines, but additionally wraps long lines.