Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
ganesh
GrDistanceFieldGenFromVector.h
Go to the documentation of this file.
1
/*
2
* Copyright 2017 ARM Ltd.
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
#ifndef GrDistanceFieldGenFromVector_DEFINED
9
#define GrDistanceFieldGenFromVector_DEFINED
10
11
#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
12
13
#include "
include/core/SkPath.h
"
14
15
class
SkMatrix
;
16
17
/** Given a vector path, generate the associated distance field.
18
19
* @param distanceField The distance field to be generated. Should already be allocated
20
* by the client with the padding defined in "SkDistanceFieldGen.h".
21
* @param path The path we're using to generate the distance field.
22
* @param matrix Transformation matrix for path.
23
* @param width Width of the distance field.
24
* @param height Height of the distance field.
25
* @param rowBytes Size of each row in the distance field, in bytes.
26
*/
27
bool
GrGenerateDistanceFieldFromPath
(
unsigned
char
* distanceField,
28
const
SkPath
& path,
const
SkMatrix
& viewMatrix,
29
int
width
,
int
height
,
size_t
rowBytes);
30
31
inline
bool
IsDistanceFieldSupportedFillType
(
SkPathFillType
fFillType)
32
{
33
return
(
SkPathFillType::kEvenOdd
== fFillType ||
34
SkPathFillType::kInverseEvenOdd
== fFillType);
35
}
36
37
#endif
// SK_ENABLE_OPTIMIZE_SIZE
38
39
#endif
// GrDistanceFieldGenFromVector_DEFINED
GrGenerateDistanceFieldFromPath
bool GrGenerateDistanceFieldFromPath(unsigned char *distanceField, const SkPath &path, const SkMatrix &viewMatrix, int width, int height, size_t rowBytes)
Definition
GrDistanceFieldGenFromVector.cpp:721
IsDistanceFieldSupportedFillType
bool IsDistanceFieldSupportedFillType(SkPathFillType fFillType)
Definition
GrDistanceFieldGenFromVector.h:31
SkPathFillType
SkPathFillType
Definition
SkPathTypes.h:11
SkPathFillType::kInverseEvenOdd
@ kInverseEvenOdd
SkPathFillType::kEvenOdd
@ kEvenOdd
SkPath.h
SkMatrix
Definition
SkMatrix.h:54
SkPath
Definition
SkPath.h:59
height
int32_t height
Definition
serialization_callbacks.cc:1
width
int32_t width
Definition
serialization_callbacks.cc:0
Generated on Fri Apr 26 2024 06:17:03 for Flutter Engine by
1.9.8