summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7bc429e)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21802
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Create a DC corresponding to a window
wxWindowDC(wxWindow *win);
~wxWindowDC(void);
// Create a DC corresponding to a window
wxWindowDC(wxWindow *win);
~wxWindowDC(void);
+
+ // NSView specific functions
+ virtual void Clear();
protected:
wxWindow *m_window;
};
protected:
wxWindow *m_window;
};
#import <AppKit/NSView.h>
#import <AppKit/NSAffineTransform.h>
#import <AppKit/NSView.h>
#import <AppKit/NSAffineTransform.h>
+#import <AppKit/NSColor.h>
+#import <AppKit/NSGraphicsContext.h>
+#import <AppKit/NSBezierPath.h>
+void wxWindowDC::Clear()
+{
+ wxASSERT(m_window);
+
+ NSGraphicsContext *context = [NSGraphicsContext currentContext];
+ [context saveGraphicsState];
+
+ [m_backgroundBrush.GetNSColor() set];
+ [NSBezierPath fillRect:[m_window->GetNSView() bounds]];
+
+ [context restoreGraphicsState];
+}
+