Enlightenment CVS committal
Author : cmarcelo
Project : e17
Module : proto/python-efl
Dir : e17/proto/python-efl/python-evas/evas
Modified Files:
evas_object_image_rotate.c
Log Message:
Python-Evas: fix to image_rotate. Patch from Leonardo Sobral.
===================================================================
RCS file:
/cvs/e/e17/proto/python-efl/python-evas/evas/evas_object_image_rotate.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_object_image_rotate.c 15 Nov 2007 22:38:11 -0000 1.1
+++ evas_object_image_rotate.c 22 Nov 2007 15:26:05 -0000 1.2
@@ -4,6 +4,16 @@
#include "evas_object_image_rotate.h"
+static inline int
+_calc_stride(int w)
+{
+ int pad;
+
+ pad = w % 4;
+ if (!pad) return w;
+ else return w + 4 - pad;
+}
+
static void
_data8_image_rotate_90(char *dst, const char *src,
int dst_stride, int src_stride,
@@ -276,7 +286,7 @@
switch(rotation) {
case ROTATE_90:
- dst_stride = h;
+ dst_stride = _calc_stride(h);
_data16_image_rotate_90(dst, src,
dst_stride, src_stride,
out_x, out_y, w, h);
@@ -286,7 +296,7 @@
out_x, out_y, w, h);
break;
case ROTATE_180:
- dst_stride = src_stride;
+ dst_stride = _calc_stride(src_stride);
_data16_image_rotate_180(dst, src,
dst_stride, src_stride,
out_x, out_y, w, h);
@@ -296,7 +306,7 @@
out_x, out_y, w, h);
break;
case ROTATE_270:
- dst_stride = h;
+ dst_stride = _calc_stride(h);
_data16_image_rotate_270(dst, src,
dst_stride, src_stride,
out_x, out_y, w, h);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs