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

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: DCHECK_EQ 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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698