wxOSX: Implement function to retrieve pattern image for non-solid colour

Under wxOSX non-solid wxColour with NSColor backend is represented by
pattern image and it would be useful to have ability to get it e.g. to help
dealing with non-solid wxColours by frameworks not supporting such colours,
like e.g. Cairo.
This commit is contained in:
Artur Wieczorek
2019-12-06 20:33:35 +01:00
parent 994971e2df
commit 389944a116
3 changed files with 30 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ public:
// This ctor does not take ownership of the color.
explicit wxColour(WX_NSColor color);
WX_NSColor OSXGetNSColor() const;
WX_NSImage OSXGetNSPatternImage() const;
#endif
protected :
@@ -102,6 +103,7 @@ public:
#if wxOSX_USE_COCOA
virtual WX_NSColor GetNSColor() const;
virtual WX_NSImage GetNSPatternImage() const;
#endif
};