pixman-region.c \
pixman-private.h \
pixman-image.c \
- pixman-compose.c
+ pixman-compose.c \
+ pixman-utils.c
libpixmanincludedir = $(includedir)/pixman
libpixmaninclude_HEADERS = pixman.h
*/
#define INLINE inline
-int
-pixmanTransformPoint3d (pixman_transform_t *transform,
- pixman_vector_t *vector)
-{
- pixman_vector_t result;
- int i, j;
- pixman_fixed_32_32_t partial;
- pixman_fixed_48_16_t v;
-
- for (j = 0; j < 3; j++)
- {
- v = 0;
- for (i = 0; i < 3; i++)
- {
- partial = ((pixman_fixed_48_16_t) transform->matrix[j][i] *
- (pixman_fixed_48_16_t) vector->vector[i]);
- v += partial >> 16;
- }
- if (v > pixman_max_fixed_48_16 || v < pixman_min_fixed_48_16)
- return FALSE;
- result.vector[j] = (pixman_fixed_48_16_t) v;
- }
- if (!result.vector[2])
- return FALSE;
- *vector = result;
- return TRUE;
-}
-
-
#ifdef FB_ACCESS_WRAPPER
#include "wfbrename.h"
if (pict->common.transform)
{
- if (!pixmanTransformPoint3d (pict->common.transform, &v))
+ if (!pixman_transform_point_3d (pict->common.transform, &v))
return SOURCE_IMAGE_CLASS_UNKNOWN;
}
v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1/2;
v.vector[2] = pixman_fixed_1;
if (pict->common.transform) {
- if (!pixmanTransformPoint3d (pict->common.transform, &v))
+ if (!pixman_transform_point_3d (pict->common.transform, &v))
return;
unit.vector[0] = pict->common.transform->matrix[0][0];
unit.vector[1] = pict->common.transform->matrix[1][0];
v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1/2;
v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1/2;
v.vector[2] = pixman_fixed_1;
- if (!pixmanTransformPoint3d (pict->common.transform, &v))
+ if (!pixman_transform_point_3d (pict->common.transform, &v))
return;
cx = pict->common.transform->matrix[0][0]/65536.;
/* when using convolution filters one might get here without a transform */
if (pict->common.transform)
{
- if (!pixmanTransformPoint3d (pict->common.transform, &v))
+ if (!pixman_transform_point_3d (pict->common.transform, &v))
{
fbFinishAccess (pict->pDrawable);
return;
solid_fill_t solid;
};
-int pixmanTransformPoint3d (pixman_transform_t *trans,
- pixman_vector_t *vector);
void pixmanCompositeRect (const FbComposeData *data,
uint32_t *scanline_buffer);
-
-
-
-
#if 0
typedef struct _Picture {
DrawablePtr pDrawable;
--- /dev/null
+/*
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#include "pixman.h"
+#include "pixman-private.h"
+
+pixman_bool_t
+pixman_transform_point_3d (pixman_transform_t *transform,
+ pixman_vector_t *vector)
+{
+ pixman_vector_t result;
+ int i, j;
+ pixman_fixed_32_32_t partial;
+ pixman_fixed_48_16_t v;
+
+ for (j = 0; j < 3; j++)
+ {
+ v = 0;
+ for (i = 0; i < 3; i++)
+ {
+ partial = ((pixman_fixed_48_16_t) transform->matrix[j][i] *
+ (pixman_fixed_48_16_t) vector->vector[i]);
+ v += partial >> 16;
+ }
+
+ if (v > pixman_max_fixed_48_16 || v < pixman_min_fixed_48_16)
+ return FALSE;
+
+ result.vector[j] = (pixman_fixed_48_16_t) v;
+ }
+
+ if (!result.vector[2])
+ return FALSE;
+
+ *vector = result;
+ return TRUE;
+}
pixman_fixed_t matrix[3][3];
};
+pixman_bool_t pixman_transform_point_3d (pixman_transform_t *transform,
+ pixman_vector_t *vector);
+
/* Don't blame me, blame XRender */
typedef enum
{