X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fscreen.h;h=44dd2c723be7ea089fdc962c4c7bd8a826bc2571;hb=029e93dad12c51c69e47aa74dcc39f84d315bca3;hp=4d92cb33c42b49242b97d32d1e858fcf55a5babd;hpb=a269b3e29535918a390f448829a3459e4853425b;p=ipdf%2Fcode.git diff --git a/src/screen.h b/src/screen.h index 4d92cb3..44dd2c7 100644 --- a/src/screen.h +++ b/src/screen.h @@ -20,12 +20,15 @@ namespace IPDF // Returns 'false' if the program should quit. bool PumpEvents(); + // Clears the screen to a given colour. + void Clear(float r=1.0, float g=1.0, float b=1.0, float a=1.0); + // Finishes rendering a frame, and presents it on the screen. void Present(); // Get the current width/height of the window's viewport. - int ViewportWidth() { return m_viewport_width; } - int ViewportHeight() { return m_viewport_height; } + int ViewportWidth() const { return m_viewport_width; } + int ViewportHeight() const { return m_viewport_height; } // Handle mouse input. typedef std::function MouseHandler; @@ -43,6 +46,9 @@ namespace IPDF CursorHand }; void SetMouseCursor(MouseCursors cursor); + + void ScreenShot(const char * filename) const; + void RenderBMP(const char * filename) const; private: void ResizeViewport(int width, int height);