Bug 1866777 - Disable test_race_cache_with_network.js on windows opt for frequent...
[gecko.git] / gfx / src / AAStroke.h
blob685cf60647488ba7885803c0c2d7b9df78a31a9e
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef MOZILLA_GFX_AA_STROKE_H
8 #define MOZILLA_GFX_AA_STROKE_H
10 #include <stddef.h>
12 namespace AAStroke {
14 enum class LineCap { Round, Square, Butt };
15 enum class LineJoin { Round, Miter, Bevel };
16 struct StrokeStyle {
17 float width;
18 LineCap cap;
19 LineJoin join;
20 float miter_limit;
22 struct Stroker;
23 struct OutputVertex {
24 float x;
25 float y;
26 float coverage;
28 struct VertexBuffer {
29 OutputVertex* data;
30 size_t len;
33 extern "C" {
34 Stroker* aa_stroke_new(const StrokeStyle* style,
35 OutputVertex* output_ptr = nullptr,
36 size_t output_capacity = 0);
37 void aa_stroke_move_to(Stroker* s, float x, float y, bool closed);
38 void aa_stroke_line_to(Stroker* s, float x, float y, bool end);
39 void aa_stroke_curve_to(Stroker* s, float c1x, float c1y, float c2x, float c2y,
40 float x, float y, bool end);
41 void aa_stroke_close(Stroker* s);
42 VertexBuffer aa_stroke_finish(Stroker* s);
43 void aa_stroke_vertex_buffer_release(VertexBuffer vb);
44 void aa_stroke_release(Stroker* s);
47 } // namespace AAStroke
49 #endif // MOZILLA_GFX_AA_STROKE_H