| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef StyleRay_h |
| 6 #define StyleRay_h |
| 7 |
| 8 #include "core/style/BasicShapes.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class CSSRayValue; |
| 13 |
| 14 class StyleRay : public BasicShape { |
| 15 public: |
| 16 enum class RaySize { |
| 17 kClosestSide, |
| 18 kClosestCorner, |
| 19 kFarthestSide, |
| 20 kFarthestCorner, |
| 21 kSides |
| 22 }; |
| 23 |
| 24 static PassRefPtr<StyleRay> Create(const CSSRayValue&); |
| 25 virtual ~StyleRay() {} |
| 26 |
| 27 float Angle() const { return angle_; } |
| 28 RaySize Size() const { return size_; } |
| 29 bool Contain() const { return contain_; } |
| 30 |
| 31 CSSRayValue* ComputedCSSValue() const; |
| 32 |
| 33 void GetPath(Path&, const FloatRect&) override; |
| 34 PassRefPtr<BasicShape> Blend(const BasicShape*, double) const override; |
| 35 bool operator==(const BasicShape&) const override; |
| 36 |
| 37 ShapeType GetType() const override { return kStyleRayType; } |
| 38 |
| 39 private: |
| 40 StyleRay(const CSSRayValue&); |
| 41 |
| 42 float angle_; |
| 43 RaySize size_; |
| 44 bool contain_; |
| 45 }; |
| 46 |
| 47 DEFINE_BASICSHAPE_TYPE_CASTS(StyleRay); |
| 48 |
| 49 } // namespace blink |
| 50 |
| 51 #endif |
| OLD | NEW |