| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. | 2 * Copyright (C) 2012 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 | 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 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 explicit LayoutSVGEllipse(SVGGeometryElement*); | 36 explicit LayoutSVGEllipse(SVGGeometryElement*); |
| 37 ~LayoutSVGEllipse() override; | 37 ~LayoutSVGEllipse() override; |
| 38 | 38 |
| 39 ShapeGeometryCodePath geometryCodePath() const override { | 39 ShapeGeometryCodePath geometryCodePath() const override { |
| 40 return m_usePathFallback ? PathGeometry : EllipseGeometryFastPath; | 40 return m_usePathFallback ? PathGeometry : EllipseGeometryFastPath; |
| 41 } | 41 } |
| 42 | 42 |
| 43 const char* name() const override { return "LayoutSVGEllipse"; } | 43 const char* name() const override { return "LayoutSVGEllipse"; } |
| 44 | 44 |
| 45 char objectSize() const override { return sizeof(this); } |
| 46 |
| 45 private: | 47 private: |
| 46 void updateShapeFromElement() override; | 48 void updateShapeFromElement() override; |
| 47 bool isShapeEmpty() const override { | 49 bool isShapeEmpty() const override { |
| 48 return m_usePathFallback ? LayoutSVGShape::isShapeEmpty() | 50 return m_usePathFallback ? LayoutSVGShape::isShapeEmpty() |
| 49 : m_fillBoundingBox.isEmpty(); | 51 : m_fillBoundingBox.isEmpty(); |
| 50 } | 52 } |
| 51 bool shapeDependentStrokeContains(const FloatPoint&) override; | 53 bool shapeDependentStrokeContains(const FloatPoint&) override; |
| 52 bool shapeDependentFillContains(const FloatPoint&, | 54 bool shapeDependentFillContains(const FloatPoint&, |
| 53 const WindRule) const override; | 55 const WindRule) const override; |
| 54 void calculateRadiiAndCenter(); | 56 void calculateRadiiAndCenter(); |
| 55 bool hasContinuousStroke() const; | 57 bool hasContinuousStroke() const; |
| 56 | 58 |
| 57 private: | 59 private: |
| 58 FloatPoint m_center; | 60 FloatPoint m_center; |
| 59 FloatSize m_radii; | 61 FloatSize m_radii; |
| 60 bool m_usePathFallback; | 62 bool m_usePathFallback; |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 } // namespace blink | 65 } // namespace blink |
| 64 | 66 |
| 65 #endif | 67 #endif |
| OLD | NEW |