Flutter Engine
The Flutter Engine
coordinate_conversion.h
Go to the documentation of this file.
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef ACCESSIBILITY_GFX_MAC_COORDINATE_CONVERSION_H_
6#define ACCESSIBILITY_GFX_MAC_COORDINATE_CONVERSION_H_
7
8#import <Foundation/Foundation.h>
9
10#include "gfx/gfx_export.h"
11
12namespace gfx {
13
14class Point;
15class Rect;
16
17// Convert a gfx::Rect specified with the origin at the top left of the primary
18// display into AppKit secreen coordinates (origin at the bottom left).
20// Convert an AppKit NSRect with origin in the bottom left of the primary
21// display into a gfx::Rect with origin at the top left of the primary display.
22GFX_EXPORT Rect ScreenRectFromNSRect(const NSRect& point);
23// Convert a gfx::Point specified with the origin at the top left of the primary
24// display into AppKit screen coordinates (origin at the bottom left).
25GFX_EXPORT NSPoint ScreenPointToNSPoint(const Point& point);
26// Convert an AppKit NSPoint with origin in the bottom left of the primary
27// display into a gfx::Point with origin at the top left of the primary display.
28GFX_EXPORT Point ScreenPointFromNSPoint(const NSPoint& point);
29
30} // namespace gfx
31
32#endif // ACCESSIBILITY_GFX_MAC_COORDINATE_CONVERSION_H_
#define GFX_EXPORT
Definition: gfx_export.h:26
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
Definition: insets.cc:10
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)
TRect< Scalar > Rect
Definition: rect.h:769
TPoint< Scalar > Point
Definition: point.h:322