]> git.saurik.com Git - wxWidgets.git/blame - src/x11/dc.cpp
remove streams tests: they're very basic and already-existing CppUnit stream tests...
[wxWidgets.git] / src / x11 / dc.cpp
CommitLineData
83df96d6 1/////////////////////////////////////////////////////////////////////////////
7520f3da 2// Name: src/x11/dc.cpp
83df96d6
JS
3// Purpose: wxDC class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
7520f3da
WS
12// for compilers that support precompilation, includes "wx.h".
13#include "wx/wxprec.h"
14
83df96d6 15#include "wx/dc.h"
2b77c3fc 16#include "wx/x11/dc.h"
f38924e8
WS
17
18#ifndef WX_PRECOMP
19 #include "wx/dcmemory.h"
20#endif
83df96d6 21
2b77c3fc 22IMPLEMENT_ABSTRACT_CLASS(wxX11DCImpl, wxDCImpl)
83df96d6 23
83df96d6
JS
24//-----------------------------------------------------------------------------
25// wxDC
26//-----------------------------------------------------------------------------
27
2b77c3fc
RR
28wxX11DCImpl::wxX11DCImpl( wxDC *owner ) :
29 wxDCImpl( owner )
83df96d6 30{
7520f3da 31 m_ok = false;
83df96d6 32
3cd0b8c5
RR
33 m_pen = *wxBLACK_PEN;
34 m_font = *wxNORMAL_FONT;
35 m_brush = *wxWHITE_BRUSH;
83df96d6 36
3cd0b8c5 37 m_backgroundMode = wxTRANSPARENT;
83df96d6
JS
38}
39
2b77c3fc 40void wxX11DCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
83df96d6 41{
7520f3da 42 m_clipping = true;
83df96d6
JS
43 m_clipX1 = x;
44 m_clipY1 = y;
45 m_clipX2 = x + width;
46 m_clipY2 = y + height;
47}
48
2b77c3fc 49void wxX11DCImpl::DoGetSizeMM( int* width, int* height ) const
83df96d6
JS
50{
51 int w, h;
2b77c3fc 52 DoGetSize( &w, &h );
83df96d6
JS
53
54 if ( width )
55 *width = int( double(w) / (m_scaleX*m_mm_to_pix_x) );
56 if ( height )
57 *height = int( double(h) / (m_scaleY*m_mm_to_pix_y) );
58}
59
60// Resolution in pixels per logical inch
2b77c3fc 61wxSize wxX11DCImpl::GetPPI() const
83df96d6
JS
62{
63 // TODO (should probably be pure virtual)
64 return wxSize(0, 0);
65}