forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtessellator.h
More file actions
52 lines (36 loc) · 1.33 KB
/
tessellator.h
File metadata and controls
52 lines (36 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <cstdint>
#include "impeller/geometry/path_builder.h"
#include "impeller/tessellator/tessellator.h"
#ifdef _WIN32
#define IMPELLER_API __declspec(dllexport)
#else
#define IMPELLER_API __attribute__((visibility("default")))
#endif
extern "C" {
namespace impeller {
struct IMPELLER_API Vertices {
float* points;
uint32_t length;
};
IMPELLER_API PathBuilder* CreatePathBuilder();
IMPELLER_API void DestroyPathBuilder(PathBuilder* builder);
IMPELLER_API void MoveTo(PathBuilder* builder, Scalar x, Scalar y);
IMPELLER_API void LineTo(PathBuilder* builder, Scalar x, Scalar y);
IMPELLER_API void CubicTo(PathBuilder* builder,
Scalar x1,
Scalar y1,
Scalar x2,
Scalar y2,
Scalar x3,
Scalar y3);
IMPELLER_API void Close(PathBuilder* builder);
IMPELLER_API struct Vertices* Tessellate(PathBuilder* builder,
int fill_type,
Scalar tolerance);
IMPELLER_API void DestroyVertices(Vertices* vertices);
} // namespace impeller
}