1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright © 2007 Keith Packard 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Permission to use, copy, modify, distribute, and sell this software and its 5*4882a593Smuzhiyun * documentation for any purpose is hereby granted without fee, provided that 6*4882a593Smuzhiyun * the above copyright notice appear in all copies and that both that copyright 7*4882a593Smuzhiyun * notice and this permission notice appear in supporting documentation, and 8*4882a593Smuzhiyun * that the name of the copyright holders not be used in advertising or 9*4882a593Smuzhiyun * publicity pertaining to distribution of the software without specific, 10*4882a593Smuzhiyun * written prior permission. The copyright holders make no representations 11*4882a593Smuzhiyun * about the suitability of this software for any purpose. It is provided "as 12*4882a593Smuzhiyun * is" without express or implied warranty. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15*4882a593Smuzhiyun * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16*4882a593Smuzhiyun * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17*4882a593Smuzhiyun * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18*4882a593Smuzhiyun * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19*4882a593Smuzhiyun * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 20*4882a593Smuzhiyun * OF THIS SOFTWARE. 21*4882a593Smuzhiyun */ 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun #ifndef _RRTRANSFORM_H_ 24*4882a593Smuzhiyun #define _RRTRANSFORM_H_ 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #include <X11/extensions/randr.h> 27*4882a593Smuzhiyun #include "picturestr.h" 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun typedef struct _rrTransform RRTransformRec, *RRTransformPtr; 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun struct _rrTransform { 32*4882a593Smuzhiyun PictTransform transform; 33*4882a593Smuzhiyun struct pict_f_transform f_transform; 34*4882a593Smuzhiyun struct pict_f_transform f_inverse; 35*4882a593Smuzhiyun PictFilterPtr filter; 36*4882a593Smuzhiyun xFixed *params; 37*4882a593Smuzhiyun int nparams; 38*4882a593Smuzhiyun int width; 39*4882a593Smuzhiyun int height; 40*4882a593Smuzhiyun }; 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun extern _X_EXPORT void 43*4882a593Smuzhiyun RRTransformInit(RRTransformPtr transform); 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun extern _X_EXPORT void 46*4882a593Smuzhiyun RRTransformFini(RRTransformPtr transform); 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun extern _X_EXPORT Bool 49*4882a593Smuzhiyun RRTransformEqual(RRTransformPtr a, RRTransformPtr b); 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun extern _X_EXPORT Bool 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun RRTransformSetFilter(RRTransformPtr dst, 54*4882a593Smuzhiyun PictFilterPtr filter, 55*4882a593Smuzhiyun xFixed * params, int nparams, int width, int height); 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun extern _X_EXPORT Bool 58*4882a593Smuzhiyun RRTransformCopy(RRTransformPtr dst, RRTransformPtr src); 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun /* 61*4882a593Smuzhiyun * Compute the complete transformation matrix including 62*4882a593Smuzhiyun * client-specified transform, rotation/reflection values and the crtc 63*4882a593Smuzhiyun * offset. 64*4882a593Smuzhiyun * 65*4882a593Smuzhiyun * Return TRUE if the resulting transform is not a simple translation. 66*4882a593Smuzhiyun */ 67*4882a593Smuzhiyun extern _X_EXPORT Bool 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun RRTransformCompute(int x, 70*4882a593Smuzhiyun int y, 71*4882a593Smuzhiyun int width, 72*4882a593Smuzhiyun int height, 73*4882a593Smuzhiyun Rotation rotation, 74*4882a593Smuzhiyun RRTransformPtr rr_transform, 75*4882a593Smuzhiyun PictTransformPtr transform, 76*4882a593Smuzhiyun struct pict_f_transform *f_transform, 77*4882a593Smuzhiyun struct pict_f_transform *f_inverse); 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun #endif /* _RRTRANSFORM_H_ */ 80