Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: third_party/WebKit/Source/core/style/StyleRay.h

Issue 2881673003: CSS Motion Path: Support parsing of ray(<angle>) paths (Closed)
Patch Set: size contain? Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698