win32_graphics.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef WIN32_GRAPHICS_HPP
00026 #define WIN32_GRAPHICS_HPP
00027
00028 #include "../src/os_graphics.hpp"
00029 #include <windows.h>
00030
00031
00032 class GenericBitmap;
00033
00034
00035 class Win32Graphics: public OSGraphics
00036 {
00037 public:
00038 Win32Graphics( intf_thread_t *pIntf, int width, int height );
00039 virtual ~Win32Graphics();
00040
00041
00042 virtual void clear( int xDest = 0, int yDest = 0,
00043 int width = -1, int height = -1 );
00044
00045
00046 virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
00047 int ySrc = 0, int xDest = 0, int yDest = 0,
00048 int width = -1, int height = -1,
00049 bool blend = false );
00050
00051
00052 virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
00053 int ySrc = 0, int xDest = 0, int yDest = 0,
00054 int width = -1, int height = -1 );
00055
00056
00057 virtual void drawRect( int left, int top, int width, int height,
00058 uint32_t color );
00059
00060
00061
00062 virtual void fillRect( int left, int top, int width, int height,
00063 uint32_t color );
00064
00065
00066 virtual void applyMaskToWindow( OSWindow &rWindow );
00067
00068
00069 virtual void copyToWindow( OSWindow &rWindow, int xSrc,
00070 int ySrc, int width, int height,
00071 int xDest, int yDest );
00072
00073
00074 virtual bool hit( int x, int y ) const;
00075
00076
00077 virtual int getWidth() const { return m_width; }
00078 virtual int getHeight() const { return m_height; }
00079
00080
00081 virtual HDC getDC() const { return m_hDC; }
00082
00083
00084 virtual HRGN getMask() const { return m_mask; }
00085
00086 private:
00087
00088 int m_width, m_height;
00089
00090
00091 HDC m_hDC;
00092
00093
00094 HRGN m_mask;
00095
00096
00097 void addSegmentInRegion( HRGN &rMask, int start, int end, int line );
00098 };
00099
00100
00101 #endif