18CGFloat PrimaryDisplayHeight() {
19 return NSMaxY([[[NSScreen screens] firstObject] frame]);
25 return NSMakeRect(rect.
x(), PrimaryDisplayHeight() - rect.
y() - rect.
height(), rect.
width(),
30 return Rect(rect.origin.x, PrimaryDisplayHeight() - rect.origin.y - rect.size.height,
31 rect.size.width, rect.size.height);
35 return NSMakePoint(point.
x(), PrimaryDisplayHeight() - point.
y());
39 return Point(point.x, PrimaryDisplayHeight() - point.y);
constexpr int height() const
constexpr int width() const
GFX_EXPORT NSRect ScreenRectToNSRect(const Rect &rect)
GFX_EXPORT Point ScreenPointFromNSPoint(const NSPoint &point)
GFX_EXPORT Rect ScreenRectFromNSRect(const NSRect &point)
GFX_EXPORT NSPoint ScreenPointToNSPoint(const Point &point)