Flutter Engine
The Flutter Engine
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
15class 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 */
27bool GrGenerateDistanceFieldFromPath(unsigned char* distanceField,
28 const SkPath& path, const SkMatrix& viewMatrix,
29 int width, int height, size_t rowBytes);
30
32{
33 return (SkPathFillType::kEvenOdd == fFillType ||
35}
36
37#endif // SK_ENABLE_OPTIMIZE_SIZE
38
39#endif // GrDistanceFieldGenFromVector_DEFINED
bool GrGenerateDistanceFieldFromPath(unsigned char *distanceField, const SkPath &path, const SkMatrix &viewMatrix, int width, int height, size_t rowBytes)
bool IsDistanceFieldSupportedFillType(SkPathFillType fFillType)
SkPathFillType
Definition: SkPathTypes.h:11
Definition: SkPath.h:59
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
int32_t height
int32_t width