revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / mesa / src / gallium / state_trackers / vega / paint.h
blobe5357763b8936199e9e6c71616c75ea5c6b30352
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 PAINT_H
28 #define PAINT_H
30 #include "vg_context.h"
32 #include "VG/openvg.h"
33 #include "pipe/p_state.h"
35 struct vg_paint;
36 struct vg_image;
37 struct pipe_sampler_state;
38 struct pipe_resource;
40 struct vg_paint *paint_create(struct vg_context *ctx);
41 void paint_destroy(struct vg_paint *paint);
43 void paint_set_color(struct vg_paint *paint,
44 const VGfloat *color);
45 void paint_get_color(struct vg_paint *paint,
46 VGfloat *color);
48 void paint_set_coloriv(struct vg_paint *paint,
49 const VGint *color);
50 void paint_get_coloriv(struct vg_paint *paint,
51 VGint *color);
53 void paint_set_colori(struct vg_paint *paint,
54 VGuint rgba);
56 VGuint paint_colori(struct vg_paint *paint);
58 void paint_set_type(struct vg_paint *paint, VGPaintType type);
59 VGPaintType paint_type(struct vg_paint *paint);
60 void paint_resolve_type(struct vg_paint *paint);
62 void paint_set_linear_gradient(struct vg_paint *paint,
63 const VGfloat *coords);
64 void paint_linear_gradient(struct vg_paint *paint,
65 VGfloat *coords);
66 void paint_set_linear_gradienti(struct vg_paint *paint,
67 const VGint *coords);
68 void paint_linear_gradienti(struct vg_paint *paint,
69 VGint *coords);
72 void paint_set_radial_gradient(struct vg_paint *paint,
73 const VGfloat *values);
74 void paint_radial_gradient(struct vg_paint *paint,
75 VGfloat *coords);
76 void paint_set_radial_gradienti(struct vg_paint *paint,
77 const VGint *values);
78 void paint_radial_gradienti(struct vg_paint *paint,
79 VGint *coords);
82 void paint_set_ramp_stops(struct vg_paint *paint, const VGfloat *stops,
83 int num);
84 void paint_ramp_stops(struct vg_paint *paint, VGfloat *stops,
85 int num);
87 void paint_set_ramp_stopsi(struct vg_paint *paint, const VGint *stops,
88 int num);
89 void paint_ramp_stopsi(struct vg_paint *paint, VGint *stops,
90 int num);
92 int paint_num_ramp_stops(struct vg_paint *paint);
94 void paint_set_spread_mode(struct vg_paint *paint,
95 VGint mode);
96 VGColorRampSpreadMode paint_spread_mode(struct vg_paint *paint);
99 void paint_set_pattern(struct vg_paint *paint,
100 struct vg_image *img);
101 void paint_set_pattern_tiling(struct vg_paint *paint,
102 VGTilingMode mode);
103 VGTilingMode paint_pattern_tiling(struct vg_paint *paint);
105 void paint_set_color_ramp_premultiplied(struct vg_paint *paint,
106 VGboolean set);
107 VGboolean paint_color_ramp_premultiplied(struct vg_paint *paint);
110 VGint paint_bind_samplers(struct vg_paint *paint, struct pipe_sampler_state **samplers,
111 struct pipe_sampler_view **sampler_views);
113 VGboolean paint_is_degenerate(struct vg_paint *paint);
115 VGint paint_constant_buffer_size(struct vg_paint *paint);
117 void paint_fill_constant_buffer(struct vg_paint *paint,
118 const struct matrix *mat,
119 void *buffer);
121 VGboolean paint_is_opaque(struct vg_paint *paint);
123 #endif