1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2003 VideoLAN (Centrale Réseaux) and its contributors
7 * Authors: Cyril Deguet <asmax@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #ifndef MACOSX_GRAPHICS_HPP
25 #define MACOSX_GRAPHICS_HPP
27 #include "../src/os_graphics.hpp"
32 /// MacOSX implementation of OSGraphics
33 class MacOSXGraphics: public OSGraphics
36 MacOSXGraphics( intf_thread_t *pIntf, int width, int height);
38 virtual ~MacOSXGraphics();
40 /// Clear the graphics
43 /// Draw another graphics on this one
44 virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
45 int ySrc = 0, int xDest = 0, int yDest = 0,
46 int width = -1, int height = -1 );
48 /// Render a bitmap on this graphics
49 virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
50 int ySrc = 0, int xDest = 0, int yDest = 0,
51 int width = -1, int height = -1 );
53 /// Draw a filled rectangle on the grahics (color is #RRGGBB)
54 virtual void fillRect( int left, int top, int width, int height,
57 /// Draw an empty rectangle on the grahics (color is #RRGGBB)
58 virtual void drawRect( int left, int top, int width, int height,
61 /// Set the shape of a window with the mask of this graphics.
62 virtual void applyMaskToWindow( OSWindow &rWindow );
64 /// Copy the graphics on a window
65 virtual void copyToWindow( OSWindow &rWindow, int xSrc,
66 int ySrc, int width, int height,
67 int xDest, int yDest );
69 /// Tell whether the pixel at the given position is visible
70 virtual bool hit( int x, int y ) const;
73 virtual int getWidth() const { return m_width; }
74 virtual int getHeight() const { return m_height; }
78 int m_width, m_height;