diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c new file mode 100644 index 0000000..357eb32 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c | |||
@@ -0,0 +1,43 @@ | |||
1 | { | ||
2 | DATA32 **ypoints; | ||
3 | int *xpoints; | ||
4 | int *xapoints, *xapp; | ||
5 | int *yapoints, *yapp; | ||
6 | DATA32 *buf, *src_data; | ||
7 | |||
8 | RGBA_Gfx_Func func; | ||
9 | |||
10 | src_data = src->image.data; | ||
11 | |||
12 | /* some maximum region sizes to avoid insane calc point tables */ | ||
13 | SCALE_CALC_X_POINTS(xpoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); | ||
14 | SCALE_CALC_Y_POINTS(ypoints, src_data, src_w, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); | ||
15 | SCALE_CALC_A_POINTS(xapoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); | ||
16 | SCALE_CALC_A_POINTS(yapoints, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); | ||
17 | |||
18 | /* a scanline buffer */ | ||
19 | buf = alloca(dst_clip_w * sizeof(DATA32)); | ||
20 | |||
21 | if (dc->mul.use) | ||
22 | func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); | ||
23 | else | ||
24 | func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); | ||
25 | /* scaling down vertically */ | ||
26 | if ((dst_region_w >= src_region_w) && | ||
27 | (dst_region_h < src_region_h)) | ||
28 | { | ||
29 | #include "evas_scale_smooth_scaler_downy.c" | ||
30 | } | ||
31 | /* scaling down horizontally */ | ||
32 | else if ((dst_region_w < src_region_w) && | ||
33 | (dst_region_h >= src_region_h)) | ||
34 | { | ||
35 | #include "evas_scale_smooth_scaler_downx.c" | ||
36 | } | ||
37 | /* scaling down both vertically & horizontally */ | ||
38 | else if ((dst_region_w < src_region_w) && | ||
39 | (dst_region_h < src_region_h)) | ||
40 | { | ||
41 | #include "evas_scale_smooth_scaler_downx_downy.c" | ||
42 | } | ||
43 | } | ||