Flutter Engine
Loading...
Searching...
No Matches
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
#include "third_party/skia/include/core/SkRect.h"
8
9
namespace
impeller::interop
{
10
11
Path::Path
(
const
SkPath& path) : path_(SkPathBuilder(path)) {}
12
13
Path::~Path
() =
default
;
14
15
SkPath
Path::GetPath
()
const
{
16
return
path_.snapshot();
17
}
18
19
ImpellerRect
Path::GetBounds
()
const
{
20
const
auto
bounds = path_.computeFiniteBounds().value_or(SkRect());
21
return
ImpellerRect
{
22
.
x
= bounds.x(),
23
.y = bounds.y(),
24
.width = bounds.width(),
25
.height = bounds.height(),
26
};
27
}
28
29
}
// namespace impeller::interop
impeller::interop::Path::GetBounds
ImpellerRect GetBounds() const
Definition
path.cc:19
impeller::interop::Path::GetPath
SkPath GetPath() const
Definition
path.cc:15
impeller::interop::Path::Path
Path(const SkPath &path)
Definition
path.cc:11
impeller::interop::Path::~Path
~Path()
path.h
impeller::interop
Definition
context_gles.cc:12
ImpellerRect
Definition
impeller.h:502
ImpellerRect::x
float x
Definition
impeller.h:503
impeller
toolkit
interop
path.cc
Generated on Thu Nov 6 2025 16:11:24 for Flutter Engine by
1.9.8