Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
core
SkCubicClipper.h
Go to the documentation of this file.
1
/*
2
* Copyright 2009 The Android Open Source Project
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
9
#ifndef SkCubicClipper_DEFINED
10
#define SkCubicClipper_DEFINED
11
12
#include "
include/core/SkRect.h
"
13
#include "
include/core/SkScalar.h
"
14
#include "
include/core/SkTypes.h
"
15
16
struct
SkPoint
;
17
18
/** This class is initialized with a clip rectangle, and then can be fed cubics,
19
which must already be monotonic in Y.
20
21
In the future, it might return a series of segments, allowing it to clip
22
also in X, to ensure that all segments fit in a finite coordinate system.
23
*/
24
class
SkCubicClipper
{
25
public
:
26
SkCubicClipper
();
27
28
void
setClip
(
const
SkIRect
&
clip
);
29
30
[[nodiscard]]
bool
clipCubic
(
const
SkPoint
src[4],
SkPoint
dst[4]);
31
32
[[nodiscard]]
static
bool
ChopMonoAtY
(
const
SkPoint
pts[4],
SkScalar
y
,
SkScalar
* t);
33
private
:
34
SkRect
fClip;
35
};
36
37
#endif
// SkCubicClipper_DEFINED
clip
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition
SkPath.cpp:3824
SkRect.h
SkScalar.h
SkTypes.h
SkCubicClipper
Definition
SkCubicClipper.h:24
SkCubicClipper::clipCubic
bool clipCubic(const SkPoint src[4], SkPoint dst[4])
Definition
SkCubicClipper.cpp:109
SkCubicClipper::SkCubicClipper
SkCubicClipper()
Definition
SkCubicClipper.cpp:16
SkCubicClipper::setClip
void setClip(const SkIRect &clip)
Definition
SkCubicClipper.cpp:20
SkCubicClipper::ChopMonoAtY
static bool ChopMonoAtY(const SkPoint pts[4], SkScalar y, SkScalar *t)
Definition
SkCubicClipper.cpp:26
SkScalar
float SkScalar
Definition
extension.cpp:12
y
double y
Definition
mouse-input-test.cc:83
SkIRect
Definition
SkRect.h:32
SkPoint
Definition
SkPoint_impl.h:163
SkRect
Definition
extension.cpp:13
Generated on Fri Apr 26 2024 06:16:42 for Flutter Engine by
1.9.8