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:
parent
7bc429ef0a
commit
9d180f3ad0
@ -26,6 +26,9 @@ public:
|
||||
// Create a DC corresponding to a window
|
||||
wxWindowDC(wxWindow *win);
|
||||
~wxWindowDC(void);
|
||||
|
||||
// NSView specific functions
|
||||
virtual void Clear();
|
||||
protected:
|
||||
wxWindow *m_window;
|
||||
};
|
||||
|
@ -14,6 +14,9 @@
|
||||
|
||||
#import <AppKit/NSView.h>
|
||||
#import <AppKit/NSAffineTransform.h>
|
||||
#import <AppKit/NSColor.h>
|
||||
#import <AppKit/NSGraphicsContext.h>
|
||||
#import <AppKit/NSBezierPath.h>
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user