| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 | 32 |
| 33 #include "plugin/mac/graphics_utils_mac.h" | 33 #include "plugin/mac/graphics_utils_mac.h" |
| 34 | 34 |
| 35 namespace o3d { |
| 36 |
| 35 // Slide a window to a different rect, asynchronously, over a period of time. | 37 // Slide a window to a different rect, asynchronously, over a period of time. |
| 36 void SlideWindowToRect(WindowRef the_window, | 38 void SlideWindowToRect(WindowRef the_window, |
| 37 CGRect destination_rect, | 39 CGRect destination_rect, |
| 38 double transition_duration_seconds) { | 40 double transition_duration_seconds) { |
| 39 TransitionWindowOptions options = {0, transition_duration_seconds, | 41 TransitionWindowOptions options = {0, transition_duration_seconds, |
| 40 NULL, NULL}; | 42 NULL, NULL}; |
| 41 TransitionWindowWithOptions(the_window, | 43 TransitionWindowWithOptions(the_window, |
| 42 kWindowSlideTransitionEffect, | 44 kWindowSlideTransitionEffect, |
| 43 kWindowMoveTransitionAction, | 45 kWindowMoveTransitionAction, |
| 44 &destination_rect, true, &options); | 46 &destination_rect, true, &options); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 CGContextAddArcToPoint(context, rx, by, rx, cy, radius); | 123 CGContextAddArcToPoint(context, rx, by, rx, cy, radius); |
| 122 CGContextAddArcToPoint(context, rx, ty, cx, ty, radius); | 124 CGContextAddArcToPoint(context, rx, ty, cx, ty, radius); |
| 123 CGContextAddArcToPoint(context, lx, ty, lx, cy, radius); | 125 CGContextAddArcToPoint(context, lx, ty, lx, cy, radius); |
| 124 CGContextClosePath(context); | 126 CGContextClosePath(context); |
| 125 | 127 |
| 126 if (fill) | 128 if (fill) |
| 127 CGContextFillPath(context); | 129 CGContextFillPath(context); |
| 128 else | 130 else |
| 129 CGContextStrokePath(context); | 131 CGContextStrokePath(context); |
| 130 } | 132 } |
| 133 |
| 134 } // namespace o3d |
| OLD | NEW |