Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: Source/core/platform/graphics/FloatPoint.h

Issue 14107015: Rename OS(DARWIN) to OS(MACOSX). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2005 Nokia. All rights reserved. 3 * Copyright (C) 2005 Nokia. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 #ifndef FloatPoint_h 27 #ifndef FloatPoint_h
28 #define FloatPoint_h 28 #define FloatPoint_h
29 29
30 #include "core/platform/graphics/FloatSize.h" 30 #include "core/platform/graphics/FloatSize.h"
31 #include "core/platform/graphics/IntPoint.h" 31 #include "core/platform/graphics/IntPoint.h"
32 #include "wtf/MathExtras.h" 32 #include "wtf/MathExtras.h"
33 #include <algorithm> 33 #include <algorithm>
34 34
35 #if OS(DARWIN) 35 #if OS(MACOSX)
36 typedef struct CGPoint CGPoint; 36 typedef struct CGPoint CGPoint;
37 37
38 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES 38 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
39 typedef struct CGPoint NSPoint; 39 typedef struct CGPoint NSPoint;
40 #else 40 #else
41 typedef struct _NSPoint NSPoint; 41 typedef struct _NSPoint NSPoint;
42 #endif 42 #endif
43 #endif 43 #endif
44 44
45 struct SkPoint; 45 struct SkPoint;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 FloatPoint expandedTo(const FloatPoint& other) const 125 FloatPoint expandedTo(const FloatPoint& other) const
126 { 126 {
127 return FloatPoint(std::max(m_x, other.m_x), std::max(m_y, other.m_y)); 127 return FloatPoint(std::max(m_x, other.m_x), std::max(m_y, other.m_y));
128 } 128 }
129 129
130 FloatPoint transposedPoint() const 130 FloatPoint transposedPoint() const
131 { 131 {
132 return FloatPoint(m_y, m_x); 132 return FloatPoint(m_y, m_x);
133 } 133 }
134 134
135 #if OS(DARWIN) 135 #if OS(MACOSX)
136 FloatPoint(const CGPoint&); 136 FloatPoint(const CGPoint&);
137 operator CGPoint() const; 137 operator CGPoint() const;
138 #if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) 138 #if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
139 FloatPoint(const NSPoint&); 139 FloatPoint(const NSPoint&);
140 operator NSPoint() const; 140 operator NSPoint() const;
141 #endif 141 #endif
142 #endif 142 #endif
143 143
144 operator SkPoint() const; 144 operator SkPoint() const;
145 145
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 float findSlope(const FloatPoint& p1, const FloatPoint& p2, float& c); 238 float findSlope(const FloatPoint& p1, const FloatPoint& p2, float& c);
239 239
240 // Find point where lines through the two pairs of points intersect. Returns fal se if the lines don't intersect. 240 // Find point where lines through the two pairs of points intersect. Returns fal se if the lines don't intersect.
241 bool findIntersection(const FloatPoint& p1, const FloatPoint& p2, const FloatPoi nt& d1, const FloatPoint& d2, FloatPoint& intersection); 241 bool findIntersection(const FloatPoint& p1, const FloatPoint& p2, const FloatPoi nt& d1, const FloatPoint& d2, FloatPoint& intersection);
242 242
243 } 243 }
244 244
245 #endif 245 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/chromium/PlatformKeyboardEventChromium.cpp ('k') | Source/core/platform/graphics/FloatRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698