VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/mipict.h@ 68495

Last change on this file since 68495 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 4.9 KB
Line 
1/*
2 * $XFree86: xc/programs/Xserver/render/mipict.h,v 1.12 2002/11/05 05:34:40 keithp Exp $
3 *
4 * Copyright © 2000 SuSE, Inc.
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of SuSE not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. SuSE makes no representations about the
13 * suitability of this software for any purpose. It is provided "as is"
14 * without express or implied warranty.
15 *
16 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
18 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 *
23 * Author: Keith Packard, SuSE, Inc.
24 */
25
26#ifndef _MIPICT_H_
27#define _MIPICT_H_
28
29#include "picturestr.h"
30
31#define MI_MAX_INDEXED 256 /* XXX depth must be <= 8 */
32
33#if MI_MAX_INDEXED <= 256
34typedef CARD8 miIndexType;
35#endif
36
37typedef struct _miIndexed {
38 Bool color;
39 CARD32 rgba[MI_MAX_INDEXED];
40 miIndexType ent[32768];
41} miIndexedRec, *miIndexedPtr;
42
43#define miCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
44 (((s) >> 6) & 0x03e0) | \
45 (((s) >> 9) & 0x7c00))
46#define miIndexToEnt15(mif,rgb15) ((mif)->ent[rgb15])
47#define miIndexToEnt24(mif,rgb24) miIndexToEnt15(mif,miCvtR8G8B8to15(rgb24))
48
49#define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)])
50
51int
52miCreatePicture (PicturePtr pPicture);
53
54void
55miDestroyPicture (PicturePtr pPicture);
56
57void
58miDestroyPictureClip (PicturePtr pPicture);
59
60int
61miChangePictureClip (PicturePtr pPicture,
62 int type,
63 pointer value,
64 int n);
65
66void
67miChangePicture (PicturePtr pPicture,
68 Mask mask);
69
70void
71miValidatePicture (PicturePtr pPicture,
72 Mask mask);
73
74
75Bool
76miClipPicture (RegionPtr pRegion,
77 PicturePtr pPicture,
78 INT16 xReg,
79 INT16 yReg,
80 INT16 xPict,
81 INT16 yPict);
82
83Bool
84miComputeCompositeRegion (RegionPtr pRegion,
85 PicturePtr pSrc,
86 PicturePtr pMask,
87 PicturePtr pDst,
88 INT16 xSrc,
89 INT16 ySrc,
90 INT16 xMask,
91 INT16 yMask,
92 INT16 xDst,
93 INT16 yDst,
94 CARD16 width,
95 CARD16 height);
96
97Bool
98miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
99
100void
101miGlyphExtents (int nlist,
102 GlyphListPtr list,
103 GlyphPtr *glyphs,
104 BoxPtr extents);
105
106void
107miGlyphs (CARD8 op,
108 PicturePtr pSrc,
109 PicturePtr pDst,
110 PictFormatPtr maskFormat,
111 INT16 xSrc,
112 INT16 ySrc,
113 int nlist,
114 GlyphListPtr list,
115 GlyphPtr *glyphs);
116
117void
118miRenderColorToPixel (PictFormatPtr pPict,
119 xRenderColor *color,
120 CARD32 *pixel);
121
122void
123miRenderPixelToColor (PictFormatPtr pPict,
124 CARD32 pixel,
125 xRenderColor *color);
126
127Bool
128miIsSolidAlpha (PicturePtr pSrc);
129
130void
131miCompositeRects (CARD8 op,
132 PicturePtr pDst,
133 xRenderColor *color,
134 int nRect,
135 xRectangle *rects);
136
137void
138miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
139
140void
141miTrapezoids (CARD8 op,
142 PicturePtr pSrc,
143 PicturePtr pDst,
144 PictFormatPtr maskFormat,
145 INT16 xSrc,
146 INT16 ySrc,
147 int ntrap,
148 xTrapezoid *traps);
149
150void
151miPointFixedBounds (int npoint, xPointFixed *points, BoxPtr bounds);
152
153void
154miTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds);
155
156void
157miRasterizeTriangle (PicturePtr pMask,
158 xTriangle *tri,
159 int x_off,
160 int y_off);
161
162void
163miTriangles (CARD8 op,
164 PicturePtr pSrc,
165 PicturePtr pDst,
166 PictFormatPtr maskFormat,
167 INT16 xSrc,
168 INT16 ySrc,
169 int ntri,
170 xTriangle *tris);
171
172void
173miTriStrip (CARD8 op,
174 PicturePtr pSrc,
175 PicturePtr pDst,
176 PictFormatPtr maskFormat,
177 INT16 xSrc,
178 INT16 ySrc,
179 int npoint,
180 xPointFixed *points);
181
182void
183miTriFan (CARD8 op,
184 PicturePtr pSrc,
185 PicturePtr pDst,
186 PictFormatPtr maskFormat,
187 INT16 xSrc,
188 INT16 ySrc,
189 int npoint,
190 xPointFixed *points);
191
192PicturePtr
193miCreateAlphaPicture (ScreenPtr pScreen,
194 PicturePtr pDst,
195 PictFormatPtr pPictFormat,
196 CARD16 width,
197 CARD16 height);
198
199Bool
200miInitIndexed (ScreenPtr pScreen,
201 PictFormatPtr pFormat);
202
203void
204miCloseIndexed (ScreenPtr pScreen,
205 PictFormatPtr pFormat);
206
207void
208miUpdateIndexed (ScreenPtr pScreen,
209 PictFormatPtr pFormat,
210 int ndef,
211 xColorItem *pdef);
212
213#endif /* _MIPICT_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette