| Flutter Impeller |

tessellator.h
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 #ifndef FLUTTER_IMPELLER_TESSELLATOR_C_TESSELLATOR_H_
6 #define FLUTTER_IMPELLER_TESSELLATOR_C_TESSELLATOR_H_
7
8 #include <cstdint>
9
10 #include "flutter/display_list/geometry/dl_path_builder.h"
11
12 #ifdef _WIN32
13 #define IMPELLER_API __declspec(dllexport)
14 #else
15 #define IMPELLER_API __attribute__((visibility("default")))
16 #endif
17
18 extern "C" {
19
20 namespace impeller {
21
22 using PathBuilder = flutter::DlPathBuilder;
23
24 struct IMPELLER_API Vertices {
25 float* points;
26 uint32_t length;
27 };
28
29 IMPELLER_API PathBuilder* CreatePathBuilder();
30
31 IMPELLER_API void DestroyPathBuilder(PathBuilder* builder);
32
33 IMPELLER_API void MoveTo(PathBuilder* builder, Scalar x, Scalar y);
34
35 IMPELLER_API void LineTo(PathBuilder* builder, Scalar x, Scalar y);
36
37 IMPELLER_API void CubicTo(PathBuilder* builder,
38 Scalar x1,
39 Scalar y1,
40 Scalar x2,
41 Scalar y2,
42 Scalar x3,
43 Scalar y3);
44
45 IMPELLER_API void Close(PathBuilder* builder);
46
47 IMPELLER_API struct Vertices* Tessellate(PathBuilder* builder,
48 int fill_type,
49 Scalar tolerance);
50
51 IMPELLER_API void DestroyVertices(Vertices* vertices);
52
53 } // namespace impeller
54 }
55
56 #endif // FLUTTER_IMPELLER_TESSELLATOR_C_TESSELLATOR_H_
IMPELLER_API
#define IMPELLER_API
Definition: tessellator.h:15
x
int32_t x
Definition: dl_golden_unittests.cc:458
impeller
Definition: allocation.cc:12
impeller::Scalar
float Scalar
Definition: scalar.h:19
impeller::Tessellate
struct Vertices * Tessellate(PathBuilder *builder, int fill_type, Scalar tolerance)
Definition: tessellator.cc:42
impeller::CreatePathBuilder
PathBuilder * CreatePathBuilder()
Definition: tessellator.cc:12
impeller::DestroyPathBuilder
void DestroyPathBuilder(PathBuilder *builder)
Definition: tessellator.cc:16
impeller::PathBuilder
flutter::DlPathBuilder PathBuilder
Definition: tessellator.h:22
impeller::DestroyVertices
void DestroyVertices(Vertices *vertices)
Definition: tessellator.cc:77
impeller::MoveTo
void MoveTo(PathBuilder *builder, Scalar x, Scalar y)
Definition: tessellator.cc:20
impeller::LineTo
void LineTo(PathBuilder *builder, Scalar x, Scalar y)
Definition: tessellator.cc:24
impeller::CubicTo
void CubicTo(PathBuilder *builder, Scalar x1, Scalar y1, Scalar x2, Scalar y2, Scalar x3, Scalar y3)
Definition: tessellator.cc:28
impeller::Close
void Close(PathBuilder *builder)
Definition: tessellator.cc:38
impeller::Vertices
Definition: tessellator.h:24
impeller::Vertices::length
uint32_t length
Definition: tessellator.h:26
impeller::Vertices::points
float * points
Definition: tessellator.h:25