Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common
Modified Files:
evas_image_load.c evas_scale_smooth_scaler.c
Log Message:
move co-ordinates to be their own type. this is a good thing, because ti
allows me to be able to virtualize he canvas co-ordinate system. right now
it's doubles. i can now move to floats, int's etc. with a recompile (and well
recompile all depending apps too). it's still ACTUALLY doubles, just all
typedef'ed now. i've also changed booleans to actual boolean types (not an
int), all code will keep working - but i'd highly suggest moving your code to
use these types if interacting with evas.
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_image_load.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_image_load.c 5 Feb 2003 04:19:16 -0000 1.5
+++ evas_image_load.c 18 Oct 2003 03:34:00 -0000 1.6
@@ -414,6 +414,7 @@
return 1;
}
+#if 0 /* not used at the moment */
static int load_image_file_data_jpeg_alpha_internal(RGBA_Image *im, FILE *f);
static int
load_image_file_data_jpeg_alpha_internal(RGBA_Image *im, FILE *f)
@@ -519,6 +520,7 @@
jpeg_destroy_decompress(&cinfo);
return 1;
}
+#endif
static int load_image_file_head_jpeg(RGBA_Image *im, const char *file, const char
*key);
static int
@@ -558,7 +560,7 @@
static int
load_image_file_head_eet(RGBA_Image *im, const char *file, const char *key)
{
- int w, h, alpha, compression, size, quality, lossy;
+ int w, h, alpha, compression, quality, lossy;
Eet_File *ef;
DATA32 *body;
@@ -611,7 +613,6 @@
int w, h, alpha, compression, size;
E_DB_File *db;
DATA32 *ret;
- DATA32 *body;
DATA32 header[8];
if ((!file) || (!key)) return -1;
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_scale_smooth_scaler.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_scale_smooth_scaler.c 19 May 2003 05:36:12 -0000 1.4
+++ evas_scale_smooth_scaler.c 18 Oct 2003 03:34:00 -0000 1.5
@@ -6,7 +6,6 @@
int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h)
{
- int divx, divy;
int x, y;
int *lin_ptr, *lin2_ptr;
int *interp_x, *interp_y;
@@ -291,11 +290,35 @@
{
lin_ptr[x] = (((x + dst_clip_x - dst_region_x) *
(src_region_w)) / dst_region_w);
- if (src_region_w > 4096)
+ if (dst_region_w > 262144)
+ interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
+ (src_region_w))) / dst_region_w) -
+ (lin_ptr[x])) << 8;
+ else if (dst_region_w > 131072)
+ interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
+ (src_region_w)) << 1) / dst_region_w) -
+ (lin_ptr[x] << 1)) << 7;
+ else if (dst_region_w > 65536)
+ interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
+ (src_region_w)) << 2) / dst_region_w) -
+ (lin_ptr[x] << 2)) << 6;
+ else if (dst_region_w > 37268)
+ interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
+ (src_region_w)) << 3) / dst_region_w) -
+ (lin_ptr[x] << 3)) << 5;
+ else if (dst_region_w > 16384)
+ interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
+ (src_region_w)) << 4) / dst_region_w) -
+ (lin_ptr[x] << 4)) << 4;
+ else if (dst_region_w > 8192)
+ interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
+ (src_region_w)) << 5) / dst_region_w) -
+ (lin_ptr[x] << 5)) << 3;
+ else if (dst_region_w > 4096)
interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
(src_region_w)) << 6) / dst_region_w) -
(lin_ptr[x] << 6)) << 2;
- else if (src_region_w > 2048)
+ else if (dst_region_w > 2048)
interp_x[x] = (((((x + dst_clip_x - dst_region_x) *
(src_region_w)) << 7) / dst_region_w) -
(lin_ptr[x] << 7)) << 1;
@@ -322,11 +345,35 @@
pos = (((y + dst_clip_y - dst_region_y) *
(src_region_h)) / dst_region_h);
row_ptr[y] = src_data + ((pos + src_region_y) * src_w);
- if (src_region_h > 4096)
+ if (dst_region_h > 262144)
+ interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
+ (src_region_h))) / dst_region_h) -
+ (pos)) << 8;
+ else if (dst_region_h > 131072)
+ interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
+ (src_region_h)) << 1) / dst_region_h) -
+ (pos << 1)) << 7;
+ else if (dst_region_h > 65536)
+ interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
+ (src_region_h)) << 2) / dst_region_h) -
+ (pos << 2)) << 6;
+ else if (dst_region_h > 32768)
+ interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
+ (src_region_h)) << 3) / dst_region_h) -
+ (pos << 3)) << 5;
+ else if (dst_region_h > 16384)
+ interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
+ (src_region_h)) << 4) / dst_region_h) -
+ (pos << 4)) << 4;
+ else if (dst_region_h > 8192)
+ interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
+ (src_region_h)) << 5) / dst_region_h) -
+ (pos << 5)) << 3;
+ else if (dst_region_h > 4096)
interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
(src_region_h)) << 6) / dst_region_h) -
(pos << 6)) << 2;
- else if (src_region_h > 2048)
+ else if (dst_region_h > 2048)
interp_y[y] = (((((y + dst_clip_y - dst_region_y) *
(src_region_h)) << 7) / dst_region_h) -
(pos << 7)) << 1;
@@ -630,6 +677,7 @@
DATA32 *src_data, *src2_data;
RGBA_Surface *srf1, *srf2;
int mix;
+ int divx, divy;
/* no mipmaps at all- need to populate mipmap table */
if (src->mipmaps.num == 0)
@@ -847,7 +895,7 @@
#define YAP (yapoints[dyy + y])
/* NEW scaling code... */
DATA32 *sptr;
- int x, y, dyy;
+ int x, y;
DATA32 **ypoints;
int *xpoints;
int *xapoints;
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs