OLD | NEW |
1 /* | 1 /* |
2 * Cocoa's event loop must be in main thread. | 2 * Cocoa's event loop must be in main thread. |
3 * | 3 * |
4 * Unless otherwise stated, all coordinate systems | 4 * Unless otherwise stated, all coordinate systems |
5 * are bottom-left-based. | 5 * are bottom-left-based. |
6 */ | 6 */ |
7 | 7 |
8 #define Cursor OSXCursor | 8 #define Cursor OSXCursor |
9 #define Point OSXPoint | 9 #define Point OSXPoint |
10 #define Rect OSXRect | 10 #define Rect OSXRect |
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 | 1401 |
1402 static NSSize | 1402 static NSSize |
1403 winsizepoints() | 1403 winsizepoints() |
1404 { | 1404 { |
1405 return [win.content bounds].size; | 1405 return [win.content bounds].size; |
1406 } | 1406 } |
1407 | 1407 |
1408 static NSSize | 1408 static NSSize |
1409 winsizepixels() | 1409 winsizepixels() |
1410 { | 1410 { |
1411 #if DOSX_VERSION >= 100700 | 1411 #if OSX_VERSION >= 100700 |
1412 if (OSX_VERSION >= 100700 && devdrawretina) | 1412 if (OSX_VERSION >= 100700 && devdrawretina) |
1413 return [win.content convertSizeToBacking: winsizepoints()]; | 1413 return [win.content convertSizeToBacking: winsizepoints()]; |
1414 else | 1414 else |
1415 #endif | 1415 #endif |
1416 return winsizepoints(); | 1416 return winsizepoints(); |
1417 } | 1417 } |
1418 | 1418 |
1419 static NSRect | 1419 static NSRect |
1420 scalerect(NSRect r, CGFloat scale) | 1420 scalerect(NSRect r, CGFloat scale) |
1421 { | 1421 { |
(...skipping 20 matching lines...) Expand all Loading... |
1442 return r; | 1442 return r; |
1443 } | 1443 } |
1444 | 1444 |
1445 static NSPoint | 1445 static NSPoint |
1446 scalepoint(NSPoint pt, CGFloat scale) | 1446 scalepoint(NSPoint pt, CGFloat scale) |
1447 { | 1447 { |
1448 pt.x *= scale; | 1448 pt.x *= scale; |
1449 pt.y *= scale; | 1449 pt.y *= scale; |
1450 return pt; | 1450 return pt; |
1451 } | 1451 } |
OLD | NEW |