Flutter Impeller
path.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter 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 
6 
7 namespace impeller::interop {
8 
9 Path::Path(const SkPath& path) : path_(path) {}
10 
11 Path::~Path() = default;
12 
13 const SkPath& Path::GetPath() const {
14  return path_;
15 }
16 
18  const auto bounds = path_.getBounds();
19  return ImpellerRect{
20  .x = bounds.x(),
21  .y = bounds.y(),
22  .width = bounds.width(),
23  .height = bounds.height(),
24  };
25 }
26 
27 } // namespace impeller::interop
const SkPath & GetPath() const
Definition: path.cc:13
ImpellerRect GetBounds() const
Definition: path.cc:17
Path(const SkPath &path)
Definition: path.cc:9