| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2013 Xidorn Quan (quanxunzhen@gmail.com) | 4 * Copyright (C) 2013 Xidorn Quan (quanxunzhen@gmail.com) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "config.h" | 28 #include "config.h" |
| 29 #include "platform/geometry/RoundedRect.h" | 29 #include "platform/geometry/RoundedRect.h" |
| 30 | 30 |
| 31 #include "wtf/Assertions.h" | 31 #include "wtf/Assertions.h" |
| 32 #include <algorithm> | 32 #include <algorithm> |
| 33 | 33 |
| 34 using namespace std; | 34 using namespace std; |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace blink { |
| 37 | 37 |
| 38 bool RoundedRect::Radii::isZero() const | 38 bool RoundedRect::Radii::isZero() const |
| 39 { | 39 { |
| 40 return m_topLeft.isZero() && m_topRight.isZero() && m_bottomLeft.isZero() &&
m_bottomRight.isZero(); | 40 return m_topLeft.isZero() && m_topRight.isZero() && m_bottomLeft.isZero() &&
m_bottomRight.isZero(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void RoundedRect::Radii::scale(float factor) | 43 void RoundedRect::Radii::scale(float factor) |
| 44 { | 44 { |
| 45 if (factor == 1) | 45 if (factor == 1) |
| 46 return; | 46 return; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 FloatPoint center(m_rect.maxX() - bottomRight.width(), m_rect.maxY()
- bottomRight.height()); | 239 FloatPoint center(m_rect.maxX() - bottomRight.width(), m_rect.maxY()
- bottomRight.height()); |
| 240 FloatSize size(bottomRight.width(), bottomRight.height()); | 240 FloatSize size(bottomRight.width(), bottomRight.height()); |
| 241 if (!quad.intersectsEllipse(center, size)) | 241 if (!quad.intersectsEllipse(center, size)) |
| 242 return false; | 242 return false; |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 return true; | 246 return true; |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace WebCore | 249 } // namespace blink |
| OLD | NEW |