Implement wxWindowDC::Clear()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -26,6 +26,9 @@ public:
|
|||||||
// Create a DC corresponding to a window
|
// Create a DC corresponding to a window
|
||||||
wxWindowDC(wxWindow *win);
|
wxWindowDC(wxWindow *win);
|
||||||
~wxWindowDC(void);
|
~wxWindowDC(void);
|
||||||
|
|
||||||
|
// NSView specific functions
|
||||||
|
virtual void Clear();
|
||||||
protected:
|
protected:
|
||||||
wxWindow *m_window;
|
wxWindow *m_window;
|
||||||
};
|
};
|
||||||
|
@@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
#import <AppKit/NSView.h>
|
#import <AppKit/NSView.h>
|
||||||
#import <AppKit/NSAffineTransform.h>
|
#import <AppKit/NSAffineTransform.h>
|
||||||
|
#import <AppKit/NSColor.h>
|
||||||
|
#import <AppKit/NSGraphicsContext.h>
|
||||||
|
#import <AppKit/NSBezierPath.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxWindowDC
|
* wxWindowDC
|
||||||
@@ -35,6 +38,19 @@ wxWindowDC::~wxWindowDC(void)
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void wxWindowDC::Clear()
|
||||||
|
{
|
||||||
|
wxASSERT(m_window);
|
||||||
|
|
||||||
|
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||||
|
[context saveGraphicsState];
|
||||||
|
|
||||||
|
[m_backgroundBrush.GetNSColor() set];
|
||||||
|
[NSBezierPath fillRect:[m_window->GetNSView() bounds]];
|
||||||
|
|
||||||
|
[context restoreGraphicsState];
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxClientDC
|
* wxClientDC
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user