| 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 StyleRay : public BasicShape { |
| 13 public: |
| 14 enum class RaySize { |
| 15 kClosestSide, |
| 16 kClosestCorner, |
| 17 kFarthestSide, |
| 18 kFarthestCorner, |
| 19 kSides |
| 20 }; |
| 21 |
| 22 static PassRefPtr<StyleRay> Create(float angle, RaySize, bool contain); |
| 23 virtual ~StyleRay() {} |
| 24 |
| 25 float Angle() const { return angle_; } |
| 26 RaySize Size() const { return size_; } |
| 27 bool Contain() const { return contain_; } |
| 28 |
| 29 void GetPath(Path&, const FloatRect&) override; |
| 30 PassRefPtr<BasicShape> Blend(const BasicShape*, double) const override; |
| 31 bool operator==(const BasicShape&) const override; |
| 32 |
| 33 ShapeType GetType() const override { return kStyleRayType; } |
| 34 |
| 35 private: |
| 36 StyleRay(float angle, RaySize, bool contain); |
| 37 |
| 38 float angle_; |
| 39 RaySize size_; |
| 40 bool contain_; |
| 41 }; |
| 42 |
| 43 DEFINE_BASICSHAPE_TYPE_CASTS(StyleRay); |
| 44 |
| 45 } // namespace blink |
| 46 |
| 47 #endif |
| OLD | NEW |