| 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
5 #include "impeller/toolkit/interop/path.h"
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
17 ImpellerRect Path::GetBounds() const {
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
impeller::interop::Path::GetPath
const SkPath & GetPath() const
Definition: path.cc:13
impeller::interop::Path::GetBounds
ImpellerRect GetBounds() const
Definition: path.cc:17
impeller::interop::Path::Path
Path(const SkPath &path)
Definition: path.cc:9
impeller::interop::Path::~Path
~Path()
impeller::interop
Definition: context_gles.cc:12
path.h
ImpellerRect
Definition: impeller.h:502
ImpellerRect::x
float x
Definition: impeller.h:503