Compare commits
84 Commits
master
...
devs/felip
Author | SHA1 | Date |
---|---|---|
Savio Sena | 78fc05ac91 | |
Savio Sena | d7cfdd0557 | |
Savio Sena | 0afccbf4e1 | |
Savio Sena | e03125e56d | |
Savio Sena | c58e2e4047 | |
Savio Sena | 309e04e44a | |
Savio Sena | ef428b5c31 | |
Felipe Magno de Almeida | c3e798cfd0 | |
Savio S. Machado | bc5d56877e | |
Savio S. Machado | 3434b132b8 | |
Savio Sena | 2360632b37 | |
Savio Sena | 55a7eae96f | |
Savio Sena | 2a2cc7260c | |
Savio Sena | c9984a38ad | |
Savio Sena | 428f271bcf | |
Savio Sena | 93c095a3fb | |
Savio Sena | f097281c9d | |
Savio Sena | 08f95c4bfe | |
Savio Sena | 9dccf53084 | |
Savio Sena | fb28488bdc | |
Savio Sena | 691498bfa6 | |
Savio Sena | 3f1b05bd0b | |
Savio Sena | 9ee8b2a45b | |
Savio Sena | 4a6fb1ef93 | |
Savio Sena | f1ea8fafa1 | |
Savio Sena | d1d04667ad | |
Savio Sena | cc37a06018 | |
Savio Sena | c43478a984 | |
Savio Sena | b4070dde1c | |
Savio Sena | d810de418e | |
Savio Sena | a67e3ea4b9 | |
Savio Sena | 21216c5dff | |
Savio Sena | 46a88189ca | |
Savio Sena | ad066eb17e | |
Savio Sena | bbb7e27b03 | |
Savio Sena | 99d7f53948 | |
Savio Sena | a61c25ee27 | |
Savio Sena | 583d48e392 | |
Savio Sena | 365de8d7d3 | |
Savio Sena | 762466f0e0 | |
Savio Sena | f051eef702 | |
Savio Sena | d9a9594744 | |
Savio Sena | acc4a6f195 | |
Savio Sena | 26a234effd | |
Savio Sena | ce1d410301 | |
Savio Sena | 12e33a9c12 | |
Savio Sena | 95e8ec6f9e | |
Savio Sena | d90d23bdd6 | |
Savio Sena | 095e9141b7 | |
Savio Sena | 0691d96d6c | |
Savio Sena | ab1945dc31 | |
Savio Sena | e60ba2ee1f | |
Savio Sena | 7975d43856 | |
Savio Sena | 2edb6402d6 | |
Savio Sena | a6d52a1876 | |
Savio Sena | 7a3096883d | |
Savio Sena | 6940737f17 | |
Savio Sena | f1ce0c028f | |
Savio Sena | 7e8108ad75 | |
Savio Sena | a9145b99c8 | |
Savio Sena | 23aefd6470 | |
Savio Sena | 2351346646 | |
Savio Sena | 22f097ed64 | |
Savio Sena | 43516b12df | |
Savio Sena | e4c333f3eb | |
Savio Sena | f0dbeca426 | |
Savio Sena | 1a3b5e8d7d | |
Savio Sena | 9792784abd | |
Savio Sena | 1efc8c8a30 | |
Savio Sena | c895eba3fd | |
Savio Sena | 3f32d142fc | |
Savio Sena | bbb0568606 | |
Savio Sena | ef9f34edfd | |
Savio Sena | a35c3791ad | |
Savio Sena | c7cabe8da6 | |
Savio Sena | 07b4407c26 | |
Savio Sena | a4b7b0ba31 | |
Savio Sena | bab92da5cf | |
Savio Sena | 6b928ebec4 | |
Savio Sena | 155888f2c5 | |
Savio Sena | 37bbc4fae5 | |
Savio Sena | d29bf887ec | |
Savio Sena | bebe73caa4 | |
Savio Sena | 8682064e4c |
11
configure.ac
11
configure.ac
|
@ -10,7 +10,7 @@ AC_CONFIG_HEADERS([config.h])
|
|||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
|
||||
AM_INIT_AUTOMAKE([1.6 dist-bzip2 subdir-objects])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
@ -35,7 +35,9 @@ AC_PROG_CC
|
|||
|
||||
LT_PROG_RC
|
||||
|
||||
### Check for C++11
|
||||
|
||||
EFL_CXX_COMPILE_STDCXX_11([ext], [mandatory])
|
||||
|
||||
### Checks for libraries
|
||||
|
||||
|
@ -55,6 +57,9 @@ PKG_CHECK_MODULES([EFL], eina >= 1.7.99 efl >= 1.11.99 eo >= 1.7.99 evas >= 1.7.
|
|||
EFL_ENABLE_EO_API_SUPPORT
|
||||
EFL_ENABLE_BETA_API_SUPPORT
|
||||
|
||||
# EFL++ dependencies
|
||||
|
||||
PKG_CHECK_MODULES([EFL_CXX], efl-cxx >= 1.11.99 eina-cxx >= 1.11.99 eo-cxx >= 1.11.99 evas-cxx >= 1.11.99 eet-cxx >= 1.11.99)
|
||||
|
||||
### Checks for header files
|
||||
|
||||
|
@ -92,8 +97,10 @@ AC_MSG_CHECKING([whether the compiler supports -fno-rtti -fno-exceptions])
|
|||
AC_MSG_RESULT([${have_cxx_flags}])
|
||||
CXXFLAGS="${CXXFLAGS_save}"
|
||||
if test "x${have_cxx_flags}" = "xyes" ; then
|
||||
EXPEDITE_CXXFLAGS="-fno-rtti -fno-exceptions"
|
||||
EXPEDITE_CXXFLAGS="-fno-rtti -fno-exceptions -DEFL_CXX_NO_EXCEPTIONS"
|
||||
fi
|
||||
CXXFLAGS="${CXXFLAGS} -std=c++11"
|
||||
|
||||
AC_LANG_POP([C++])
|
||||
AC_SUBST(EXPEDITE_CXXFLAGS)
|
||||
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
# ============================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the C++11
|
||||
# standard; if necessary, add switches to CXXFLAGS to enable support.
|
||||
#
|
||||
# The first argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The second argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline C++11 support is required and that the macro
|
||||
# should error out if no mode with that support is found. If specified
|
||||
# 'optional', then configuration proceeds regardless, after defining
|
||||
# HAVE_CXX11 if and only if a supporting mode is found.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 3
|
||||
|
||||
m4_define([_EFL_CXX_COMPILE_STDCXX_11_testbody], [
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
typedef check<check<bool>> right_angle_brackets;
|
||||
|
||||
int a;
|
||||
decltype(a) b;
|
||||
|
||||
typedef check<int> check_type;
|
||||
check_type c;
|
||||
check_type&& cr = static_cast<check_type&&>(c);
|
||||
|
||||
struct A { A(int); };
|
||||
struct B : A { using A::A; }; // inheriting constructors
|
||||
|
||||
auto d = a;
|
||||
])
|
||||
|
||||
AC_DEFUN([EFL_CXX_COMPILE_STDCXX_11], [dnl
|
||||
m4_if([$1], [], [],
|
||||
[$1], [ext], [],
|
||||
[$1], [noext], [],
|
||||
[m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
|
||||
m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
|
||||
[$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
|
||||
[$2], [optional], [ax_cxx_compile_cxx11_required=false],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])dnl
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
|
||||
ax_cv_cxx_compile_cxx11,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_EFL_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[ax_cv_cxx_compile_cxx11=yes],
|
||||
[ax_cv_cxx_compile_cxx11=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx11 = xyes; then
|
||||
ac_success=yes
|
||||
fi
|
||||
|
||||
m4_if([$1], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=gnu++11; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_EFL_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$1], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=c++11; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_EFL_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx11_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
|
||||
fi
|
||||
else
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX11=0
|
||||
AC_MSG_NOTICE([No compiler with C++11 support was found])
|
||||
else
|
||||
HAVE_CXX11=1
|
||||
AC_DEFINE(HAVE_CXX11,1,
|
||||
[define if the compiler supports basic C++11 syntax])
|
||||
fi
|
||||
|
||||
AC_SUBST(HAVE_CXX11)
|
||||
fi
|
||||
])
|
|
@ -7,11 +7,208 @@ AM_CPPFLAGS = \
|
|||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
@EFL_CFLAGS@ \
|
||||
@EFL_CXX_CFLAGS@ \
|
||||
@EVIL_CFLAGS@
|
||||
|
||||
bin_PROGRAMS = expedite
|
||||
bin_SCRIPTS = expedite-cmp
|
||||
|
||||
# XXX
|
||||
cxx_sources = \
|
||||
cxx/image_blend_border.cc \
|
||||
cxx/image_blend_border_capi.h \
|
||||
cxx/image_blend_border_recolor.cc \
|
||||
cxx/image_blend_border_recolor_capi.h \
|
||||
cxx/image_blend_fade_pow2_unscaled.cc \
|
||||
cxx/image_blend_fade_pow2_unscaled_capi.h \
|
||||
cxx/image_blend_fade_unscaled.cc \
|
||||
cxx/image_blend_fade_unscaled_capi.h \
|
||||
cxx/image_blend_many_smooth_same_scaled.cc \
|
||||
cxx/image_blend_many_smooth_same_scaled_capi.h \
|
||||
cxx/image_blend_nearest_same_scaled.cc \
|
||||
cxx/image_blend_nearest_same_scaled_capi.h \
|
||||
cxx/image_blend_nearest_scaled.cc \
|
||||
cxx/image_blend_nearest_scaled_capi.h \
|
||||
cxx/image_blend_nearest_solid_same_scaled.cc \
|
||||
cxx/image_blend_nearest_solid_same_scaled_capi.h \
|
||||
cxx/image_blend_nearest_solid_scaled.cc \
|
||||
cxx/image_blend_nearest_solid_scaled_capi.h \
|
||||
cxx/image_blend_occlude1.cc \
|
||||
cxx/image_blend_occlude1_capi.h \
|
||||
cxx/image_blend_occlude1_few.cc \
|
||||
cxx/image_blend_occlude1_few_capi.h \
|
||||
cxx/image_blend_occlude1_many.cc \
|
||||
cxx/image_blend_occlude1_many_capi.h \
|
||||
cxx/image_blend_occlude1_very_many.cc \
|
||||
cxx/image_blend_occlude1_very_many_capi.h \
|
||||
cxx/image_blend_occlude2.cc \
|
||||
cxx/image_blend_occlude2_capi.h \
|
||||
cxx/image_blend_occlude2_few.cc \
|
||||
cxx/image_blend_occlude2_few_capi.h \
|
||||
cxx/image_blend_occlude2_many.cc \
|
||||
cxx/image_blend_occlude2_many_capi.h \
|
||||
cxx/image_blend_occlude2_very_many.cc \
|
||||
cxx/image_blend_occlude2_very_many_capi.h \
|
||||
cxx/image_blend_occlude3.cc \
|
||||
cxx/image_blend_occlude3_capi.h \
|
||||
cxx/image_blend_occlude3_few.cc \
|
||||
cxx/image_blend_occlude3_few_capi.h \
|
||||
cxx/image_blend_occlude3_many.cc \
|
||||
cxx/image_blend_occlude3_many_capi.h \
|
||||
cxx/image_blend_occlude3_very_many.cc \
|
||||
cxx/image_blend_occlude3_very_many_capi.h \
|
||||
cxx/image_blend_occlude_capi.h \
|
||||
cxx/image_blend_smooth_same_scaled.cc \
|
||||
cxx/image_blend_smooth_same_scaled_capi.h \
|
||||
cxx/image_blend_smooth_scaled.cc \
|
||||
cxx/image_blend_smooth_scaled_capi.h \
|
||||
cxx/image_blend_smooth_solid_same_scaled.cc \
|
||||
cxx/image_blend_smooth_solid_same_scaled_capi.h \
|
||||
cxx/image_blend_smooth_solid_scaled.cc \
|
||||
cxx/image_blend_smooth_solid_scaled_capi.h \
|
||||
cxx/image_blend_solid_border.cc \
|
||||
cxx/image_blend_solid_border_capi.h \
|
||||
cxx/image_blend_solid_fade_pow2_unscaled.cc \
|
||||
cxx/image_blend_solid_fade_pow2_unscaled_capi.h \
|
||||
cxx/image_blend_solid_fade_unscaled.cc \
|
||||
cxx/image_blend_solid_fade_unscaled_capi.h \
|
||||
cxx/image_blend_solid_middle_border.cc \
|
||||
cxx/image_blend_solid_middle_border_capi.h \
|
||||
cxx/image_blend_solid_middle_unscaled.cc \
|
||||
cxx/image_blend_solid_middle_unscaled_capi.h \
|
||||
cxx/image_blend_solid_unscaled.cc \
|
||||
cxx/image_blend_solid_unscaled_capi.h \
|
||||
cxx/image_blend_unscaled.cc \
|
||||
cxx/image_blend_unscaled_capi.h \
|
||||
cxx/image_crossfade.cc \
|
||||
cxx/image_crossfade_capi.h \
|
||||
cxx/image_data_argb.cc \
|
||||
cxx/image_data_argb_alpha.cc \
|
||||
cxx/image_data_argb_alpha_capi.h \
|
||||
cxx/image_data_argb_capi.h \
|
||||
cxx/image_data_ycbcr601pl.cc \
|
||||
cxx/image_data_ycbcr601pl_capi.h \
|
||||
cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc \
|
||||
cxx/image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h \
|
||||
cxx/image_data_ycbcr601pl_map_solid_rotate.cc \
|
||||
cxx/image_data_ycbcr601pl_map_solid_rotate_capi.h \
|
||||
cxx/image_data_ycbcr601pl_wide_stride.cc \
|
||||
cxx/image_data_ycbcr601pl_wide_stride_capi.h \
|
||||
cxx/image_map_3d_1.cc \
|
||||
cxx/image_map_3d_1_capi.h \
|
||||
cxx/image_map_3d_2.cc \
|
||||
cxx/image_map_3d_2_capi.h \
|
||||
cxx/image_map_3d_3.cc \
|
||||
cxx/image_map_3d_3_capi.h \
|
||||
cxx/image_map_3d_4.cc \
|
||||
cxx/image_map_3d_4_capi.h \
|
||||
cxx/image_map_3d_5.cc \
|
||||
cxx/image_map_3d_5_capi.h \
|
||||
cxx/image_map_3d_6.cc \
|
||||
cxx/image_map_3d_6_capi.h \
|
||||
cxx/image_map_3d_flow.cc \
|
||||
cxx/image_map_3d_flow_capi.h \
|
||||
cxx/image_map_color_alpha_nearest_rotate.cc \
|
||||
cxx/image_map_color_alpha_nearest_rotate_capi.h \
|
||||
cxx/image_map_color_alpha_nearest_solid_rotate.cc \
|
||||
cxx/image_map_color_alpha_nearest_solid_rotate_capi.h \
|
||||
cxx/image_map_color_alpha_rotate.cc \
|
||||
cxx/image_map_color_alpha_rotate_capi.h \
|
||||
cxx/image_map_color_alpha_solid_rotate.cc \
|
||||
cxx/image_map_color_alpha_solid_rotate_capi.h \
|
||||
cxx/image_map_color_nearest_rotate.cc \
|
||||
cxx/image_map_color_nearest_rotate_capi.h \
|
||||
cxx/image_map_color_nearest_solid_rotate.cc \
|
||||
cxx/image_map_color_nearest_solid_rotate_capi.h \
|
||||
cxx/image_map_color_rotate.cc \
|
||||
cxx/image_map_color_rotate_capi.h \
|
||||
cxx/image_map_color_solid_rotate.cc \
|
||||
cxx/image_map_color_solid_rotate_capi.h \
|
||||
cxx/image_map_nearest_rotate.cc \
|
||||
cxx/image_map_nearest_rotate_capi.h \
|
||||
cxx/image_map_nearest_solid_rotate.cc \
|
||||
cxx/image_map_nearest_solid_rotate_capi.h \
|
||||
cxx/image_map_rotate.cc \
|
||||
cxx/image_map_rotate_capi.h \
|
||||
cxx/image_map_solid_rotate.cc \
|
||||
cxx/image_map_solid_rotate_capi.h \
|
||||
cxx/image_quality_scale.cc \
|
||||
cxx/image_quality_scale_capi.h \
|
||||
cxx/poly_blend.cc \
|
||||
cxx/poly_blend_capi.h \
|
||||
cxx/line_blend.cc \
|
||||
cxx/line_blend_capi.h \
|
||||
cxx/proxy_image.cc \
|
||||
cxx/proxy_image_capi.h \
|
||||
cxx/proxy_image_offscreen.cc \
|
||||
cxx/proxy_image_offscreen_capi.h \
|
||||
cxx/proxy_text_fixed.cc \
|
||||
cxx/proxy_text_fixed_capi.h \
|
||||
cxx/proxy_text_random.cc \
|
||||
cxx/proxy_text_random_capi.h \
|
||||
cxx/rect_blend.cc \
|
||||
cxx/rect_blend_capi.h \
|
||||
cxx/rect_blend_few.cc \
|
||||
cxx/rect_blend_few_capi.h \
|
||||
cxx/rect_blend_pow2.cc \
|
||||
cxx/rect_blend_pow2_capi.h \
|
||||
cxx/rect_blend_pow2_few.cc \
|
||||
cxx/rect_blend_pow2_few_capi.h \
|
||||
cxx/rect_solid.cc \
|
||||
cxx/rect_solid_capi.h \
|
||||
cxx/rect_solid_few.cc \
|
||||
cxx/rect_solid_few_capi.h \
|
||||
cxx/text_basic.cc \
|
||||
cxx/text_basic_capi.h \
|
||||
cxx/text_change.cc \
|
||||
cxx/text_change_capi.h \
|
||||
cxx/text_styles.cc \
|
||||
cxx/text_styles_capi.h \
|
||||
cxx/text_styles_different_strings.cc \
|
||||
cxx/text_styles_different_strings_capi.h \
|
||||
cxx/textblock_auto_align.cc \
|
||||
cxx/textblock_auto_align_capi.h \
|
||||
cxx/textblock_basic.cc \
|
||||
cxx/textblock_basic_capi.h \
|
||||
cxx/textblock_intl.cc \
|
||||
cxx/textblock_intl_capi.h \
|
||||
cxx/textblock_text_append.cc \
|
||||
cxx/textblock_text_append_capi.h \
|
||||
cxx/widgets_file_icons.cc \
|
||||
cxx/widgets_file_icons_2.cc \
|
||||
cxx/widgets_file_icons_2_capi.h \
|
||||
cxx/widgets_file_icons_2_grouped.cc \
|
||||
cxx/widgets_file_icons_2_grouped_capi.h \
|
||||
cxx/widgets_file_icons_2_same.cc \
|
||||
cxx/widgets_file_icons_2_same_capi.h \
|
||||
cxx/widgets_file_icons_2_same_grouped.cc \
|
||||
cxx/widgets_file_icons_2_same_grouped_capi.h \
|
||||
cxx/widgets_file_icons_3.cc \
|
||||
cxx/widgets_file_icons_3_capi.h \
|
||||
cxx/widgets_file_icons_4.cc \
|
||||
cxx/widgets_file_icons_4_capi.h \
|
||||
cxx/widgets_file_icons_capi.h \
|
||||
cxx/widgets_list_1.cc \
|
||||
cxx/widgets_list_1_capi.h \
|
||||
cxx/widgets_list_1_grouped.cc \
|
||||
cxx/widgets_list_1_grouped_capi.h \
|
||||
cxx/widgets_list_2.cc \
|
||||
cxx/widgets_list_2_capi.h \
|
||||
cxx/widgets_list_2_grouped.cc \
|
||||
cxx/widgets_list_2_grouped_capi.h \
|
||||
cxx/widgets_list_3.cc \
|
||||
cxx/widgets_list_3_capi.h \
|
||||
cxx/widgets_list_3_grouped.cc \
|
||||
cxx/widgets_list_3_grouped_capi.h \
|
||||
cxx/widgets_list_4.cc \
|
||||
cxx/widgets_list_4_capi.h \
|
||||
cxx/widgets_list_4_grouped.cc \
|
||||
cxx/widgets_list_4_grouped_capi.h \
|
||||
cxx/font_effect_blur_alpha.cc \
|
||||
cxx/font_effect_blur_alpha_capi.h \
|
||||
cxx/font_effect_blur_color.cc \
|
||||
cxx/font_effect_blur_color_capi.h
|
||||
|
||||
expedite_SOURCES = \
|
||||
main.c main.h \
|
||||
ui.c ui.h \
|
||||
|
@ -48,9 +245,9 @@ image_blend_nearest_solid_same_scaled.c \
|
|||
image_blend_smooth_same_scaled.c \
|
||||
image_blend_smooth_solid_same_scaled.c \
|
||||
image_blend_border.c \
|
||||
image_blend_border_recolor.c \
|
||||
image_blend_solid_middle_border.c \
|
||||
image_blend_solid_border.c \
|
||||
image_blend_border_recolor.c \
|
||||
image_map_rotate.c \
|
||||
image_map_solid_rotate.c \
|
||||
image_map_nearest_rotate.c \
|
||||
|
@ -111,7 +308,9 @@ proxy_text_random.c \
|
|||
line_blend.c \
|
||||
image_blend_many_smooth_same_scaled.c \
|
||||
font_effect_blur_alpha.c \
|
||||
font_effect_blur_color.c
|
||||
font_effect_blur_color.c \
|
||||
${cxx_sources}
|
||||
|
||||
# \
|
||||
# image_mask.c \
|
||||
# image_mask_2.c \
|
||||
|
@ -131,7 +330,7 @@ font_effect_blur_color.c
|
|||
|
||||
expedite_CFLAGS = @WIN32_CFLAGS@
|
||||
expedite_CXXFLAGS = @EXPEDITE_CXXFLAGS@
|
||||
expedite_LDADD = @EFL_LIBS@ @EVIL_LIBS@ -lm
|
||||
expedite_LDADD = @EFL_LIBS@ @EFL_CXX_LIBS@ @EVIL_LIBS@ -lm
|
||||
expedite_LDFLAGS = @lt_enable_auto_import@
|
||||
|
||||
.rc.lo:
|
||||
|
|
|
@ -8,7 +8,7 @@ _setup(void)
|
|||
Evas_Object *o;
|
||||
Evas_Textblock_Style *st;
|
||||
|
||||
o = eo_add(EVAS_TEXTBLOCK_CLASS, evas);
|
||||
o = eo_add(EVAS_TEXTBLOCK_CLASS, G_evas);
|
||||
eo_do(o, evas_obj_position_set(10, 40),
|
||||
evas_obj_size_set(win_w - 20, win_h - 50),
|
||||
evas_obj_visibility_set(EINA_TRUE));
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
#ifndef ABOUT_H
|
||||
#define ABOUT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void about_start(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "font_effect_blur_alpha_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
extern int win_w, win_h;
|
||||
/* private data */
|
||||
static evas::text *text;
|
||||
static const int MAX_BLUR = 100;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
int w,h;
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
evas::text *o = new evas::text(efl::eo::parent = canvas);
|
||||
o->evas::object::color_set(0, 0, 0, 255);
|
||||
o->font_set("Vera-Bold", 80);
|
||||
o->text_set("Font Effect");
|
||||
o->visibility_set(true);
|
||||
o->evas::object::size_get(&w, &h);
|
||||
o->evas::object::position_set((win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR);
|
||||
text = o;
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
text->visibility_set(false);
|
||||
delete text;
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
if (text)
|
||||
{
|
||||
char buf[256];
|
||||
char *str = "padding_set(%d);blur(%d,color=black);";
|
||||
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
||||
text->filter_program_set(buf);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME font_effect_blur_alpha_cxx_start
|
||||
#define NAME "(C++) Font Effect Blur (Alpha)"
|
||||
#define ICON "text.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,72 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "font_effect_blur_color_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
extern int win_w, win_h;
|
||||
/* private data */
|
||||
static evas::text *text;
|
||||
static const int MAX_BLUR = 100;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
int w, h;
|
||||
|
||||
evas::text *o = new evas::text(efl::eo::parent = canvas);
|
||||
o->evas::object::color_set(0, 0, 0, 255);
|
||||
o->font_set("Vera-Bold", 80);
|
||||
o->text_set("Font Effect");
|
||||
o->visibility_set(true);
|
||||
o->evas::object::size_get(&w, &h);
|
||||
o->evas::object::position_set((win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR);
|
||||
text = o;
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
text->visibility_set(false);
|
||||
delete text;
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
if (text)
|
||||
{
|
||||
char buf[256];
|
||||
const char *str = "buffer:a(rgba);padding_set(%d);blend(dst=a,color=darkblue);blur(%d,src=a);";
|
||||
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
||||
text->filter_program_set(buf);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME font_effect_blur_color_cxx_start
|
||||
#define NAME "(C++) Font Effect Blur (Color)"
|
||||
#define ICON "text.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_border_capi.h"
|
||||
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* setup */
|
||||
static void _setup()
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("bar.png"), NULL)); // XXX
|
||||
o.border_set(6, 6, 6, 6);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
Evas_Coord x, y, w, h, w0, h0;
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
w0 = 80;
|
||||
h0 = 80;
|
||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
||||
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_border_cxx_start
|
||||
#define NAME "(C++) Image Blend Border (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_border_recolor_capi.h"
|
||||
|
||||
efl::eina::list<evas::image> images;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(::build_path("pan.png"), NULL)); // XXX
|
||||
o.color_set(64, 64, 64, 255);
|
||||
o.border_set(3, 3, 3, 3);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
Evas_Coord x, y, w, h, w0, h0;
|
||||
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
|
||||
{
|
||||
w0 = 80;
|
||||
h0 = 80;
|
||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
||||
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
|
||||
(*it).position_set(x, y);
|
||||
(*it).evas::object::size_set(w, h);
|
||||
(*it).fill_set(0, 0, w, h);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_border_recolor_cxx_start
|
||||
#define NAME "(C++) Image Blend Border Recolor (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_fade_pow2_unscaled_capi.h"
|
||||
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
|
||||
eo_do(o._eo_ptr(), efl_file_set(::build_path("logo.png"), NULL)); // XXX
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
|
||||
int a = 256 - (1 << ((rnd() % 8) + 1));
|
||||
if (a < 128) a = 128;
|
||||
|
||||
o.color_set(a, a, a, a);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
|
||||
{
|
||||
w = 120;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
(*it).position_set(x, y);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_fade_pow2_unscaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Fade Power 2 Unscaled (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_fade_unscaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(::build_path("logo.png"), NULL)); // XXX
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
|
||||
int a = rnd()&0xff;
|
||||
o.color_set(a, a, a, a);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
|
||||
{
|
||||
w = 120;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
(*it).position_set(x, y);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_fade_unscaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Fade Unscaled (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_many_smooth_same_scaled_capi.h"
|
||||
|
||||
#define MANYNUM 8192
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < MANYNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
int n = rnd() % 100;
|
||||
int w = 3 + ((n * (60 - 3)) / 100);
|
||||
int h = 4 + ((n * (80 - 4)) / 100);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(1);
|
||||
o.evas::object::size_set(w, h);
|
||||
o.fill_set(0, 0, w, h);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w, h;
|
||||
img.evas::object::size_get(&w, &h);
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_many_smooth_same_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Many Smooth Down Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_nearest_same_scaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(0);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
|
||||
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_nearest_same_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Nearest Same Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_nearest_scaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(0);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
||||
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_nearest_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Nearest Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_nearest_solid_same_scaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(0);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& img : images)
|
||||
img.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
|
||||
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_nearest_solid_same_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Nearest Solid Same Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_nearest_solid_scaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(0);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
||||
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_nearest_solid_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Nearest Solid Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,91 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude1_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude1_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 1"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,94 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude1_few_capi.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 32
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(PACKAGE_DATA_DIR"/data/logo.png", NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(PACKAGE_DATA_DIR"/data/image.png", NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude1_few_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 1 Few"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude1_many_capi.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 320
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude1_many_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 1 Many"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,94 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude1_very_many_capi.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 1600
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i < (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude1_very_many_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 1 Very Many"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,92 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude2_capi.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i & 0x1)
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i & 0x1)
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude2_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 2"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,94 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude2_few_capi.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 32
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i & 0x1)
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i & 0x1)
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude2_few_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 2 Few"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude2_many_capi.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 320
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i & 0x1)
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i & 0x1)
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude2_many_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 2 Many"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,94 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude2_very_many_capi.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 1600
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i & 0x1)
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i & 0x1)
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude2_very_many_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 2 Very Many"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude3_capi.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude3_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 3"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude3_few_capi.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 32
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
|
||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude3_few_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 3 Few"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,92 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude3_many_capi.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 320
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude3_many_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 3 Many"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_occlude3_very_many_capi.h"
|
||||
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 1600
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
srnd();
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||
Evas_Coord y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.evas::object::position_set(x, y);
|
||||
}
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
if (i > (OBNUM / 2))
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_occlude3_very_many_cxx_start
|
||||
#define NAME "(C++) Image Blend Occlude 3 Very Many"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_smooth_same_scaled_capi.h"
|
||||
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(1);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
|
||||
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_smooth_same_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Smooth Same Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_smooth_scaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(1);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
||||
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_smooth_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Smooth Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_smooth_solid_same_scaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(1);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 40 + ((i % 3) * (w0 / 2));
|
||||
Evas_Coord h = 40 + ((i % 3) * (h0 / 2));
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_smooth_solid_same_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Smooth Solid Same Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_smooth_solid_scaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
|
||||
o.smooth_scale_set(1);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
||||
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_smooth_solid_scaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Smooth Solid Scaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_solid_border_capi.h"
|
||||
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(::build_path("frame.png"), NULL)); // XXX
|
||||
o.border_set(8, 8, 8, 8);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
Evas_Coord x, y, w, h, w0, h0;
|
||||
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
|
||||
{
|
||||
w0 = 80;
|
||||
h0 = 80;
|
||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW))) * w0 * 2);
|
||||
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * h0 * 2);
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
(*it).position_set(x, y);
|
||||
(*it).evas::object::size_set(w, h);
|
||||
(*it).fill_set(0, 0, w, h);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_border_cxx_start
|
||||
#define NAME "(C++) Image Blend Solid Border (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_solid_fade_pow2_unscaled_capi.h"
|
||||
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(::build_path("image.png"), NULL)); // XXX
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
int a = 256 - (1 << ((rnd() % 8) + 1));
|
||||
if (a < 128) a = 128;
|
||||
o.color_set(a, a, a, a);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
|
||||
{
|
||||
w = 120;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
(*it).position_set(x, y);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_fade_pow2_unscaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Solid Fade Power 2 Unscaled (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_solid_fade_unscaled_capi.h"
|
||||
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(::build_path("image.png"), NULL)); // XXX
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
int a = rnd()&0xff;
|
||||
o.color_set(a, a, a, a);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& img : images)
|
||||
img.visibility_set(false); // XXX
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
|
||||
{
|
||||
w = 120;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
(*it).position_set(x, y);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_fade_unscaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Solid Fade Unscaled (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_solid_middle_border_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("bar.png"), NULL)); // XXX
|
||||
o.border_set(6, 6, 6, 6);
|
||||
o.border_center_fill_set(EVAS_BORDER_FILL_SOLID);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
Evas_Coord w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
||||
Evas_Coord h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_middle_border_cxx_start
|
||||
#define NAME "(C++) Image Blend Solid Middle Border"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_solid_middle_unscaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.border_set(43, 48, 48, 83);
|
||||
o.border_center_fill_set(EVAS_BORDER_FILL_SOLID);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_middle_unscaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Solid Middle Unscaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,76 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_solid_unscaled_capi.h"
|
||||
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(::build_path("image.png"), NULL)); // XXX
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
|
||||
{
|
||||
w = 120;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
(*it).position_set(x, y);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_unscaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Solid Unscaled (C++)"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_blend_unscaled_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < OBNUM; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
|
||||
o.fill_set(0, 0, 120, 160);
|
||||
o.evas::object::size_set(120, 160);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup()
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w = 120;
|
||||
Evas_Coord h = 160;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_unscaled_cxx_start
|
||||
#define NAME "(C++) Image Blend Unscaled"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_crossfade_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
|
||||
evas::image o1(efl::eo::parent = canvas);
|
||||
images.push_back(o1);
|
||||
eo_do(o1._eo_ptr(), efl_file_set(build_path("im1.png"), NULL)); // XXX
|
||||
o1.fill_set(0, 0, 720, 420);
|
||||
o1.evas::object::size_set(720, 420);
|
||||
o1.visibility_set(true);
|
||||
|
||||
evas::image o2(efl::eo::parent = canvas);
|
||||
images.push_back(o2);
|
||||
eo_do(o2._eo_ptr(), efl_file_set(build_path("im2.png"), NULL)); // XXX
|
||||
o2.fill_set(0, 0, 720, 420);
|
||||
o2.evas::object::size_set(720, 420);
|
||||
o2.visibility_set(true);
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
if (!images.empty())
|
||||
{
|
||||
int a = f & 0x1f;
|
||||
a = ((a << 3) | (a >> 2)) & 0xff;
|
||||
evas::image img = images.back();
|
||||
img.evas::object::color_set(a, a, a, a);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_crossfade_cxx_start
|
||||
#define NAME "(C++) Image Crossfade"
|
||||
#define ICON "blend.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,94 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_data_argb_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||
o.colorspace_set(EVAS_COLORSPACE_ARGB8888);
|
||||
o.size_set(640, 480);
|
||||
o.alpha_set(0);
|
||||
o.fill_set(0, 0, 640, 480);
|
||||
o.evas::object::size_set(640, 480);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& img : images)
|
||||
img.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
int st;
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
unsigned int *data, *p;
|
||||
Evas_Coord w = 640;
|
||||
Evas_Coord h = 480;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
data = static_cast<unsigned int*>(img.data_get(1));
|
||||
st = img.stride_get();
|
||||
st = st >> 2;
|
||||
p = data;
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
*p = ((((x * y) + f) << 8) ^ (x - y - f)) | 0xff000000;
|
||||
p++;
|
||||
}
|
||||
p += (st - w);
|
||||
}
|
||||
img.data_set(data);
|
||||
img.data_update_add( 0, 0, w, h);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_data_argb_alpha_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||
o.colorspace_set(EVAS_COLORSPACE_ARGB8888);
|
||||
o.size_set(640, 480);
|
||||
o.alpha_set(1);
|
||||
o.fill_set(0, 0, 640, 480);
|
||||
o.evas::object::size_set(640, 480);
|
||||
o.visibility_set(true);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
int a, r, g, b;
|
||||
Evas_Coord w = 640;
|
||||
Evas_Coord h = 480;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
unsigned int *data = reinterpret_cast<unsigned int*>(img.data_get(1));
|
||||
int st = img.stride_get() >> 2;
|
||||
unsigned int *p = data;
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
r = (x * y / 7) + f;
|
||||
g = (x / 2);
|
||||
b = (y / 2);
|
||||
a = (x + y);
|
||||
r &= 0xff;
|
||||
g &= 0xff;
|
||||
b &= 0xff;
|
||||
a &= 0xff;
|
||||
r = (a * r) / 255;
|
||||
g = (a * g) / 255;
|
||||
b = (a * b) / 255;
|
||||
*p = (a << 24) | (r << 16) | (g << 8) | b;
|
||||
p++;
|
||||
}
|
||||
p += (st - w);
|
||||
}
|
||||
img.data_set(data);
|
||||
img.data_update_add( 0, 0, w, h);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_data_argb_alpha_cxx_start
|
||||
#define NAME "(C++) Image Data ARGB Alpha"
|
||||
#define ICON "data.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_data_argb_cxx_start
|
||||
#define NAME "(C++) Image Data ARGB"
|
||||
#define ICON "data.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,112 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_data_ycbcr601pl_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||
o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL);
|
||||
o.size_set(640, 480);
|
||||
o.alpha_set(0);
|
||||
o.fill_set(0, 0, 640, 480);
|
||||
o.evas::object::size_set(640, 480);
|
||||
o.visibility_set(true);
|
||||
yp = new unsigned char[640 * 480];
|
||||
up = new unsigned char[320 * 240];
|
||||
vp = new unsigned char[320 * 240];
|
||||
FILE *f = fopen(build_path("tp.yuv"), "rb");
|
||||
if (f)
|
||||
{
|
||||
fread(yp, 640 * 480, 1, f);
|
||||
fread(up, 320 * 240, 1, f);
|
||||
fread(vp, 320 * 240, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
unsigned char **data = static_cast<unsigned char**>(o.data_get(1));
|
||||
unsigned char **lp = data;
|
||||
for (int y = 0; y < 480; y++)
|
||||
{
|
||||
*lp = yp + (y * 640);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = up + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = vp + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
o.data_set(data);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
|
||||
delete yp;
|
||||
delete up;
|
||||
delete vp;
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w = 640;
|
||||
Evas_Coord h = 480;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
img.data_update_add( 0, 0, 640, 480);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_data_ycbcr601pl_cxx_start
|
||||
#define NAME "(C++) Image Data YCbCr 601 Pointer List"
|
||||
#define ICON "data.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,116 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||
o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL);
|
||||
o.size_set(640, 480);
|
||||
o.alpha_set(0);
|
||||
o.fill_set(0, 0, 640, 480);
|
||||
o.evas::object::size_set(640, 480);
|
||||
o.smooth_scale_set(0);
|
||||
o.visibility_set(true);
|
||||
yp = new unsigned char[640 * 480];
|
||||
up = new unsigned char[320 * 240];
|
||||
vp = new unsigned char[320 * 240];
|
||||
FILE *f = fopen(build_path("tp.yuv"), "rb");
|
||||
if (f)
|
||||
{
|
||||
fread(yp, 640 * 480, 1, f);
|
||||
fread(up, 320 * 240, 1, f);
|
||||
fread(vp, 320 * 240, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
unsigned char **data = static_cast<unsigned char**>(o.data_get(1));
|
||||
unsigned char **lp = data;
|
||||
for (int y = 0; y < 480; y++)
|
||||
{
|
||||
*lp = yp + (y * 640);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = up + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = vp + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
o.data_set(data);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
|
||||
delete yp;
|
||||
delete up;
|
||||
delete vp;
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
if (!m) m = evas_map_new(4);
|
||||
evas_map_smooth_set(m, 0);
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w = 640;
|
||||
Evas_Coord h = 480;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
|
||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||
img.map_enable_set(1);
|
||||
img.map_set(m);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_data_ycbcr601pl_map_nearest_solid_rotate_cxx_start
|
||||
#define NAME "(C++) Image Data YCbCr 601 Pointer List Map Nearest Solid Rotate"
|
||||
#define ICON "data.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,116 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_data_ycbcr601pl_map_solid_rotate_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||
o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL);
|
||||
o.size_set(640, 480);
|
||||
o.alpha_set(0);
|
||||
o.fill_set(0, 0, 640, 480);
|
||||
o.evas::object::size_set(640, 480);
|
||||
o.evas::object::visibility_set(true);
|
||||
yp = new unsigned char[640 * 480];
|
||||
up = new unsigned char[320 * 240];
|
||||
vp = new unsigned char[320 * 240];
|
||||
FILE *f = fopen(build_path("tp.yuv"), "rb");
|
||||
if (f)
|
||||
{
|
||||
fread(yp, 640 * 480, 1, f);
|
||||
fread(up, 320 * 240, 1, f);
|
||||
fread(vp, 320 * 240, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
unsigned char **data = static_cast<unsigned char**>(o.data_get(1));
|
||||
unsigned char **lp = data;
|
||||
for (int y = 0; y < 480; y++)
|
||||
{
|
||||
*lp = yp + (y * 640);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = up + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = vp + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
o.data_set(data);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
|
||||
delete yp;
|
||||
delete up;
|
||||
delete vp;
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
if (!m) m = evas_map_new(4);
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w = 640;
|
||||
Evas_Coord h = 480;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
|
||||
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
|
||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||
|
||||
img.map_enable_set(1);
|
||||
img.map_set(m);
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_data_ycbcr601pl_map_solid_rotate_cxx_start
|
||||
#define NAME "(C++) Image Data YCbCr 601 Pointer List Map Solid Rotate"
|
||||
#define ICON "data.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,145 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_data_ycbcr601pl_wide_stride_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
evas::image o(efl::eo::parent = canvas);
|
||||
images.push_back(o);
|
||||
o.content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||
o.colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL);
|
||||
o.size_set(320, 480);
|
||||
o.alpha_set(0);
|
||||
o.fill_set(0, 0, 640, 480);
|
||||
o.evas::object::size_set(640, 480);
|
||||
o.evas::object::visibility_set(true);
|
||||
yp = new unsigned char[640 * 480];
|
||||
up = new unsigned char[320 * 240];
|
||||
vp = new unsigned char[320 * 240];
|
||||
FILE *f = fopen(build_path("tp.yuv"), "rb");
|
||||
if (f)
|
||||
{
|
||||
fread(yp, 640 * 480, 1, f);
|
||||
fread(up, 320 * 240, 1, f);
|
||||
fread(vp, 320 * 240, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
unsigned char **data = static_cast<unsigned char**>(o.data_get(1));
|
||||
if (data)
|
||||
{
|
||||
unsigned char **lp = data;
|
||||
for (int y = 0; y < 480; y++)
|
||||
{
|
||||
*lp = yp + (y * 640);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = up + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = vp + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
o.data_set(data);
|
||||
o.data_update_add( 0, 0, 320, 480);
|
||||
}
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
|
||||
delete yp;
|
||||
delete up;
|
||||
delete vp;
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
for (evas::image& img : images)
|
||||
{
|
||||
Evas_Coord w = 640;
|
||||
Evas_Coord h = 480;
|
||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
img.fill_set(0, 0, w, h);
|
||||
|
||||
w = 320 - 16 + f;
|
||||
if (w < 1) w = 1;
|
||||
else if (w > 640) w = 640;
|
||||
|
||||
w &= ~0x1;
|
||||
|
||||
img.size_set(w, 480);
|
||||
unsigned char **data = static_cast<unsigned char**>(img.data_get(1));
|
||||
if (data)
|
||||
{
|
||||
unsigned char **lp = data;
|
||||
for (int y = 0; y < 480; y++)
|
||||
{
|
||||
*lp = yp + (y * 640);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = up + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
for (int y = 0; y < 240; y++)
|
||||
{
|
||||
*lp = vp + (y * 320);
|
||||
lp++;
|
||||
}
|
||||
img.data_set(data);
|
||||
img.data_update_add(0, 0, w, 480);
|
||||
}
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_data_ycbcr601pl_wide_stride_cxx_start
|
||||
#define NAME "(C++) Image Data YCbCr 601 Pointer List Wide Stride"
|
||||
#define ICON "data.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,234 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_map_3d_1_capi.h"
|
||||
|
||||
typedef struct _Point
|
||||
{
|
||||
Evas_Coord x, y, z, u, v;
|
||||
} Point;
|
||||
|
||||
typedef struct _Side
|
||||
{
|
||||
evas::image *o;
|
||||
Point pt[4];
|
||||
} Side;
|
||||
|
||||
typedef struct _Cube
|
||||
{
|
||||
Side side[6];
|
||||
} Cube;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static Cube *cubes[5];
|
||||
|
||||
#define POINT(n, p, xx, yy, zz, uu, vv) \
|
||||
c->side[n].pt[p].x = xx; \
|
||||
c->side[n].pt[p].y = yy; \
|
||||
c->side[n].pt[p].z = zz; \
|
||||
c->side[n].pt[p].u = uu; \
|
||||
c->side[n].pt[p].v = vv
|
||||
|
||||
static Cube *
|
||||
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
w -= (w / 2);
|
||||
h -= (h / 2);
|
||||
d -= (d / 2);
|
||||
Cube *c = new Cube {};
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
char buf[256];
|
||||
c->side[i].o = new evas::image(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||
eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
c->side[i].o->fill_set(0, 0, 256, 256);
|
||||
c->side[i].o->evas::object::size_set(256, 256);
|
||||
c->side[i].o->smooth_scale_set(0);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||
POINT(0, 1, w, -h, -d, 256, 0);
|
||||
POINT(0, 2, w, h, -d, 256, 256);
|
||||
POINT(0, 3, -w, h, -d, 0, 256);
|
||||
|
||||
POINT(1, 0, w, -h, -d, 0, 0);
|
||||
POINT(1, 1, w, -h, d, 256, 0);
|
||||
POINT(1, 2, w, h, d, 256, 256);
|
||||
POINT(1, 3, w, h, -d, 0, 256);
|
||||
|
||||
POINT(2, 0, w, -h, d, 0, 0);
|
||||
POINT(2, 1, -w, -h, d, 256, 0);
|
||||
POINT(2, 2, -w, h, d, 256, 256);
|
||||
POINT(2, 3, w, h, d, 0, 256);
|
||||
|
||||
POINT(3, 0, -w, -h, d, 0, 0);
|
||||
POINT(3, 1, -w, -h, -d, 256, 0);
|
||||
POINT(3, 2, -w, h, -d, 256, 256);
|
||||
POINT(3, 3, -w, h, d, 0, 256);
|
||||
|
||||
POINT(4, 0, -w, -h, d, 0, 0);
|
||||
POINT(4, 1, w, -h, d, 256, 0);
|
||||
POINT(4, 2, w, -h, -d, 256, 256);
|
||||
POINT(4, 3, -w, -h, -d, 0, 256);
|
||||
|
||||
POINT(5, 0, -w, h, -d, 0, 0);
|
||||
POINT(5, 1, w, h, -d, 256, 0);
|
||||
POINT(5, 2, w, h, d, 256, 256);
|
||||
POINT(5, 3, -w, h, d, 0, 256);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_pos(Cube *c,
|
||||
Evas_Coord x, Evas_Coord y, Evas_Coord z,
|
||||
double dx, double dy, double dz)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
int i, j, order[6], sorted;
|
||||
Evas_Coord mz[6];
|
||||
|
||||
if (!m) m = ::evas_map_new(4);
|
||||
::evas_map_smooth_set(m, 0);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
Evas_Coord tz[4];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
::evas_map_point_coord_set(m, j,
|
||||
c->side[i].pt[j].x + x,
|
||||
c->side[i].pt[j].y + y,
|
||||
c->side[i].pt[j].z + z);
|
||||
::evas_map_point_image_uv_set(m, j,
|
||||
c->side[i].pt[j].u,
|
||||
c->side[i].pt[j].v);
|
||||
::evas_map_point_color_set(m, j, 255, 255, 255, 255);
|
||||
}
|
||||
::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
|
||||
::evas_map_util_3d_lighting(m, -1000, -1000, -1000,
|
||||
255, 255, 255,
|
||||
20, 20, 20);
|
||||
::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||
if (evas_map_util_clockwise_get(m))
|
||||
{
|
||||
c->side[i].o->map_enable_set(1);
|
||||
c->side[i].o->map_set(m);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
c->side[i].o->visibility_set(false);
|
||||
}
|
||||
|
||||
order[i] = i;
|
||||
for (j = 0; j < 4; j++)
|
||||
::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
|
||||
mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
|
||||
}
|
||||
sorted = 0;
|
||||
do
|
||||
{
|
||||
sorted = 1;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (mz[order[i]] > mz[order[i + 1]])
|
||||
{
|
||||
j = order[i];
|
||||
order[i] = order[i + 1];
|
||||
order[i + 1] = j;
|
||||
sorted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!sorted);
|
||||
|
||||
c->side[order[0]].o->evas::object::raise();
|
||||
for (i = 1; i < 6; i++)
|
||||
c->side[order[i]].o->evas::object::stack_below(*c->side[order[i - 1]].o);
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_free(Cube *c)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
c->side[i].o->visibility_set(false); // XXX
|
||||
c->side[i].o->parent_set(efl::eo::base(nullptr));
|
||||
delete c->side[i].o;
|
||||
}
|
||||
delete c;
|
||||
}
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
cubes[0] = _cube_new(128, 128, 256);
|
||||
cubes[1] = _cube_new(256, 128, 128);
|
||||
cubes[2] = _cube_new(256, 256, 128);
|
||||
cubes[3] = _cube_new(128, 256, 128);
|
||||
cubes[4] = _cube_new(256, 256, 256);
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
_cube_free(cubes[0]);
|
||||
_cube_free(cubes[1]);
|
||||
_cube_free(cubes[2]);
|
||||
_cube_free(cubes[3]);
|
||||
_cube_free(cubes[4]);
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
_cube_pos(cubes[0],
|
||||
(win_w / 2) - 640, (win_h / 2) - 256, 512,
|
||||
f / 2.0, f, f / 3.0);
|
||||
_cube_pos(cubes[1],
|
||||
(win_w / 2) + 512, (win_h / 2) - 128, 384,
|
||||
f / 3.0, f / 2.0, f / 4.0);
|
||||
_cube_pos(cubes[2],
|
||||
(win_w / 2) - 384, (win_h / 2) + 128, 256,
|
||||
f / 2.0, f / 3.0, f);
|
||||
_cube_pos(cubes[3],
|
||||
(win_w / 2) + 256, (win_h / 2) + 64, 128,
|
||||
f, f / 5.0, f / 2.0);
|
||||
_cube_pos(cubes[4],
|
||||
(win_w / 2), (win_h / 2), 0,
|
||||
f / 4.0, f / 3.0, f / 5.0);
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_map_3d_1_cxx_start
|
||||
#define NAME "(C++) Image Map 3D 1"
|
||||
#define ICON "3d.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,232 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_map_3d_2_capi.h"
|
||||
|
||||
typedef struct _Point
|
||||
{
|
||||
Evas_Coord x, y, z, u, v;
|
||||
} Point;
|
||||
|
||||
typedef struct _Side
|
||||
{
|
||||
evas::image *o;
|
||||
Point pt[4];
|
||||
} Side;
|
||||
|
||||
typedef struct _Cube
|
||||
{
|
||||
Side side[6];
|
||||
} Cube;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static Cube *cubes[5];
|
||||
|
||||
#define POINT(n, p, xx, yy, zz, uu, vv) \
|
||||
c->side[n].pt[p].x = xx; \
|
||||
c->side[n].pt[p].y = yy; \
|
||||
c->side[n].pt[p].z = zz; \
|
||||
c->side[n].pt[p].u = uu; \
|
||||
c->side[n].pt[p].v = vv
|
||||
|
||||
static Cube *
|
||||
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
w -= (w / 2);
|
||||
h -= (h / 2);
|
||||
d -= (d / 2);
|
||||
Cube *c = new Cube {};
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
char buf[256];
|
||||
c->side[i].o = new evas::image(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||
eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
c->side[i].o->fill_set(0, 0, 256, 256);
|
||||
c->side[i].o->evas::object::size_set(256, 256);
|
||||
c->side[i].o->evas::object::visibility_set(true);
|
||||
}
|
||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||
POINT(0, 1, w, -h, -d, 256, 0);
|
||||
POINT(0, 2, w, h, -d, 256, 256);
|
||||
POINT(0, 3, -w, h, -d, 0, 256);
|
||||
|
||||
POINT(1, 0, w, -h, -d, 0, 0);
|
||||
POINT(1, 1, w, -h, d, 256, 0);
|
||||
POINT(1, 2, w, h, d, 256, 256);
|
||||
POINT(1, 3, w, h, -d, 0, 256);
|
||||
|
||||
POINT(2, 0, w, -h, d, 0, 0);
|
||||
POINT(2, 1, -w, -h, d, 256, 0);
|
||||
POINT(2, 2, -w, h, d, 256, 256);
|
||||
POINT(2, 3, w, h, d, 0, 256);
|
||||
|
||||
POINT(3, 0, -w, -h, d, 0, 0);
|
||||
POINT(3, 1, -w, -h, -d, 256, 0);
|
||||
POINT(3, 2, -w, h, -d, 256, 256);
|
||||
POINT(3, 3, -w, h, d, 0, 256);
|
||||
|
||||
POINT(4, 0, -w, -h, d, 0, 0);
|
||||
POINT(4, 1, w, -h, d, 256, 0);
|
||||
POINT(4, 2, w, -h, -d, 256, 256);
|
||||
POINT(4, 3, -w, -h, -d, 0, 256);
|
||||
|
||||
POINT(5, 0, -w, h, -d, 0, 0);
|
||||
POINT(5, 1, w, h, -d, 256, 0);
|
||||
POINT(5, 2, w, h, d, 256, 256);
|
||||
POINT(5, 3, -w, h, d, 0, 256);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_pos(Cube *c,
|
||||
Evas_Coord x, Evas_Coord y, Evas_Coord z,
|
||||
double dx, double dy, double dz)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
int i, j, order[6], sorted;
|
||||
Evas_Coord mz[6];
|
||||
|
||||
if (!m) m = evas_map_new(4);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
Evas_Coord tz[4];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
::evas_map_point_coord_set(m, j,
|
||||
c->side[i].pt[j].x + x,
|
||||
c->side[i].pt[j].y + y,
|
||||
c->side[i].pt[j].z + z);
|
||||
::evas_map_point_image_uv_set(m, j,
|
||||
c->side[i].pt[j].u,
|
||||
c->side[i].pt[j].v);
|
||||
::evas_map_point_color_set(m, j, 255, 255, 255, 255);
|
||||
}
|
||||
::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
|
||||
::evas_map_util_3d_lighting(m, -1000, -1000, -1000,
|
||||
255, 255, 255,
|
||||
20, 20, 20);
|
||||
::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||
if (::evas_map_util_clockwise_get(m))
|
||||
{
|
||||
c->side[i].o->map_enable_set(1);
|
||||
c->side[i].o->map_set(m);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
c->side[i].o->visibility_set(false);
|
||||
}
|
||||
|
||||
order[i] = i;
|
||||
for (j = 0; j < 4; j++)
|
||||
::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
|
||||
mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
|
||||
}
|
||||
sorted = 0;
|
||||
do
|
||||
{
|
||||
sorted = 1;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (mz[order[i]] > mz[order[i + 1]])
|
||||
{
|
||||
j = order[i];
|
||||
order[i] = order[i + 1];
|
||||
order[i + 1] = j;
|
||||
sorted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!sorted);
|
||||
|
||||
c->side[order[0]].o->raise();
|
||||
for (i = 1; i < 6; i++)
|
||||
c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_free(Cube *c)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
c->side[i].o->visibility_set(false); // XXX
|
||||
c->side[i].o->parent_set(efl::eo::base(nullptr));
|
||||
delete c->side[i].o;
|
||||
}
|
||||
delete c;
|
||||
}
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
cubes[0] = _cube_new(128, 128, 256);
|
||||
cubes[1] = _cube_new(256, 128, 128);
|
||||
cubes[2] = _cube_new(256, 256, 128);
|
||||
cubes[3] = _cube_new(128, 256, 128);
|
||||
cubes[4] = _cube_new(256, 256, 256);
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
_cube_free(cubes[0]);
|
||||
_cube_free(cubes[1]);
|
||||
_cube_free(cubes[2]);
|
||||
_cube_free(cubes[3]);
|
||||
_cube_free(cubes[4]);
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
_cube_pos(cubes[0],
|
||||
(win_w / 2) - 640, (win_h / 2) - 256, 512,
|
||||
f / 2.0, f, f / 3.0);
|
||||
_cube_pos(cubes[1],
|
||||
(win_w / 2) + 512, (win_h / 2) - 128, 384,
|
||||
f / 3.0, f / 2.0, f / 4.0);
|
||||
_cube_pos(cubes[2],
|
||||
(win_w / 2) - 384, (win_h / 2) + 128, 256,
|
||||
f / 2.0, f / 3.0, f);
|
||||
_cube_pos(cubes[3],
|
||||
(win_w / 2) + 256, (win_h / 2) + 64, 128,
|
||||
f, f / 5.0, f / 2.0);
|
||||
_cube_pos(cubes[4],
|
||||
(win_w / 2), (win_h / 2), 0,
|
||||
f / 4.0, f / 3.0, f / 5.0);
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_map_3d_2_cxx_start
|
||||
#define NAME "(C++) Image Map 3D 2"
|
||||
#define ICON "3d.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,228 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_map_3d_3_capi.h"
|
||||
|
||||
typedef struct _Point
|
||||
{
|
||||
Evas_Coord x, y, z, u, v;
|
||||
} Point;
|
||||
|
||||
typedef struct _Side
|
||||
{
|
||||
evas::image *o;
|
||||
Point pt[4];
|
||||
} Side;
|
||||
|
||||
typedef struct _Cube
|
||||
{
|
||||
Side side[6];
|
||||
} Cube;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static Cube *cubes[5];
|
||||
|
||||
#define POINT(n, p, xx, yy, zz, uu, vv) \
|
||||
c->side[n].pt[p].x = xx; \
|
||||
c->side[n].pt[p].y = yy; \
|
||||
c->side[n].pt[p].z = zz; \
|
||||
c->side[n].pt[p].u = uu; \
|
||||
c->side[n].pt[p].v = vv
|
||||
|
||||
static Cube *
|
||||
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
Cube *c;
|
||||
|
||||
w -= (w / 2);
|
||||
h -= (h / 2);
|
||||
d -= (d / 2);
|
||||
c = new Cube {};
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
char buf[256];
|
||||
c->side[i].o = new evas::image(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||
eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
c->side[i].o->fill_set(0, 0, 256, 256);
|
||||
c->side[i].o->evas::object::size_set(256, 256);
|
||||
c->side[i].o->smooth_scale_set(0);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||
POINT(0, 1, w, -h, -d, 256, 0);
|
||||
POINT(0, 2, w, h, -d, 256, 256);
|
||||
POINT(0, 3, -w, h, -d, 0, 256);
|
||||
|
||||
POINT(1, 0, w, -h, -d, 0, 0);
|
||||
POINT(1, 1, w, -h, d, 256, 0);
|
||||
POINT(1, 2, w, h, d, 256, 256);
|
||||
POINT(1, 3, w, h, -d, 0, 256);
|
||||
|
||||
POINT(2, 0, w, -h, d, 0, 0);
|
||||
POINT(2, 1, -w, -h, d, 256, 0);
|
||||
POINT(2, 2, -w, h, d, 256, 256);
|
||||
POINT(2, 3, w, h, d, 0, 256);
|
||||
|
||||
POINT(3, 0, -w, -h, d, 0, 0);
|
||||
POINT(3, 1, -w, -h, -d, 256, 0);
|
||||
POINT(3, 2, -w, h, -d, 256, 256);
|
||||
POINT(3, 3, -w, h, d, 0, 256);
|
||||
|
||||
POINT(4, 0, -w, -h, d, 0, 0);
|
||||
POINT(4, 1, w, -h, d, 256, 0);
|
||||
POINT(4, 2, w, -h, -d, 256, 256);
|
||||
POINT(4, 3, -w, -h, -d, 0, 256);
|
||||
|
||||
POINT(5, 0, -w, h, -d, 0, 0);
|
||||
POINT(5, 1, w, h, -d, 256, 0);
|
||||
POINT(5, 2, w, h, d, 256, 256);
|
||||
POINT(5, 3, -w, h, d, 0, 256);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_pos(Cube *c,
|
||||
Evas_Coord x, Evas_Coord y, Evas_Coord z,
|
||||
double dx, double dy, double dz)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
int i, j, order[6], sorted;
|
||||
Evas_Coord mz[6];
|
||||
|
||||
if (!m) m = evas_map_new(4);
|
||||
::evas_map_smooth_set(m, 0);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
Evas_Coord tz[4];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
::evas_map_point_coord_set(m, j,
|
||||
c->side[i].pt[j].x + x,
|
||||
c->side[i].pt[j].y + y,
|
||||
c->side[i].pt[j].z + z);
|
||||
::evas_map_point_image_uv_set(m, j,
|
||||
c->side[i].pt[j].u,
|
||||
c->side[i].pt[j].v);
|
||||
::evas_map_point_color_set(m, j, 255, 255, 255, 128);
|
||||
}
|
||||
::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
|
||||
::evas_map_util_3d_lighting(m, -1000, -1000, -1000,
|
||||
255, 255, 255,
|
||||
20, 20, 20);
|
||||
::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||
c->side[i].o->map_enable_set(1);
|
||||
c->side[i].o->map_set(m);
|
||||
|
||||
order[i] = i;
|
||||
for (j = 0; j < 4; j++)
|
||||
::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
|
||||
mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
|
||||
}
|
||||
sorted = 0;
|
||||
do
|
||||
{
|
||||
sorted = 1;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (mz[order[i]] > mz[order[i + 1]])
|
||||
{
|
||||
j = order[i];
|
||||
order[i] = order[i + 1];
|
||||
order[i + 1] = j;
|
||||
sorted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!sorted);
|
||||
|
||||
c->side[order[0]].o->raise();
|
||||
for (i = 1; i < 6; i++)
|
||||
c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_free(Cube *c)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
c->side[i].o->visibility_set(false); // XXX
|
||||
c->side[i].o->parent_set(efl::eo::base(nullptr));
|
||||
delete c->side[i].o;
|
||||
}
|
||||
delete c;
|
||||
}
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
cubes[0] = _cube_new(128, 128, 256);
|
||||
cubes[1] = _cube_new(256, 128, 128);
|
||||
cubes[2] = _cube_new(256, 256, 128);
|
||||
cubes[3] = _cube_new(128, 256, 128);
|
||||
cubes[4] = _cube_new(256, 256, 256);
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
_cube_free(cubes[0]);
|
||||
_cube_free(cubes[1]);
|
||||
_cube_free(cubes[2]);
|
||||
_cube_free(cubes[3]);
|
||||
_cube_free(cubes[4]);
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
_cube_pos(cubes[0],
|
||||
(win_w / 2) - 640, (win_h / 2) - 256, 512,
|
||||
f / 2.0, f, f / 3.0);
|
||||
_cube_pos(cubes[1],
|
||||
(win_w / 2) + 512, (win_h / 2) - 128, 384,
|
||||
f / 3.0, f / 2.0, f / 4.0);
|
||||
_cube_pos(cubes[2],
|
||||
(win_w / 2) - 384, (win_h / 2) + 128, 256,
|
||||
f / 2.0, f / 3.0, f);
|
||||
_cube_pos(cubes[3],
|
||||
(win_w / 2) + 256, (win_h / 2) + 64, 128,
|
||||
f, f / 5.0, f / 2.0);
|
||||
_cube_pos(cubes[4],
|
||||
(win_w / 2), (win_h / 2), 0,
|
||||
f / 4.0, f / 3.0, f / 5.0);
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_map_3d_3_cxx_start
|
||||
#define NAME "(C++) Image Map 3D 3"
|
||||
#define ICON "3d.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,223 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_map_3d_4_capi.h"
|
||||
|
||||
typedef struct _Point
|
||||
{
|
||||
Evas_Coord x, y, z, u, v;
|
||||
} Point;
|
||||
|
||||
typedef struct _Side
|
||||
{
|
||||
evas::image *o;
|
||||
Point pt[4];
|
||||
} Side;
|
||||
|
||||
typedef struct _Cube
|
||||
{
|
||||
Side side[6];
|
||||
} Cube;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static Cube *cubes[5];
|
||||
|
||||
#define POINT(n, p, xx, yy, zz, uu, vv) \
|
||||
c->side[n].pt[p].x = xx; \
|
||||
c->side[n].pt[p].y = yy; \
|
||||
c->side[n].pt[p].z = zz; \
|
||||
c->side[n].pt[p].u = uu; \
|
||||
c->side[n].pt[p].v = vv
|
||||
|
||||
static Cube *
|
||||
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
w -= (w / 2);
|
||||
h -= (h / 2);
|
||||
d -= (d / 2);
|
||||
Cube *c = new Cube {};
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
char buf[256];
|
||||
c->side[i].o = new evas::image(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||
eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
c->side[i].o->fill_set(0, 0, 256, 256);
|
||||
c->side[i].o->evas::object::size_set(256, 256);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||
POINT(0, 1, w, -h, -d, 256, 0);
|
||||
POINT(0, 2, w, h, -d, 256, 256);
|
||||
POINT(0, 3, -w, h, -d, 0, 256);
|
||||
|
||||
POINT(1, 0, w, -h, -d, 0, 0);
|
||||
POINT(1, 1, w, -h, d, 256, 0);
|
||||
POINT(1, 2, w, h, d, 256, 256);
|
||||
POINT(1, 3, w, h, -d, 0, 256);
|
||||
|
||||
POINT(2, 0, w, -h, d, 0, 0);
|
||||
POINT(2, 1, -w, -h, d, 256, 0);
|
||||
POINT(2, 2, -w, h, d, 256, 256);
|
||||
POINT(2, 3, w, h, d, 0, 256);
|
||||
|
||||
POINT(3, 0, -w, -h, d, 0, 0);
|
||||
POINT(3, 1, -w, -h, -d, 256, 0);
|
||||
POINT(3, 2, -w, h, -d, 256, 256);
|
||||
POINT(3, 3, -w, h, d, 0, 256);
|
||||
|
||||
POINT(4, 0, -w, -h, d, 0, 0);
|
||||
POINT(4, 1, w, -h, d, 256, 0);
|
||||
POINT(4, 2, w, -h, -d, 256, 256);
|
||||
POINT(4, 3, -w, -h, -d, 0, 256);
|
||||
|
||||
POINT(5, 0, -w, h, -d, 0, 0);
|
||||
POINT(5, 1, w, h, -d, 256, 0);
|
||||
POINT(5, 2, w, h, d, 256, 256);
|
||||
POINT(5, 3, -w, h, d, 0, 256);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_pos(Cube *c,
|
||||
Evas_Coord x, Evas_Coord y, Evas_Coord z,
|
||||
double dx, double dy, double dz)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
int i, j, order[6], sorted;
|
||||
Evas_Coord mz[6];
|
||||
|
||||
if (!m) m = evas_map_new(4);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
Evas_Coord tz[4];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
evas_map_point_coord_set(m, j,
|
||||
c->side[i].pt[j].x + x,
|
||||
c->side[i].pt[j].y + y,
|
||||
c->side[i].pt[j].z + z);
|
||||
evas_map_point_image_uv_set(m, j,
|
||||
c->side[i].pt[j].u,
|
||||
c->side[i].pt[j].v);
|
||||
evas_map_point_color_set(m, j, 255, 255, 255, 128);
|
||||
}
|
||||
evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
|
||||
evas_map_util_3d_lighting(m, -1000, -1000, -1000,
|
||||
255, 255, 255,
|
||||
20, 20, 20);
|
||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||
c->side[i].o->map_enable_set(1);
|
||||
c->side[i].o->map_set(m);
|
||||
|
||||
order[i] = i;
|
||||
for (j = 0; j < 4; j++)
|
||||
evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
|
||||
mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
|
||||
}
|
||||
sorted = 0;
|
||||
do
|
||||
{
|
||||
sorted = 1;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (mz[order[i]] > mz[order[i + 1]])
|
||||
{
|
||||
j = order[i];
|
||||
order[i] = order[i + 1];
|
||||
order[i + 1] = j;
|
||||
sorted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!sorted);
|
||||
|
||||
c->side[order[0]].o->raise();
|
||||
for (i = 1; i < 6; i++)
|
||||
c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_free(Cube *c)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
c->side[i].o->visibility_set(false); // XXX
|
||||
c->side[i].o->parent_set(efl::eo::base(nullptr));
|
||||
delete c->side[i].o;
|
||||
}
|
||||
delete c;
|
||||
}
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
cubes[0] = _cube_new(128, 128, 256);
|
||||
cubes[1] = _cube_new(256, 128, 128);
|
||||
cubes[2] = _cube_new(256, 256, 128);
|
||||
cubes[3] = _cube_new(128, 256, 128);
|
||||
cubes[4] = _cube_new(256, 256, 256);
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
_cube_free(cubes[0]);
|
||||
_cube_free(cubes[1]);
|
||||
_cube_free(cubes[2]);
|
||||
_cube_free(cubes[3]);
|
||||
_cube_free(cubes[4]);
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
_cube_pos(cubes[0],
|
||||
(win_w / 2) - 640, (win_h / 2) - 256, 512,
|
||||
f / 2.0, f, f / 3.0);
|
||||
_cube_pos(cubes[1],
|
||||
(win_w / 2) + 512, (win_h / 2) - 128, 384,
|
||||
f / 3.0, f / 2.0, f / 4.0);
|
||||
_cube_pos(cubes[2],
|
||||
(win_w / 2) - 384, (win_h / 2) + 128, 256,
|
||||
f / 2.0, f / 3.0, f);
|
||||
_cube_pos(cubes[3],
|
||||
(win_w / 2) + 256, (win_h / 2) + 64, 128,
|
||||
f, f / 5.0, f / 2.0);
|
||||
_cube_pos(cubes[4],
|
||||
(win_w / 2), (win_h / 2), 0,
|
||||
f / 4.0, f / 3.0, f / 5.0);
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_map_3d_4_cxx_start
|
||||
#define NAME "(C++) Image Map 3D 4"
|
||||
#define ICON "3d.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,214 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_map_3d_5_capi.h"
|
||||
|
||||
typedef struct _Point
|
||||
{
|
||||
Evas_Coord x, y, z, u, v;
|
||||
} Point;
|
||||
|
||||
typedef struct _Side
|
||||
{
|
||||
evas::image *o;
|
||||
Point pt[4];
|
||||
} Side;
|
||||
|
||||
typedef struct _Cube
|
||||
{
|
||||
Side side[6];
|
||||
} Cube;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static Cube *cubes[1];
|
||||
|
||||
#define POINT(n, p, xx, yy, zz, uu, vv) \
|
||||
c->side[n].pt[p].x = xx; \
|
||||
c->side[n].pt[p].y = yy; \
|
||||
c->side[n].pt[p].z = zz; \
|
||||
c->side[n].pt[p].u = uu; \
|
||||
c->side[n].pt[p].v = vv
|
||||
|
||||
static Cube *
|
||||
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
w -= (w / 2);
|
||||
h -= (h / 2);
|
||||
d -= (d / 2);
|
||||
Cube *c = new Cube {};
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
char buf[256];
|
||||
c->side[i].o = new evas::image(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
|
||||
eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
c->side[i].o->fill_set(0, 0, 720, 420);
|
||||
c->side[i].o->evas::object::size_set(720, 420);
|
||||
c->side[i].o->smooth_scale_set(0);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||
POINT(0, 1, w, -h, -d, 720, 0);
|
||||
POINT(0, 2, w, h, -d, 720, 420);
|
||||
POINT(0, 3, -w, h, -d, 0, 420);
|
||||
|
||||
POINT(1, 0, w, -h, -d, 0, 0);
|
||||
POINT(1, 1, w, -h, d, 720, 0);
|
||||
POINT(1, 2, w, h, d, 720, 420);
|
||||
POINT(1, 3, w, h, -d, 0, 420);
|
||||
|
||||
POINT(2, 0, w, -h, d, 0, 0);
|
||||
POINT(2, 1, -w, -h, d, 720, 0);
|
||||
POINT(2, 2, -w, h, d, 720, 420);
|
||||
POINT(2, 3, w, h, d, 0, 420);
|
||||
|
||||
POINT(3, 0, -w, -h, d, 0, 0);
|
||||
POINT(3, 1, -w, -h, -d, 720, 0);
|
||||
POINT(3, 2, -w, h, -d, 720, 420);
|
||||
POINT(3, 3, -w, h, d, 0, 420);
|
||||
|
||||
POINT(4, 0, -w, -h, d, 0, 0);
|
||||
POINT(4, 1, w, -h, d, 720, 0);
|
||||
POINT(4, 2, w, -h, -d, 720, 420);
|
||||
POINT(4, 3, -w, -h, -d, 0, 420);
|
||||
|
||||
POINT(5, 0, -w, h, -d, 0, 0);
|
||||
POINT(5, 1, w, h, -d, 720, 0);
|
||||
POINT(5, 2, w, h, d, 720, 420);
|
||||
POINT(5, 3, -w, h, d, 0, 420);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_pos(Cube *c,
|
||||
Evas_Coord x, Evas_Coord y, Evas_Coord z,
|
||||
double dx, double dy, double dz)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
int i, j, order[6], sorted;
|
||||
Evas_Coord mz[6];
|
||||
|
||||
if (!m) m = ::evas_map_new(4);
|
||||
::evas_map_smooth_set(m, 0);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
Evas_Coord tz[4];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
::evas_map_point_coord_set(m, j,
|
||||
c->side[i].pt[j].x + x,
|
||||
c->side[i].pt[j].y + y,
|
||||
c->side[i].pt[j].z + z);
|
||||
::evas_map_point_image_uv_set(m, j,
|
||||
c->side[i].pt[j].u,
|
||||
c->side[i].pt[j].v);
|
||||
::evas_map_point_color_set(m, j, 255, 255, 255, 255);
|
||||
}
|
||||
::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
|
||||
::evas_map_util_3d_lighting(m, -1000, win_h / 2, -1000,
|
||||
255, 255, 255,
|
||||
20, 20, 20);
|
||||
::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
|
||||
if (::evas_map_util_clockwise_get(m))
|
||||
{
|
||||
c->side[i].o->map_enable_set(1);
|
||||
c->side[i].o->map_set(m);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
c->side[i].o->visibility_set(false);
|
||||
}
|
||||
|
||||
order[i] = i;
|
||||
for (j = 0; j < 4; j++)
|
||||
::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
|
||||
mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
|
||||
}
|
||||
sorted = 0;
|
||||
do
|
||||
{
|
||||
sorted = 1;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (mz[order[i]] > mz[order[i + 1]])
|
||||
{
|
||||
j = order[i];
|
||||
order[i] = order[i + 1];
|
||||
order[i + 1] = j;
|
||||
sorted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!sorted);
|
||||
|
||||
c->side[order[0]].o->raise();
|
||||
for (i = 1; i < 6; i++)
|
||||
c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_free(Cube *c)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
c->side[i].o->visibility_set(false); // XXX
|
||||
c->side[i].o->parent_set(efl::eo::base(nullptr));
|
||||
delete c->side[i].o;
|
||||
}
|
||||
delete c;
|
||||
}
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
cubes[0] = _cube_new(720, 420, 720);
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
_cube_free(cubes[0]);
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
_cube_pos(cubes[0],
|
||||
(win_w / 2), (win_h / 2), 0,
|
||||
0, f, 0);
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_map_3d_5_cxx_start
|
||||
#define NAME "(C++) Image Map 3D 5"
|
||||
#define ICON "3d.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,211 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_map_3d_6_capi.h"
|
||||
|
||||
typedef struct _Point
|
||||
{
|
||||
Evas_Coord x, y, z, u, v;
|
||||
} Point;
|
||||
|
||||
typedef struct _Side
|
||||
{
|
||||
evas::image *o;
|
||||
Point pt[4];
|
||||
} Side;
|
||||
|
||||
typedef struct _Cube
|
||||
{
|
||||
Side side[6];
|
||||
} Cube;
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static Cube *cubes[1];
|
||||
|
||||
#define POINT(n, p, xx, yy, zz, uu, vv) \
|
||||
c->side[n].pt[p].x = xx; \
|
||||
c->side[n].pt[p].y = yy; \
|
||||
c->side[n].pt[p].z = zz; \
|
||||
c->side[n].pt[p].u = uu; \
|
||||
c->side[n].pt[p].v = vv
|
||||
|
||||
static Cube *
|
||||
_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
w -= (w / 2);
|
||||
h -= (h / 2);
|
||||
d -= (d / 2);
|
||||
Cube *c = new Cube {};
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
char buf[256];
|
||||
c->side[i].o = new evas::image(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
|
||||
eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
c->side[i].o->fill_set(0, 0, 720, 420);
|
||||
c->side[i].o->evas::object::size_set(720, 420);
|
||||
c->side[i].o->smooth_scale_set(0);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||
POINT(0, 1, w, -h, -d, 720, 0);
|
||||
POINT(0, 2, w, h, -d, 720, 420);
|
||||
POINT(0, 3, -w, h, -d, 0, 420);
|
||||
|
||||
POINT(1, 0, w, -h, -d, 0, 0);
|
||||
POINT(1, 1, w, -h, d, 720, 0);
|
||||
POINT(1, 2, w, h, d, 720, 420);
|
||||
POINT(1, 3, w, h, -d, 0, 420);
|
||||
|
||||
POINT(2, 0, w, -h, d, 0, 0);
|
||||
POINT(2, 1, -w, -h, d, 720, 0);
|
||||
POINT(2, 2, -w, h, d, 720, 420);
|
||||
POINT(2, 3, w, h, d, 0, 420);
|
||||
|
||||
POINT(3, 0, -w, -h, d, 0, 0);
|
||||
POINT(3, 1, -w, -h, -d, 720, 0);
|
||||
POINT(3, 2, -w, h, -d, 720, 420);
|
||||
POINT(3, 3, -w, h, d, 0, 420);
|
||||
|
||||
POINT(4, 0, -w, -h, d, 0, 0);
|
||||
POINT(4, 1, w, -h, d, 720, 0);
|
||||
POINT(4, 2, w, -h, -d, 720, 420);
|
||||
POINT(4, 3, -w, -h, -d, 0, 420);
|
||||
|
||||
POINT(5, 0, -w, h, -d, 0, 0);
|
||||
POINT(5, 1, w, h, -d, 720, 0);
|
||||
POINT(5, 2, w, h, d, 720, 420);
|
||||
POINT(5, 3, -w, h, d, 0, 420);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_pos(Cube *c,
|
||||
Evas_Coord x, Evas_Coord y, Evas_Coord z,
|
||||
double dx, double dy, double dz)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
int i, j, order[6], sorted;
|
||||
Evas_Coord mz[6];
|
||||
|
||||
if (!m) m = ::evas_map_new(4);
|
||||
::evas_map_smooth_set(m, 0);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
Evas_Coord tz[4];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
::evas_map_point_coord_set(m, j,
|
||||
c->side[i].pt[j].x + x,
|
||||
c->side[i].pt[j].y + y,
|
||||
c->side[i].pt[j].z + z);
|
||||
::evas_map_point_image_uv_set(m, j,
|
||||
c->side[i].pt[j].u,
|
||||
c->side[i].pt[j].v);
|
||||
::evas_map_point_color_set(m, j, 255, 255, 255, 255);
|
||||
}
|
||||
::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
|
||||
::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
|
||||
if (::evas_map_util_clockwise_get(m))
|
||||
{
|
||||
c->side[i].o->map_enable_set(1);
|
||||
c->side[i].o->map_set(m);
|
||||
c->side[i].o->visibility_set(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
c->side[i].o->visibility_set(false);
|
||||
}
|
||||
|
||||
order[i] = i;
|
||||
for (j = 0; j < 4; j++)
|
||||
::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
|
||||
mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
|
||||
}
|
||||
sorted = 0;
|
||||
do
|
||||
{
|
||||
sorted = 1;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (mz[order[i]] > mz[order[i + 1]])
|
||||
{
|
||||
j = order[i];
|
||||
order[i] = order[i + 1];
|
||||
order[i + 1] = j;
|
||||
sorted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (!sorted);
|
||||
|
||||
c->side[order[0]].o->raise();
|
||||
for (i = 1; i < 6; i++)
|
||||
c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
|
||||
}
|
||||
|
||||
static void
|
||||
_cube_free(Cube *c)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
c->side[i].o->visibility_set(false); // XXX
|
||||
c->side[i].o->parent_set(efl::eo::base(nullptr));
|
||||
delete c->side[i].o;
|
||||
}
|
||||
delete c;
|
||||
}
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
cubes[0] = _cube_new(720, 420, 720);
|
||||
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
_cube_free(cubes[0]);
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
_cube_pos(cubes[0],
|
||||
(win_w / 2), (win_h / 2), 0,
|
||||
0, f, 0);
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_map_3d_6_cxx_start
|
||||
#define NAME "(C++) Image Map 3D 6"
|
||||
#define ICON "3d.png"
|
||||
|
||||
#ifdef UI
|
||||
_ui_menu_item_add(ICON, NAME, FNAME);
|
||||
#endif
|
||||
|
||||
#ifdef PROTO
|
||||
void FNAME(void);
|
||||
#endif
|
||||
|
||||
#ifndef EXPEDITE_CXX_TEST_IMPL
|
||||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,206 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include "Eo.hh"
|
||||
#include "Eina.hh"
|
||||
#include "Evas.hh"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define EXPEDITE_CXX_TEST_IMPL
|
||||
#include "image_map_3d_flow_capi.h"
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
#define CNUM 48
|
||||
|
||||
/* private data */
|
||||
static efl::eina::list<evas::image> images;
|
||||
static efl::eina::list<evas::image> reflec;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
evas::canvas canvas(::eo_ref(G_evas));
|
||||
for (int i = 0; i < CNUM; i++)
|
||||
{
|
||||
char buf[256];
|
||||
|
||||
evas::image o1(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
||||
eo_do(o1._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
o1.fill_set(0, 0, 256, 256);
|
||||
o1.evas::object::size_set(256, 256);
|
||||
o1.smooth_scale_set(0);
|
||||
o1.visibility_set(true);
|
||||
images.push_back(o1);
|
||||
|
||||
evas::image o2(efl::eo::parent = canvas);
|
||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
||||
eo_do(o2._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||
o2.fill_set(0, 0, 256, 256);
|
||||
o2.size_set(256, 256);
|
||||
o2.smooth_scale_set(0);
|
||||
o2.visibility_set(true);
|
||||
reflec.push_back(o2);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
for (evas::image& i : images)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
images.clear();
|
||||
|
||||
for (evas::image& i : reflec)
|
||||
i.parent_set(efl::eo::base(nullptr));
|
||||
reflec.clear();
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
static Evas_Map *m = NULL;
|
||||
int center = 150;
|
||||
|
||||
if (!m) m = evas_map_new(4);
|
||||
evas_map_smooth_set(m, 0);
|
||||
|
||||
efl::eina::list<evas::object>::iterator
|
||||
it_i = images.begin(), end_i = images.end(),
|
||||
it_r = reflec.begin(), end_r = reflec.end();
|
||||
|
||||
for (int i = 0; i < CNUM && it_i != end_i && it_r != end_r; i++)
|
||||
{
|
||||
Evas_Coord x = (win_w / 2);
|
||||
Evas_Coord y = (win_h / 2);
|
||||
Evas_Coord w = 256;
|
||||
Evas_Coord h = 256;
|
||||
Evas_Coord c = (i - (CNUM / 2)) * (w / 4);
|
||||
c += (f % (6 * (w / 4)));
|
||||
|
||||
double ang = (double)c / (double)center;
|
||||
if (ang > 0.0) ang = ang * ang;
|
||||
else ang = -ang * ang;
|
||||
ang *= -90.0;
|
||||
if (ang > 90.0) ang = 90.0;
|
||||
else if (ang < -90.0) ang = -90.0;
|
||||
|
||||
if ((c > (-center)) && (c <= (center)))
|
||||
{
|
||||
double n = (double)c / (double)center;
|
||||
if (c > 0)
|
||||
{
|
||||
n = 1.0 - n;
|
||||
n = 1.0 - (n * n);
|
||||
}
|
||||
else
|
||||
{
|
||||
n = -(-1.0 - n);
|
||||
n = -(1.0 - (n * n));
|
||||
}
|
||||
c = n * center * 2.0;
|
||||
}
|
||||
else if (c <= (-center))
|
||||
c = (c + center) - (center * 2);
|
||||
else if (c > (center))
|
||||
c = (c - center) + (center * 2);
|
||||
|
||||
Evas_Coord z = 0;
|
||||
if ((c > (-center)) && (c <= (center)))
|
||||
{
|
||||
z = (c * (w / 2)) / center;
|
||||
if (z < 0) z = -z;
|
||||
z = (w / 2) - z;
|
||||
}
|
||||
|
||||
x += c;
|
||||
|
||||
x -= (w / 2);
|
||||
Evas_Coord xx = x + w;
|
||||
|
||||
y -= (h / 2);
|
||||
Evas_Coord yy = y + h;
|
||||
|
||||
if (c <= 0)
|
||||
{
|
||||
(*it_i).raise();
|
||||
(*it_r).raise();
|
||||
}
|
||||
else
|
||||
{
|
||||
(*it_i).lower();
|
||||
(*it_r).lower();
|
||||
}
|
||||
|
||||
evas_map_point_coord_set (m, 0, x, y, -z);
|
||||
evas_map_point_image_uv_set(m, 0, 0, 0);
|
||||
evas_map_point_color_set (m, 0, 255, 255, 255, 255);
|
||||
|
||||
evas_map_point_coord_set (m, 1, xx, y, -z);
|
||||
evas_map_point_image_uv_set(m, 1, 256, 0);
|
||||
evas_map_point_color_set (m, 1, 255, 255, 255, 255);
|
||||
|
||||
evas_map_point_coord_set (m, 2, xx, yy, -z);
|
||||
evas_map_point_image_uv_set(m, 2, 256, 256);
|
||||
evas_map_point_color_set (m, 2, 255, 255, 255, 255);
|
||||
|
||||
evas_map_point_coord_set (m, 3, x, yy, -z);
|
||||
evas_map_point_image_uv_set(m, 3, 0, 256);
|
||||
evas_map_point_color_set (m, 3, 255, 255, 255, 255);
|
||||
|
||||
evas_map_util_3d_rotate(m, 0, ang, 0,
|
||||
x + (w / 2), y + (h / 2), 0);
|
||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
|
||||
|
||||
(*it_i).map_enable_set(1);
|
||||
(*it_i).map_set(m);
|
||||
|
||||
evas_map_point_coord_set (m, 0, x, yy, -z);
|
||||
evas_map_point_image_uv_set(m, 0, 0, 256);
|
||||
evas_map_point_color_set (m, 0, 128, 128, 128, 128);
|
||||
|
||||
evas_map_point_coord_set (m, 1, xx, yy, -z);
|
||||
evas_map_point_image_uv_set(m, 1, 256, 256);
|
||||
evas_map_point_color_set (m, 1, 128, 128, 128, 128);
|
||||
|
||||
evas_map_point_coord_set (m, 2, xx, yy + h, -z);
|
||||
evas_map_point_image_uv_set(m, 2, 256, 0);
|
||||
evas_map_point_color_set (m, 2, 0, 0, 0, 0);
|
||||
|
||||
evas_map_point_coord_set (m, 3, x, yy + h, -z);
|
||||
evas_map_point_image_uv_set(m, 3, 0, 0);
|
||||
evas_map_point_color_set (m, 3, 0, 0, 0, 0);
|
||||
|
||||
evas_map_util_3d_rotate(m, 0, ang, 0,
|
||||
x + (w / 2), y + (h / 2), 0);
|
||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
|
||||
|
||||
(*it_r).map_enable_set(1);
|
||||
(*it_r).map_set(m);
|
||||
|
||||
++it_i;
|
||||
++it_r;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(char *key)
|
||||
{
|
||||
KEY_STD;
|
||||
}
|
||||
|
||||
extern "C" void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue