revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / mesa / src / gallium / state_trackers / vega / stroker.h
blob36543cd923729f5bb5e78f41f92e242d81068a45
1 /**************************************************************************
3 * Copyright 2009 VMware, Inc. All Rights Reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sub license, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial portions
15 * of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 **************************************************************************/
27 #ifndef STROKER_H
28 #define STROKER_H
30 #include "VG/openvg.h"
31 #include "api_consts.h"
33 struct path;
34 struct vg_state;
35 struct array;
37 struct stroker {
38 void (*begin)(struct stroker *stroker);
39 void (*process_subpath)(struct stroker *stroker);
40 void (*end)(struct stroker *stroker);
42 struct array *segments;
43 struct array *control_points;
44 struct path *path;
46 VGfloat back1_x, back1_y;
47 VGfloat back2_x, back2_y;
49 VGfloat stroke_width;
50 VGfloat miter_limit;
51 VGCapStyle cap_style;
52 VGJoinStyle join_style;
54 VGPathCommand last_cmd;
57 struct dash_stroker {
58 struct stroker base;
60 struct stroker stroker;
62 VGfloat dash_pattern[VEGA_MAX_DASH_COUNT];
63 VGint dash_pattern_num;
64 VGfloat dash_phase;
65 VGboolean dash_phase_reset;
68 void stroker_init(struct stroker *stroker,
69 struct vg_state *state);
70 void dash_stroker_init(struct stroker *stroker,
71 struct vg_state *state);
72 void dash_stroker_cleanup(struct dash_stroker *stroker);
73 void stroker_cleanup(struct stroker *stroker);
75 void stroker_begin(struct stroker *stroker);
76 void stroker_move_to(struct stroker *stroker, VGfloat x, VGfloat y);
77 void stroker_line_to(struct stroker *stroker, VGfloat x, VGfloat y);
78 void stroker_curve_to(struct stroker *stroker, VGfloat px1, VGfloat py1,
79 VGfloat px2, VGfloat py2,
80 VGfloat x, VGfloat y);
81 void stroker_end(struct stroker *stroker);
83 void stroker_emit_move_to(struct stroker *stroker, VGfloat x, VGfloat y);
84 void stroker_emit_line_to(struct stroker *stroker, VGfloat x, VGfloat y);
85 void stroker_emit_curve_to(struct stroker *stroker, VGfloat px1, VGfloat py1,
86 VGfloat px2, VGfloat py2,
87 VGfloat x, VGfloat y);
89 #endif