Imported Upstream version 1.7.4 upstream/1.7.4
authorAnas Nashif <anas.nashif@intel.com>
Sat, 22 Dec 2012 00:23:43 +0000 (16:23 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Sat, 22 Dec 2012 00:23:43 +0000 (16:23 -0800)
28 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
README
config.h.in
configure
configure.ac
doc/Doxyfile.in
doc/Makefile.am
doc/Makefile.in
evas.pc.in
evas.spec
src/lib/Evas.h
src/lib/cache/evas_cache_image.c
src/lib/canvas/evas_async_events.c
src/lib/canvas/evas_object_image.c
src/lib/canvas/evas_object_textblock.c
src/lib/canvas/evas_smart.c
src/lib/engines/common/evas_convert_main.c
src/lib/engines/common/evas_convert_rgb_24.c
src/lib/engines/common/language/evas_bidi_utils.c
src/modules/engines/gl_common/evas_gl_line.c
src/modules/engines/gl_x11/evas_engine.c
src/modules/engines/software_generic/evas_engine.c
src/modules/engines/software_x11/evas_engine.h
src/modules/engines/software_x11/evas_xcb_outbuf.c
src/modules/engines/software_x11/evas_xlib_outbuf.c

index ee0f391..653f744 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2012-12-07  Luis Felipe Strano Moraes
 
        * Release 1.7.3
+
+2012-12-12  ChunEon park <hermet@hermet.pe.kr>
+
+        * Fix the evas gl line incorrect position problem.
+
+2012-12-13  Cedric Bail
+
+       * Fix uninitialized data in Evas_Smart initialization code.
+       * Fix potential segv in software engine native_set call.
+       * Fix uninitialized data in OpenGL engine native_set call.
+
+2012-12-13  Rafael Antognolli (antognolli)
+
+       * Remove strange image_put from image_is_inside. Fixes crashes when
+       precise_is_inside is set on image objects.
+
+2012-12-14  Cedric Bail
+
+       * Properly close async pipe fd on exec.
+
+2012-12-17 Vincent Torri
+
+       * Add XML output to doc
+       * Add installation rule for doc
+
+2012-12-19  Gustavo Sverzut Barbierie (k-s)
+
+       * Fixed RGBA_Image->flags.loaded for copied images.
+       * Fixed evas_object_image_is_inside() implementation.
+
+2012-12-19  Carsten Haitzler (The Rasterman)
+
+        * Fixed 24bpp issue with rendering in evas. It shows itself
+        only under qemu/kvm with the cirruse driver that I have found.
+        In this case the screen is really 24bpp packed and this case
+        just never comes up on any vaguely modern gfx system.
+
+2012-12-21  Stefan Schmidt
+
+        * Fix small memory leak in evas_bidi_utils error path
+
+2012-12-21  Luis Felipe Strano Moraes
+
+       * 1.7.4 release
+
index 401600f..2934cf6 100644 (file)
@@ -132,12 +132,16 @@ if BUILD_ENGINE_WAYLAND_EGL
 pkgconfig_DATA += evas-wayland-egl.pc
 endif
 
-.PHONY: doc coverage
+.PHONY: doc install-doc coverage
 
 doc:
        @echo "entering doc/"
        $(MAKE) -C doc doc
 
+install-doc:
+       @echo "entering doc/"
+       make -C doc install-doc
+
 # Unit tests
 
 if EFL_ENABLE_TESTS
index cdcc337..9f7aa96 100644 (file)
@@ -1150,12 +1150,16 @@ uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
        uninstall-binSCRIPTS uninstall-pkgconfigDATA
 
 
-.PHONY: doc coverage
+.PHONY: doc install-doc coverage
 
 doc:
        @echo "entering doc/"
        $(MAKE) -C doc doc
 
+install-doc:
+       @echo "entering doc/"
+       make -C doc install-doc
+
 # Unit tests
 
 @EFL_ENABLE_TESTS_TRUE@check-local:
diff --git a/NEWS b/NEWS
index 30f2df7..d6f0c64 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,22 @@
+Evas 1.7.4
+
+Changes since Evas 1.7.3:
+-------------------------
+
+Fixes:
+   * Fix the gl line incorrect position drawing.
+   * Fix uninitialized data in Evas_Smart initialization code.
+   * Fix potential segv in software engine native_set call.
+   * Fix uninitialized data in OpenGL engine native_set call.
+   * Fix crash when precise_is_inside is set on an image, and events are generated from it.
+   * Properly close async pipe fd on exec.
+   * Fix the line drawing clipping problem on arm gl driver.
+   * Fix big rendering/conversion problem in kvm/qemu 24bpp.
+   * Fix Evas RGBA_Image->flags.loaded for copied images. 
+   * Fix evas_object_image_is_inside()
+   * Fix small memory leak in evas_bidi_utils error path
+
+    
 Evas 1.7.3
 
 Changes since Evas 1.7.2
diff --git a/README b/README
index ddfcda0..154bd46 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Evas 1.7.0
+Evas 1.7.4
 
 ******************************************************************************
 
index 201da6e..37a16fc 100644 (file)
 /* Define to 1 if you have Exotic. */
 #undef HAVE_EXOTIC
 
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
 /* have fontconfig searching capabilities */
 #undef HAVE_FONTCONFIG
 
index fdcf524..058cae4 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for evas 1.7.3.
+# Generated by GNU Autoconf 2.68 for evas 1.7.4.
 #
 # Report bugs to <enlightenment-devel@lists.sourceforge.net>.
 #
@@ -570,8 +570,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='evas'
 PACKAGE_TARNAME='evas'
-PACKAGE_VERSION='1.7.3'
-PACKAGE_STRING='evas 1.7.3'
+PACKAGE_VERSION='1.7.4'
+PACKAGE_STRING='evas 1.7.4'
 PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1808,7 +1808,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures evas 1.7.3 to adapt to many kinds of systems.
+\`configure' configures evas 1.7.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1882,7 +1882,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of evas 1.7.3:";;
+     short | recursive ) echo "Configuration of evas 1.7.4:";;
    esac
   cat <<\_ACEOF
 
@@ -2253,7 +2253,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-evas configure 1.7.3
+evas configure 1.7.4
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -3105,7 +3105,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by evas $as_me 1.7.3, which was
+It was created by evas $as_me 1.7.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3929,7 +3929,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='evas'
- VERSION='1.7.3'
+ VERSION='1.7.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12963,7 +12963,7 @@ _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define VMIC 3
+#define VMIC 4
 _ACEOF
 
 
@@ -12971,7 +12971,7 @@ cat >>confdefs.h <<_ACEOF
 #define VREV 0
 _ACEOF
 
-version_info="8:3:7"
+version_info="8:4:7"
 release_info=""
 
 
@@ -12990,7 +12990,7 @@ case "$host_os" in
       MODULE_ARCH="$host_os-$host_cpu"
       ;;
    *)
-      MODULE_ARCH="$host_os-$host_cpu-1.7.3"
+      MODULE_ARCH="$host_os-$host_cpu-1.7.4"
       ;;
 esac
 
@@ -20270,12 +20270,13 @@ if test "$ac_res" != no; then :
 
 fi
 
-for ac_func in siglongjmp
+for ac_func in siglongjmp fcntl
 do :
-  ac_fn_c_check_func "$LINENO" "siglongjmp" "ac_cv_func_siglongjmp"
-if test "x$ac_cv_func_siglongjmp" = xyes; then :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGLONGJMP 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -34324,7 +34325,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by evas $as_me 1.7.3, which was
+This file was extended by evas $as_me 1.7.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -34390,7 +34391,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-evas config.status 1.7.3
+evas config.status 1.7.4
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -36703,6 +36704,9 @@ echo "  32bpp Rotation 180......: $conv_32_rgb_rot_180"
 echo "  32bpp Rotation 270......: $conv_32_rgb_rot_270"
 echo
 echo "Documentation.............: ${build_doc}"
+if test "x${build_doc}" = "xyes" ; then
+echo "    Installation..........: make install-doc"
+fi
 echo "Examples..................: install:${install_examples} build:${build_examples}"
 if test "x${enable_tests}" = "xyes" ; then
    echo "Tests.....................: ${enable_tests} (make check)"
index e996b77..7d3dd8c 100644 (file)
@@ -2,7 +2,7 @@
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
 m4_define([v_maj], [1])
 m4_define([v_min], [7])
-m4_define([v_mic], [3])
+m4_define([v_mic], [4])
 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
 m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
 ##--   When released, remove the dnl on the below line
@@ -544,7 +544,7 @@ AC_SUBST(lt_enable_auto_import)
 ### Checks for library functions
 
 AC_ISC_POSIX
-AC_CHECK_FUNCS([siglongjmp])
+AC_CHECK_FUNCS([siglongjmp fcntl])
 
 # alloca
 AC_FUNC_ALLOCA
@@ -2092,6 +2092,9 @@ echo "  32bpp Rotation 180......: $conv_32_rgb_rot_180"
 echo "  32bpp Rotation 270......: $conv_32_rgb_rot_270"
 echo
 echo "Documentation.............: ${build_doc}"
+if test "x${build_doc}" = "xyes" ; then
+echo "    Installation..........: make install-doc"
+fi
 echo "Examples..................: install:${install_examples} build:${build_examples}"
 if test "x${enable_tests}" = "xyes" ; then
    echo "Tests.....................: ${enable_tests} (make check)"
index 54456fe..076bc8b 100644 (file)
@@ -101,7 +101,7 @@ GENERATE_MAN           = YES
 MAN_OUTPUT             = man
 MAN_EXTENSION          = .3
 MAN_LINKS              = YES
-GENERATE_XML           = NO
+GENERATE_XML           = YES
 XML_SCHEMA             =
 XML_DTD                =
 GENERATE_AUTOGEN_DEF   = NO
index 10b19d5..c6501ae 100644 (file)
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in evas.dox
 
-.PHONY: doc
+.PHONY: doc install-doc
 
 PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
 
@@ -9,13 +9,15 @@ if EFL_BUILD_DOC
 doc-clean:
        rm -rf html/ latex/ man/ xml/ $(PACKAGE_DOCNAME).tar*
 
-doc: all doc-clean
+doc-build: all
        $(efl_doxygen)
-       cp $(srcdir)/img/* html/
-       cp $(srcdir)/img/* latex/
+       cp img/* html/
+       cp img/* latex/
+
+doc: doc-build
        rm -rf $(PACKAGE_DOCNAME).tar*
        mkdir -p $(PACKAGE_DOCNAME)/doc
-       cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
+       cp -R html/ latex/ man/ xml/ $(PACKAGE_DOCNAME)/doc
        tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
        bzip2 -9 $(PACKAGE_DOCNAME).tar
        rm -rf $(PACKAGE_DOCNAME)/
@@ -25,11 +27,20 @@ doc: all doc-clean
 
 clean-local: doc-clean
 
+install-doc: doc-build
+       install -d $(docdir)
+       cp -R html latex man xml $(docdir)
+
+uninstall-local:
+       rm -rf $(docdir)/html $(docdir)/latex $(docdir)/man $(docdir)/xml
+
 else
 
 doc:
        @echo "Documentation not built. Run ./configure --help"
 
+install-doc: doc
+
 endif
 
 EXTRA_DIST = $(srcdir)/Doxyfile.in \
index 4bf7b35..62e3a40 100644 (file)
@@ -470,6 +470,7 @@ maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+@EFL_BUILD_DOC_FALSE@uninstall-local:
 @EFL_BUILD_DOC_FALSE@clean-local:
 clean: clean-am
 
@@ -535,7 +536,7 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-local
 
 .MAKE: install-am install-strip
 
@@ -549,21 +550,23 @@ uninstall-am:
        install-strip installcheck installcheck-am installdirs \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am
+       uninstall uninstall-am uninstall-local
 
 
-.PHONY: doc
+.PHONY: doc install-doc
 
 @EFL_BUILD_DOC_TRUE@doc-clean:
 @EFL_BUILD_DOC_TRUE@   rm -rf html/ latex/ man/ xml/ $(PACKAGE_DOCNAME).tar*
 
-@EFL_BUILD_DOC_TRUE@doc: all doc-clean
+@EFL_BUILD_DOC_TRUE@doc-build: all
 @EFL_BUILD_DOC_TRUE@   $(efl_doxygen)
-@EFL_BUILD_DOC_TRUE@   cp $(srcdir)/img/* html/
-@EFL_BUILD_DOC_TRUE@   cp $(srcdir)/img/* latex/
+@EFL_BUILD_DOC_TRUE@   cp img/* html/
+@EFL_BUILD_DOC_TRUE@   cp img/* latex/
+
+@EFL_BUILD_DOC_TRUE@doc: doc-build
 @EFL_BUILD_DOC_TRUE@   rm -rf $(PACKAGE_DOCNAME).tar*
 @EFL_BUILD_DOC_TRUE@   mkdir -p $(PACKAGE_DOCNAME)/doc
-@EFL_BUILD_DOC_TRUE@   cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
+@EFL_BUILD_DOC_TRUE@   cp -R html/ latex/ man/ xml/ $(PACKAGE_DOCNAME)/doc
 @EFL_BUILD_DOC_TRUE@   tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
 @EFL_BUILD_DOC_TRUE@   bzip2 -9 $(PACKAGE_DOCNAME).tar
 @EFL_BUILD_DOC_TRUE@   rm -rf $(PACKAGE_DOCNAME)/
@@ -573,9 +576,18 @@ uninstall-am:
 
 @EFL_BUILD_DOC_TRUE@clean-local: doc-clean
 
+@EFL_BUILD_DOC_TRUE@install-doc: doc-build
+@EFL_BUILD_DOC_TRUE@   install -d $(docdir)
+@EFL_BUILD_DOC_TRUE@   cp -R html latex man xml $(docdir)
+
+@EFL_BUILD_DOC_TRUE@uninstall-local:
+@EFL_BUILD_DOC_TRUE@   rm -rf $(docdir)/html $(docdir)/latex $(docdir)/man $(docdir)/xml
+
 @EFL_BUILD_DOC_FALSE@doc:
 @EFL_BUILD_DOC_FALSE@  @echo "Documentation not built. Run ./configure --help"
 
+@EFL_BUILD_DOC_FALSE@install-doc: doc
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index f5c514a..7522ab4 100644 (file)
@@ -1,7 +1,9 @@
+PACKAGE_TARNAME=@PACKAGE_TARNAME@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
+docdir=@docdir@
 
 Name: evas
 Description: Evas canvas display library
index f7c80e6..71fa727 100644 (file)
--- a/evas.spec
+++ b/evas.spec
@@ -85,7 +85,7 @@
 
 Summary: Multi-platform Canvas Library
 Name: evas
-Version: 1.7.3
+Version: 1.7.4
 Release: %{_rel}
 License: BSD
 Group: System Environment/Libraries
index 7a64071..47557a1 100644 (file)
@@ -8217,6 +8217,8 @@ EAPI Evas_BiDi_Direction  evas_object_text_direction_get(const Evas_Object *obj)
  * additional format directives using "tags" that can be set in the style see
  * @ref evas_textblock_style_set .
  *
+ * For more details see @ref evas_textblock_style_page
+ *
  * Textblock supports the following formats:
  * @li font - Font description in fontconfig like format, e.g: "Sans:style=Italic:lang=hi". or "Serif:style=Bold".
  * @li font_weight - Overrides the weight defined in "font". E.g: "font_weight=Bold" is the same as "font=:style=Bold". Supported weights: "normal", "thin", "ultralight", "light", "book", "medium", "semibold", "bold", "ultrabold", "black", and "extrablack".
index 8d96964..4a6f04c 100644 (file)
@@ -903,6 +903,7 @@ evas_cache_image_copied_data(Evas_Cache_Image *cache,
         return NULL;
      }
    im->references = 1;
+   im->flags.loaded = EINA_TRUE;
    if (cache->func.debug) cache->func.debug("copied-data", im);
    return im;
 }
index 3f9fbd7..c984325 100644 (file)
@@ -36,7 +36,7 @@ struct _Evas_Event_Async
 Eina_Bool
 _evas_fd_close_on_exec(int fd)
 {
-#ifdef HAVE_EXECVP
+#ifdef HAVE_FCNTL
    int flags;
 
    flags = fcntl(fd, F_GETFD);
index eb8218b..aeabd20 100644 (file)
@@ -3631,150 +3631,398 @@ evas_object_image_was_opaque(Evas_Object *obj)
    return 1;
 }
 
-static int
-evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
+static inline Eina_Bool
+_pixel_alpha_get(RGBA_Image *im, int x, int y, DATA8 *alpha,
+                 int src_region_x, int src_region_y, int src_region_w, int src_region_h,
+                 int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h)
 {
-   Evas_Object_Image *o;
-   DATA32 *data;
-   int w, h, stride, iw, ih;
-   int a;
-   int return_value;
+   int px, py, dx, dy, sx, sy, src_w, src_h;
+   double scale_w, scale_h;
 
-   o = (Evas_Object_Image *)(obj->object_data);
+   if ((dst_region_x > x) || (x >= (dst_region_x + dst_region_w)) ||
+       (dst_region_y > y) || (y >= (dst_region_y + dst_region_h)))
+     {
+        *alpha = 0;
+        return EINA_FALSE;
+     }
+
+   src_w = im->cache_entry.w;
+   src_h = im->cache_entry.h;
+   if ((src_w == 0) || (src_h == 0))
+     {
+        *alpha = 0;
+        return EINA_TRUE;
+     }
+
+   EINA_SAFETY_ON_TRUE_GOTO(src_region_x < 0, error_oob);
+   EINA_SAFETY_ON_TRUE_GOTO(src_region_y < 0, error_oob);
+   EINA_SAFETY_ON_TRUE_GOTO(src_region_x + src_region_w > src_w, error_oob);
+   EINA_SAFETY_ON_TRUE_GOTO(src_region_y + src_region_h > src_h, error_oob);
+
+   scale_w = (double)dst_region_w / (double)src_region_w;
+   scale_h = (double)dst_region_h / (double)src_region_h;
+
+   /* point at destination */
+   dx = x - dst_region_x;
+   dy = y - dst_region_y;
+
+   /* point at source */
+   sx = dx / scale_w;
+   sy = dy / scale_h;
+
+   /* pixel point (translated) */
+   px = src_region_x + sx;
+   py = src_region_y + sy;
+   EINA_SAFETY_ON_TRUE_GOTO(px >= src_w, error_oob);
+   EINA_SAFETY_ON_TRUE_GOTO(py >= src_h, error_oob);
+
+   switch (im->cache_entry.space)
+     {
+     case EVAS_COLORSPACE_ARGB8888:
+       {
+          DATA32 *pixel = im->image.data;
+          pixel += ((py * src_w) + px);
+          *alpha = ((*pixel) >> 24) & 0xff;
+       }
+       break;
 
-   x -= obj->cur.cache.clip.x;
-   y -= obj->cur.cache.clip.y;
-   w = obj->cur.cache.clip.w;
-   h = obj->cur.cache.clip.h;
-   iw = o->cur.image.w;
-   ih = o->cur.image.h;
+     default:
+        ERR("Colorspace %d not supported.", im->cache_entry.space);
+        *alpha = 0;
+     }
 
-   if ((x < 0) || (y < 0) || (x >= w) || (y >= h)) return 0;
-   if (!o->cur.has_alpha) return 1;
+   return EINA_TRUE;
 
-   // FIXME: proxy needs to be honored
-   if (obj->cur.map)
+ error_oob:
+   ERR("Invalid region src=(%d, %d, %d, %d), dst=(%d, %d, %d, %d), image=%dx%d",
+       src_region_x, src_region_y, src_region_w, src_region_h,
+       dst_region_x, dst_region_y, dst_region_w, dst_region_h,
+       src_w, src_h);
+   *alpha = 0;
+   return EINA_TRUE;
+}
+
+static int
+evas_object_image_is_inside(Evas_Object *obj, Evas_Coord px, Evas_Coord py)
+{
+   Evas_Object_Image *o;
+   int imagew, imageh, uvw, uvh;
+   void *pixels;
+   int is_inside = 0;
+
+   /* the following code is similar to evas_object_image_render(), but doesn't
+    * draw, just get the pixels so we can check the transparency.
+    */
+   o = (Evas_Object_Image *)(obj->object_data);
+   if (!o->cur.source)
+     {
+        pixels = o->engine_data;
+        imagew = o->cur.image.w;
+        imageh = o->cur.image.h;
+        uvw = imagew;
+        uvh = imageh;
+     }
+   else if (o->cur.source->proxy.surface && !o->cur.source->proxy.redraw)
      {
-        x = obj->cur.map->mx;
-        y = obj->cur.map->my;
+        pixels = o->cur.source->proxy.surface;
+        imagew = o->cur.source->proxy.w;
+        imageh = o->cur.source->proxy.h;
+        uvw = imagew;
+        uvh = imageh;
+     }
+   else if (o->cur.source->type == o_type &&
+            ((Evas_Object_Image *)o->cur.source->object_data)->engine_data)
+     {
+        Evas_Object_Image *oi;
+        oi = o->cur.source->object_data;
+        pixels = oi->engine_data;
+        imagew = oi->cur.image.w;
+        imageh = oi->cur.image.h;
+        uvw = o->cur.source->cur.geometry.w;
+        uvh = o->cur.source->cur.geometry.h;
      }
    else
      {
-        int bl, br, bt, bb, bsl, bsr, bst, bsb;
-        
-        bl = o->cur.border.l;
-        br = o->cur.border.r;
-        bt = o->cur.border.t;
-        bb = o->cur.border.b;
-        if ((bl + br) > iw)
-          {
-             bl = iw / 2;
-             br = iw - bl;
-          }
-        if ((bl + br) > iw)
-          {
-             bl = iw / 2;
-             br = iw - bl;
-          }
-        if ((bt + bb) > ih)
-          {
-             bt = ih / 2;
-             bb = ih - bt;
-          }
-        if ((bt + bb) > ih)
+        o->proxyrendering = EINA_TRUE;
+        _proxy_subrender(obj->layer->evas, o->cur.source);
+        pixels = o->cur.source->proxy.surface;
+        imagew = o->cur.source->proxy.w;
+        imageh = o->cur.source->proxy.h;
+        uvw = imagew;
+        uvh = imageh;
+        o->proxyrendering = EINA_FALSE;
+     }
+
+   if (pixels)
+     {
+        Evas_Coord idw, idh, idx, idy;
+        int ix, iy, iw, ih;
+
+        /* TODO: not handling o->dirty_pixels && o->func.get_pixels,
+         * should we handle it now or believe they were done in the last render?
+         */
+        if (o->dirty_pixels)
           {
-             bt = ih / 2;
-             bb = ih - bt;
+             if (o->func.get_pixels)
+               {
+                  ERR("dirty_pixels && get_pixels not supported");
+               }
           }
-        if (o->cur.border.scale != 1.0)
+
+        /* TODO: not handling map, need to apply map to point */
+        if ((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap))
           {
-             bsl = ((double)bl * o->cur.border.scale);
-             bsr = ((double)br * o->cur.border.scale);
-             bst = ((double)bt * o->cur.border.scale);
-             bsb = ((double)bb * o->cur.border.scale);
+             evas_object_map_update(obj, 0, 0, imagew, imageh, uvw, uvh);
+
+             ERR("map not supported");
           }
         else
           {
-             bsl = bl; bsr = br; bst = bt; bsb = bb;
-          }
-        
-        w = o->cur.fill.w;
-        h = o->cur.fill.h;
-        x -= o->cur.fill.x;
-        y -= o->cur.fill.y;
-        x %= w;
-        y %= h;
-        
-        if (x < 0) x += w;
-        if (y < 0) y += h;
-        
-        if (o->cur.border.fill != EVAS_BORDER_FILL_DEFAULT)
-          {
-             if ((x > bsl) && (x < (w - bsr)) &&
-                 (y > bst) && (y < (h - bsb)))
+             RGBA_Image *im;
+             DATA32 *data = NULL;
+             int err = 0;
+
+             im = obj->layer->evas->engine.func->image_data_get
+               (obj->layer->evas->engine.data.output, pixels, 0, &data, &err);
+             if ((!im) || (!data) || (err))
                {
-                  if (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) return 1;
-                  return 0;
+                  ERR("Couldn't get image pixels RGBA_Image %p: im=%p, data=%p, err=%d", pixels, im, data, err);
+                  goto end;
                }
-          }
-        
-        if (x < bsl) x = (x * bl) / bsl;
-        else if (x > (w - bsr)) x = iw - (((w - x) * br) / bsr);
-        else if ((bsl + bsr) < w) x = bl + (((x - bsl) * (iw - bl - br)) / (w - bsl - bsr));
-        else return 1;
-        
-        if (y < bst) y = (y * bt) / bst;
-        else if (y > (h - bsb)) y = ih - (((h - y) * bb) / bsb);
-        else if ((bst + bsb) < h) y = bt + (((y - bst) * (ih - bt - bb)) / (h - bst - bsb));
-        else return 1;
-     }
-   
-   if (x < 0) x = 0;
-   if (y < 0) y = 0;
-   if (x >= iw) x = iw - 1;
-   if (y >= ih) y = ih - 1;
-   
-   stride = o->cur.image.stride;
-   
-   o->engine_data = obj->layer->evas->engine.func->image_data_get
-      (obj->layer->evas->engine.data.output,
-          o->engine_data,
-          0,
-          &data,
-          &o->load_error);
 
-   if (!data)
-     {
-        return_value = 0;
-        goto finish;
-     }
+             idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
+             idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh);
+             if (idw < 1) idw = 1;
+             if (idh < 1) idh = 1;
+             if (idx > 0) idx -= idw;
+             if (idy > 0) idy -= idh;
+             while ((int)idx < obj->cur.geometry.w)
+               {
+                  Evas_Coord ydy;
+                  int dobreak_w = 0;
+                  ydy = idy;
+                  ix = idx;
+                  if ((o->cur.fill.w == obj->cur.geometry.w) &&
+                      (o->cur.fill.x == 0))
+                    {
+                       dobreak_w = 1;
+                       iw = obj->cur.geometry.w;
+                    }
+                  else
+                    iw = ((int)(idx + idw)) - ix;
+                  while ((int)idy < obj->cur.geometry.h)
+                    {
+                       int dobreak_h = 0;
 
-   switch (o->cur.cspace)
-     {
-     case EVAS_COLORSPACE_ARGB8888:
-        data = ((DATA32*)(data) + ((y * (stride >> 2)) + x));
-        a = (*((DATA32*)(data)) >> 24) & 0xff;
-        break;
-     case EVAS_COLORSPACE_RGB565_A5P:
-        data = (void*) ((DATA16*)(data) + (h * (stride >> 1)));
-        data = (void*) ((DATA8*)(data) + ((y * (stride >> 1)) + x));
-        a = (*((DATA8*)(data))) & 0x1f;
-        break;
-     default:
-        return_value = 1;
-        goto finish;
-        break;
-     }
+                       iy = idy;
+                       if ((o->cur.fill.h == obj->cur.geometry.h) &&
+                           (o->cur.fill.y == 0))
+                         {
+                            ih = obj->cur.geometry.h;
+                            dobreak_h = 1;
+                         }
+                       else
+                         ih = ((int)(idy + idh)) - iy;
+                       if ((o->cur.border.l == 0) &&
+                           (o->cur.border.r == 0) &&
+                           (o->cur.border.t == 0) &&
+                           (o->cur.border.b == 0) &&
+                           (o->cur.border.fill != 0))
+                         {
+                            /* NOTE: render handles cserve2 here,
+                             * we don't need to
+                             */
+                              {
+                                 DATA8 alpha = 0;
+                                 if (_pixel_alpha_get(pixels, px, py, &alpha, 0, 0, imagew, imageh, obj->cur.geometry.x + ix, obj->cur.geometry.y + iy, iw, ih))
+                                   {
+                                      is_inside = alpha > 0;
+                                      dobreak_h = 1;
+                                      dobreak_w = 1;
+                                      break;
+                                   }
+                              }
+                         }
+                       else
+                         {
+                            int inx, iny, inw, inh, outx, outy, outw, outh;
+                            int bl, br, bt, bb, bsl, bsr, bst, bsb;
+                            int imw, imh, ox, oy;
+                            DATA8 alpha = 0;
 
-   return_value = (a != 0);
-   goto finish;
+                            ox = obj->cur.geometry.x + ix;
+                            oy = obj->cur.geometry.y + iy;
+                            imw = imagew;
+                            imh = imageh;
+                            bl = o->cur.border.l;
+                            br = o->cur.border.r;
+                            bt = o->cur.border.t;
+                            bb = o->cur.border.b;
+                            if ((bl + br) > iw)
+                              {
+                                 bl = iw / 2;
+                                 br = iw - bl;
+                              }
+                            if ((bl + br) > imw)
+                              {
+                                 bl = imw / 2;
+                                 br = imw - bl;
+                              }
+                            if ((bt + bb) > ih)
+                              {
+                                 bt = ih / 2;
+                                 bb = ih - bt;
+                              }
+                            if ((bt + bb) > imh)
+                              {
+                                 bt = imh / 2;
+                                 bb = imh - bt;
+                              }
+                            if (o->cur.border.scale != 1.0)
+                              {
+                                 bsl = ((double)bl * o->cur.border.scale);
+                                 bsr = ((double)br * o->cur.border.scale);
+                                 bst = ((double)bt * o->cur.border.scale);
+                                 bsb = ((double)bb * o->cur.border.scale);
+                              }
+                            else
+                              {
+                                  bsl = bl; bsr = br; bst = bt; bsb = bb;
+                              }
+                            // #--
+                            // |
+                            inx = 0; iny = 0;
+                            inw = bl; inh = bt;
+                            outx = ox; outy = oy;
+                            outw = bsl; outh = bst;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
 
-   finish:
+                            // .##
+                            // |
+                            inx = bl; iny = 0;
+                            inw = imw - bl - br; inh = bt;
+                            outx = ox + bsl; outy = oy;
+                            outw = iw - bsl - bsr; outh = bst;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
+                            // --#
+                            //   |
+                            inx = imw - br; iny = 0;
+                            inw = br; inh = bt;
+                            outx = ox + iw - bsr; outy = oy;
+                            outw = bsr; outh = bst;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
+                            // .--
+                            // #  
+                            inx = 0; iny = bt;
+                            inw = bl; inh = imh - bt - bb;
+                            outx = ox; outy = oy + bst;
+                            outw = bsl; outh = ih - bst - bsb;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
+                            // .--.
+                            // |##|
+                            if (o->cur.border.fill > EVAS_BORDER_FILL_NONE)
+                              {
+                                 inx = bl; iny = bt;
+                                 inw = imw - bl - br; inh = imh - bt - bb;
+                                 outx = ox + bsl; outy = oy + bst;
+                                 outw = iw - bsl - bsr; outh = ih - bst - bsb;
+                                 if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                                   {
+                                      is_inside = alpha > 0;
+                                      dobreak_h = 1;
+                                      dobreak_w = 1;
+                                      break;
+                                   }
+                              }
+                            // --.
+                            //   #
+                            inx = imw - br; iny = bt;
+                            inw = br; inh = imh - bt - bb;
+                            outx = ox + iw - bsr; outy = oy + bst;
+                            outw = bsr; outh = ih - bst - bsb;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
+                            // |
+                            // #--
+                            inx = 0; iny = imh - bb;
+                            inw = bl; inh = bb;
+                            outx = ox; outy = oy + ih - bsb;
+                            outw = bsl; outh = bsb;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
+                            // |
+                            // .## 
+                            inx = bl; iny = imh - bb;
+                            inw = imw - bl - br; inh = bb;
+                            outx = ox + bsl; outy = oy + ih - bsb;
+                            outw = iw - bsl - bsr; outh = bsb;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
+                            //   |
+                            // --#
+                            inx = imw - br; iny = imh - bb;
+                            inw = br; inh = bb;
+                            outx = ox + iw - bsr; outy = oy + ih - bsb;
+                            outw = bsr; outh = bsb;
+                            if (_pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh))
+                              {
+                                 is_inside = alpha > 0;
+                                 dobreak_h = 1;
+                                 dobreak_w = 1;
+                                 break;
+                              }
+                         }
+                       idy += idh;
+                       if (dobreak_h) break;
+                    }
+                  idx += idw;
+                  idy = ydy;
+                  if (dobreak_w) break;
+               }
+          }
+     }
 
-   obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
-                                  o->engine_data,
-                                  data);
-   return return_value;
+ end:
+   return is_inside;
 }
 
 static int
index cd197c6..b757fa4 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * @internal
- * @section Evas_Object_Textblock_Internal Internal Textblock Object Tutorial
+ * @subsection Evas_Object_Textblock_Internal Internal Textblock Object Tutorial
  *
  * This explains the internal design of the Evas Textblock Object, it's assumed
  * that the reader of this section has already read @ref Evas_Object_Textblock_Tutorial "Textblock's usage docs.".
@@ -1110,6 +1110,12 @@ static const char *underline_dash_widthstr = NULL;
 static const char *underline_dash_gapstr = NULL;
 
 /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @brief This page describes how to style text in an Evas Text Block.
+ */
+
+/**
  * @internal
  * Init the format strings.
  */
@@ -1118,6 +1124,53 @@ _format_command_init(void)
 {
    if (format_refcount == 0)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @section evas_textblock_style_index Index
+         *
+         * The following styling commands are accepted:
+         * @li @ref evas_textblock_style_font
+         * @li @ref evas_textblock_style_font_fallback
+         * @li @ref evas_textblock_style_font_size
+         * @li @ref evas_textblock_style_font_source
+         * @li @ref evas_textblock_style_font_weight
+         * @li @ref evas_textblock_style_font_style
+         * @li @ref evas_textblock_style_font_width
+         * @li @ref evas_textblock_style_lang
+         * @li @ref evas_textblock_style_color
+         * @li @ref evas_textblock_style_underline_color
+         * @li @ref evas_textblock_style_underline2_color
+         * @li @ref evas_textblock_style_underline_dash_color
+         * @li @ref evas_textblock_style_outline_color
+         * @li @ref evas_textblock_style_shadow_color
+         * @li @ref evas_textblock_style_glow_color
+         * @li @ref evas_textblock_style_glow2_color
+         * @li @ref evas_textblock_style_backing_color
+         * @li @ref evas_textblock_style_strikethrough_color
+         * @li @ref evas_textblock_style_align
+         * @li @ref evas_textblock_style_valign
+         * @li @ref evas_textblock_style_wrap
+         * @li @ref evas_textblock_style_left_margin
+         * @li @ref evas_textblock_style_right_margin
+         * @li @ref evas_textblock_style_underline
+         * @li @ref evas_textblock_style_strikethrough
+         * @li @ref evas_textblock_style_backing
+         * @li @ref evas_textblock_style_style
+         * @li @ref evas_textblock_style_tabstops
+         * @li @ref evas_textblock_style_linesize
+         * @li @ref evas_textblock_style_linerelsize
+         * @li @ref evas_textblock_style_linegap
+         * @li @ref evas_textblock_style_linerelgap
+         * @li @ref evas_textblock_style_item
+         * @li @ref evas_textblock_style_linefill
+         * @li @ref evas_textblock_style_ellipsis
+         * @li @ref evas_textblock_style_password
+         * @li @ref evas_textblock_style_underline_dash_width
+         * @li @ref evas_textblock_style_underline_dash_gap
+         *
+         * @section evas_textblock_style_contents Contents
+         */
         fontstr = eina_stringshare_add("font");
         font_fallbacksstr = eina_stringshare_add("font_fallbacks");
         font_sizestr = eina_stringshare_add("font_size");
@@ -1271,14 +1324,45 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
 
    if (cmd == fontstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_font Font
+         *
+         * This sets the name of the font to be used.
+         * @code
+         * font=<font name>
+         * @endcode
+         */
         evas_font_name_parse(fmt->font.fdesc, tmp_param);
      }
    else if (cmd == font_fallbacksstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_font_fallback Font fallback
+         *
+         * This sets the name of the fallback font to be used. This font will
+         * be used if the primary font is not available.
+         * @code
+         * font_fallbacks=<font name>
+         * @endcode
+         */
         eina_stringshare_replace(&(fmt->font.fdesc->fallbacks), tmp_param);
      }
    else if (cmd == font_sizestr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_font_size Font size
+         *
+         * This sets the the size of font in points to be used.
+         * @code
+         * font_size=<size>
+         * @endcode
+         */
         int v;
 
         v = atoi(tmp_param);
@@ -1289,6 +1373,16 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == font_sourcestr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_font_source Font source
+         *
+         * Specify an object from which to search for the font.
+         * @code
+         * font_source=<source>
+         * @endcode
+         */
         if ((!fmt->font.source) ||
               ((fmt->font.source) && (strcmp(fmt->font.source, tmp_param))))
           {
@@ -1298,65 +1392,295 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == font_weightstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_font_weight Font weight
+         *
+         * Sets the weight of the font. The value must be one of:
+         * @li "normal"
+         * @li "thin"
+         * @li "ultralight"
+         * @li "light"
+         * @li "book"
+         * @li "medium"
+         * @li "semibold"
+         * @li "bold"
+         * @li "ultrabold"
+         * @li "black"
+         * @li "extrablack"
+         * @code
+         * font_weight=<weight>
+         * @endcode
+         */
         fmt->font.fdesc->weight = evas_font_style_find(tmp_param,
               tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WEIGHT);
      }
    else if (cmd == font_stylestr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_font_style Font style
+         *
+         * Sets the style of the font. The value must be one of:
+         * @li "normal"
+         * @li "oblique"
+         * @li "italic"
+         * @code
+         * font_style=<style>
+         * @endcode
+         */
         fmt->font.fdesc->slant = evas_font_style_find(tmp_param,
               tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_SLANT);
      }
    else if (cmd == font_widthstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_font_width Font width
+         *
+         * Sets the width of the font. The value must be one of:
+         * @li "normal"
+         * @li "ultracondensed"
+         * @li "extracondensed"
+         * @li "condensed"
+         * @li "semicondensed"
+         * @li "semiexpanded"
+         * @li "expanded"
+         * @li "extraexpanded"
+         * @li "ultraexpanded"
+         * @code
+         * font_width=<width>
+         * @endcode
+         */
         fmt->font.fdesc->width = evas_font_style_find(tmp_param,
               tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WIDTH);
      }
    else if (cmd == langstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_lang Language
+         *
+         * Sets the language of the text for FontConfig.
+         * @code
+         * lang=<language>
+         * @endcode
+         */
         eina_stringshare_replace(&(fmt->font.fdesc->lang), tmp_param);
      }
    else if (cmd == colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_color Color
+      *
+      * Sets the color of the text. The following formats are accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.normal.r), &(fmt->color.normal.g),
            &(fmt->color.normal.b), &(fmt->color.normal.a));
    else if (cmd == underline_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_underline_color Underline Color
+      *
+      * Sets the color of the underline. The following formats are accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * underline_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.underline.r), &(fmt->color.underline.g),
            &(fmt->color.underline.b), &(fmt->color.underline.a));
    else if (cmd == underline2_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_underline2_color Second Underline Color
+      *
+      * Sets the color of the second line of underline(when using underline
+      * mode "double"). The following formats are accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * underline2_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.underline2.r), &(fmt->color.underline2.g),
            &(fmt->color.underline2.b), &(fmt->color.underline2.a));
    else if (cmd == underline_dash_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_underline_dash_color Underline Dash Color
+      *
+      * Sets the color of dashed underline. The following formats are accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * underline_dash_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.underline_dash.r), &(fmt->color.underline_dash.g),
            &(fmt->color.underline_dash.b), &(fmt->color.underline_dash.a));
    else if (cmd == outline_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_outline_color Outline Color
+      *
+      * Sets the color of the outline of the text. The following formats are
+      * accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * outline_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.outline.r), &(fmt->color.outline.g),
            &(fmt->color.outline.b), &(fmt->color.outline.a));
    else if (cmd == shadow_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_shadow_color Shadow Color
+      *
+      * Sets the color of the shadow of the text. The following formats are
+      * accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * shadow_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.shadow.r), &(fmt->color.shadow.g),
            &(fmt->color.shadow.b), &(fmt->color.shadow.a));
    else if (cmd == glow_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_glow_color First Glow Color
+      *
+      * Sets the first color of the glow of text. The following formats are
+      * accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * glow_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.glow.r), &(fmt->color.glow.g),
            &(fmt->color.glow.b), &(fmt->color.glow.a));
    else if (cmd == glow2_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_glow2_color Second Glow Color
+      *
+      * Sets the second color of the glow of text. The following formats are
+      * accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * glow2_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.glow2.r), &(fmt->color.glow2.g),
            &(fmt->color.glow2.b), &(fmt->color.glow2.a));
    else if (cmd == backing_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_backing_color Backing Color
+      *
+      * Sets a background color for text. The following formats are
+      * accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * backing_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.backing.r), &(fmt->color.backing.g),
            &(fmt->color.backing.b), &(fmt->color.backing.a));
    else if (cmd == strikethrough_colorstr)
+     /**
+      * @page evas_textblock_style_page Evas Textblock Style Options
+      *
+      * @subsection evas_textblock_style_strikethrough_color Strikethrough Color
+      *
+      * Sets the color of text that is striked through. The following formats
+      * are accepted:
+      * @li "#RRGGBB"
+      * @li "#RRGGBBAA"
+      * @li "#RGB"
+      * @li "#RGBA"
+      * @code
+      * strikethrough_color=<color>
+      * @endcode
+      */
      _format_color_parse(tmp_param,
            &(fmt->color.strikethrough.r), &(fmt->color.strikethrough.g),
            &(fmt->color.strikethrough.b), &(fmt->color.strikethrough.a));
    else if (cmd == alignstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_align Horizontal Align
+         *
+         * Sets the horizontal alignment of the text. The value can either be
+         * a number, a percentage or one of several presets:
+         * @li "auto" - Respects LTR/RTL settings
+         * @li "center" - Centers the text in the line
+         * @li "middle" - Alias for "center"
+         * @li "left" - Puts the text at the left of the line
+         * @li "right" - Puts the text at the right of the line
+         * @li <number> - A number between 0.0 and 1.0 where 0.0 represents
+         * "left" and 1.0 represents "right"
+         * @li <number>% - A percentage between 0% and 100% where 0%
+         * represents "left" and 100% represents "right"
+         * @code
+         * align=<value or preset>
+         * @endcode
+         */
         if (!strcmp(tmp_param, "auto"))
           {
              fmt->halign_auto = EINA_TRUE;
@@ -1387,6 +1711,30 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == valignstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_valign Vertical Align
+         *
+         * Sets the vertical alignment of the text. The value can either be
+         * a number or one of the following presets:
+         * @li "top" - Puts text at the top of the line
+         * @li "center" - Centers the text in the line
+         * @li "middle" - Alias for "center"
+         * @li "bottom" - Puts the text at the bottom of the line
+         * @li "baseline" - Baseline
+         * @li "base" - Alias for "baseline"
+         * @li <number> - A number between 0.0 and 1.0 where 0.0 represents
+         * "top" and 1.0 represents "bottom"
+         * @li <number>% - A percentage between 0% and 100% where 0%
+         * represents "top" and 100% represents "bottom"
+         * @code
+         * valign=<value or preset>
+         * @endcode
+         *
+         * See explanation of baseline at:
+         * https://en.wikipedia.org/wiki/Baseline_%28typography%29
+         */
         if (!strcmp(tmp_param, "top")) fmt->valign = 0.0;
         else if (!strcmp(tmp_param, "middle")) fmt->valign = 0.5;
         else if (!strcmp(tmp_param, "center")) fmt->valign = 0.5;
@@ -1411,6 +1759,21 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == wrapstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_wrap Wrap
+         *
+         * Sets the wrap policy of the text. The value must be one of the
+         * following:
+         * @li "word" - Only wraps lines at word boundaries
+         * @li "char" - Wraps at any character
+         * @li "mixed" - Wrap at words if possible, if not at any character
+         * @li "" - Don't wrap
+         * @code
+         * wrap=<value or preset>
+         * @endcode
+         */
         if (!strcmp(tmp_param, "word"))
           {
              fmt->wrap_word = 1;
@@ -1433,6 +1796,21 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == left_marginstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_left_margin Left margin
+         *
+         * Sets the left margin of the text. The value can be a number, an
+         * increment, decrement or "reset":
+         * @li +<number> - Increments existing left margin by <number>
+         * @li -<number> - Decrements existing left margin by <number>
+         * @li <number> - Sets left margin to <number>
+         * @li "reset" - Sets left margin to 0
+         * @code
+         * left_margin=<value or reset>
+         * @endcode
+         */
         if (!strcmp(tmp_param, "reset"))
           fmt->margin.l = 0;
         else
@@ -1448,6 +1826,21 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == right_marginstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_right_margin Right margin
+         *
+         * Sets the right margin of the text. The value can be a number, an
+         * increment, decrement or "reset":
+         * @li +<number> - Increments existing right margin by <number>
+         * @li -<number> - Decrements existing right margin by <number>
+         * @li <number> - Sets left margin to <number>
+         * @li "reset" - Sets left margin to 0
+         * @code
+         * right_margin=<value or reset>
+         * @endcode
+         */
         if (!strcmp(tmp_param, "reset"))
           fmt->margin.r = 0;
         else
@@ -1463,6 +1856,22 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == underlinestr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_underline Underline
+         *
+         * Sets if and how a text will be underlined. The value must be one of
+         * the following:
+         * @li "off" - No underlining
+         * @li "single" - A single line under the text
+         * @li "on" - Alias for "single"
+         * @li "double" - Two lines under the text
+         * @li "dashed" - A dashed line under the text
+         * @code
+         * underline=off/single/on/double/dashed
+         * @endcode
+         */
         if (!strcmp(tmp_param, "off"))
           {
              fmt->underline = 0;
@@ -1484,6 +1893,19 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == strikethroughstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_strikethrough Strikethrough
+         *
+         * Sets if the text will be striked through. The value must be one of
+         * the following:
+         * @li "off" - No strikethrough
+         * @li "on" - Strikethrough
+         * @code
+         * strikethrough=on/off
+         * @endcode
+         */
         if (!strcmp(tmp_param, "off"))
           fmt->strikethrough = 0;
         else if (!strcmp(tmp_param, "on"))
@@ -1491,6 +1913,19 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == backingstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_backing Backing
+         *
+         * Sets if the text will have backing. The value must be one of
+         * the following:
+         * @li "off" - No backing
+         * @li "on" - Backing
+         * @code
+         * backing=on/off
+         * @endcode
+         */
         if (!strcmp(tmp_param, "off"))
           fmt->backing = 0;
         else if (!strcmp(tmp_param, "on"))
@@ -1498,6 +1933,41 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == stylestr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_style Style
+         *
+         * Sets the style of the text. The value must be a string composed of
+         * two comma separated parts. The first part of the value sets the
+         * appearance of the text, the second the position.
+         *
+         * The first part may be any of the following values:
+         * @li "plain"
+         * @li "off" - Alias for "plain"
+         * @li "none" - Alias for "plain"
+         * @li "shadow"
+         * @li "outline"
+         * @li "soft_outline"
+         * @li "outline_shadow"
+         * @li "outline_soft_shadow"
+         * @li "glow"
+         * @li "far_shadow"
+         * @li "soft_shadow"
+         * @li "far_soft_shadow"
+         * The second part may be any of the following values:
+         * @li "bottom_right"
+         * @li "bottom"
+         * @li "bottom_left"
+         * @li "left"
+         * @li "top_left"
+         * @li "top"
+         * @li "top_right"
+         * @li "right"
+         * @code
+         * style=<appearance>,<position>
+         * @endcode
+         */
         char *p1, *p2, *p, *pp;
 
         p1 = alloca(len + 1);
@@ -1555,16 +2025,50 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == tabstopsstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_tabstops Tabstops
+         *
+         * Sets the size of the tab character. The value must be a number
+         * greater than one.
+         * @code
+         * tabstops=<number>
+         * @endcode
+         */
         fmt->tabstops = atoi(tmp_param);
         if (fmt->tabstops < 1) fmt->tabstops = 1;
      }
    else if (cmd == linesizestr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_linesize Line size
+         *
+         * Sets the size of line of text. The value should be a number.
+         * @warning Setting this value sets linerelsize to 0%!
+         * @code
+         * linesize=<number>
+         * @endcode
+         */
         fmt->linesize = atoi(tmp_param);
         fmt->linerelsize = 0.0;
      }
    else if (cmd == linerelsizestr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_linerelsize Relative line size
+         *
+         * Sets the relative size of line of text. The value must be a
+         * percentage.
+         * @warning Setting this value sets linesize to 0!
+         * @code
+         * linerelsize=<number>%
+         * @endcode
+         */
         char *endptr = NULL;
         double val = strtod(tmp_param, &endptr);
         if (endptr)
@@ -1581,11 +2085,35 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == linegapstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_linegap Line gap
+         *
+         * Sets the size of the line gap in text. The value should be a
+         * number.
+         * @warning Setting this value sets linerelgap to 0%!
+         * @code
+         * linegap=<number>
+         * @endcode
+         */
         fmt->linegap = atoi(tmp_param);
         fmt->linerelgap = 0.0;
      }
    else if (cmd == linerelgapstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_linerelgap Relative line gap
+         *
+         * Sets the relative size of the line gap in text. The value must be
+         * a percentage.
+         * @warning Setting this value sets linegap to 0!
+         * @code
+         * linerelgap=<number>%
+         * @endcode
+         */
         char *endptr = NULL;
         double val = strtod(tmp_param, &endptr);
         if (endptr)
@@ -1602,11 +2130,32 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == itemstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_item Item
+         *
+         * Not implemented! Does nothing!
+         * @code
+         * item=<anything>
+         * @endcode
+         */
         // itemstr == replacement object items in textblock - inline imges
         // for example
      }
    else if (cmd == linefillstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_linefill Line fill
+         *
+         * Sets the size of the line fill in text. The value must be a
+         * percentage.
+         * @code
+         * linefill=<number>%
+         * @endcode
+         */
         char *endptr = NULL;
         double val = strtod(tmp_param, &endptr);
         if (endptr)
@@ -1622,6 +2171,19 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == ellipsisstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_ellipsis Ellipsis
+         *
+         * Sets ellipsis mode. The value should be a number. Any value smaller
+         * than 0.0 or greater than 1.0 disables ellipsis.
+         * A value of 0 means ellipsizing the leftmost portion of the text
+         * first, 1 on the other hand the rightmost portion.
+         * @code
+         * ellipsis=<number>
+         * @endcode
+         */
         char *endptr = NULL;
         fmt->ellipsis = strtod(tmp_param, &endptr);
         if ((fmt->ellipsis < 0.0) || (fmt->ellipsis > 1.0))
@@ -1636,6 +2198,20 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == passwordstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_password Password
+         *
+         * Sets if the text is being used for passwords. Enabling this causes
+         * all characters to be substituted for '*'.
+         * Value must be one of the following:
+         * @li "on" - Enable
+         * @li "off" - Disable
+         * @code
+         * password=<number>
+         * @endcode
+         */
         if (!strcmp(tmp_param, "off"))
           fmt->password = 0;
         else if (!strcmp(tmp_param, "on"))
@@ -1643,11 +2219,31 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == underline_dash_widthstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_underline_dash_width Underline dash width
+         *
+         * Sets the width of the underline dash. The value should be a number.
+         * @code
+         * underline_dash_width=<number>
+         * @endcode
+         */
         fmt->underline_dash_width = atoi(tmp_param);
         if (fmt->underline_dash_width <= 0) fmt->underline_dash_width = 1;
      }
    else if (cmd == underline_dash_gapstr)
      {
+        /**
+         * @page evas_textblock_style_page Evas Textblock Style Options
+         *
+         * @subsection evas_textblock_style_underline_dash_gap Underline dash gap
+         *
+         * Sets the gap of the underline dash. The value should be a number.
+         * @code
+         * underline_dash_gap=<number>
+         * @endcode
+         */
         fmt->underline_dash_gap = atoi(tmp_param);
         if (fmt->underline_dash_gap <= 0) fmt->underline_dash_gap = 1;
      }
index f39721d..5c2e593 100644 (file)
@@ -255,7 +255,8 @@ _evas_smart_class_callbacks_create(Evas_Smart *s)
 static void
 _evas_smart_class_interfaces_create(Evas_Smart *s)
 {
-   unsigned int i, total_priv_sz;
+   unsigned int i;
+   unsigned int total_priv_sz = 0;
    const Evas_Smart_Class *sc;
 
    /* get number of interfaces on the smart */
index da19f9c..bad0880 100644 (file)
@@ -573,7 +573,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h __UNUSED__, int depth, DA
        if (depth == 24)
          {
 #ifdef BUILD_CONVERT_24_RGB_888
-            if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
+            if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000))
               {
                  if (rotation == 0)
                    return evas_common_convert_rgba_to_24bpp_rgb_888;
@@ -587,7 +587,7 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h __UNUSED__, int depth, DA
               }
 #endif
 #ifdef BUILD_CONVERT_24_BGR_888
-            if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000))
+            if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
               {
                  if (rotation == 0)
                    return evas_common_convert_rgba_to_24bpp_bgr_888;
index 9efa006..d213b20 100644 (file)
@@ -23,7 +23,7 @@ evas_common_convert_rgba_to_24bpp_rgb_888(DATA32 *src, DATA8 *dst, int src_jump,
             dst_ptr+=3;
          }
        src_ptr += src_jump;
-       dst_ptr += (dst_jump * 3);
+       dst_ptr += dst_jump;
      }
    return;
 }
@@ -55,7 +55,7 @@ evas_common_convert_rgba_to_24bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump,
             dst_ptr+=3;
          }
        src_ptr += src_jump;
-       dst_ptr += (dst_jump * 3);
+       dst_ptr += dst_jump;
      }
    return;
 }
@@ -82,7 +82,7 @@ evas_common_convert_rgba_to_24bpp_bgr_888(DATA32 *src, DATA8 *dst, int src_jump,
             dst_ptr+=3;
          }
        src_ptr += src_jump;
-       dst_ptr += (dst_jump * 3);
+       dst_ptr += dst_jump;
      }
    return;
 }
index 002cfbe..c34f5d7 100644 (file)
@@ -182,8 +182,10 @@ evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim)
                        if (!tmp_ret)
                          {
                             free(ret);
+                            free(udelim);
                             return NULL;
                          }
+                       ret = tmp_ret;
                     }
                   ret[ret_idx++] = str - str_base;
                   break;
index c13fa25..364f011 100644 (file)
@@ -6,6 +6,10 @@ evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int
    RGBA_Draw_Context *dc;
    int r, g, b, a;
    int c, cx, cy, cw, ch;
+   static int offset_hack = -1;
+   const int OFFSET_HACK_OFF = 0;
+   const int OFFSET_HACK_DEFAULT = 1;
+   const int OFFSET_HACK_ARM = 2;
 
    dc = gc->dc;
    if (dc->mul.use)
@@ -27,20 +31,48 @@ evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int
    cx = gc->dc->clip.x; cy = gc->dc->clip.y;
    cw = gc->dc->clip.w; ch = gc->dc->clip.h;
 
-   //Increment pixels since the gl line origin position is slightly different
-   if (x1 == x2)
+   //I have no idea but shift lines/clips since the gl line origin position and
+   //sissor area is slightly different by the gl driver.
+   if (offset_hack == -1)
      {
-        if (gc->rot == 0)
-          x1++;
+        if (!getenv("EVAS_GL_LINE_OFFSET_HACK_DISABLE"))
+          {
+             const char *vendor_name;
+             vendor_name = (char *) glGetString(GL_VENDOR);
+             if (vendor_name && !strcmp(vendor_name, "ARM"))
+               offset_hack = OFFSET_HACK_ARM;
+             else
+               offset_hack = OFFSET_HACK_DEFAULT;
+          }
+        else offset_hack = OFFSET_HACK_OFF;
      }
 
-   if (y1 == y2)
+   if (offset_hack == OFFSET_HACK_DEFAULT)
      {
+        if ((gc->rot == 0) || (gc->rot == 90))
+          {
+             x1++;
+             x2++;
+          }
         if ((gc->rot == 90) || (gc->rot == 180))
-          y1++;
+          {
+             y1++;
+             y2++;
+          }
+     }
+   else if (offset_hack == OFFSET_HACK_ARM)
+     {
+        if ((gc->rot == 90) || (gc->rot == 180))
+          {
+             cx--;
+             cw--;
+          }
+        if ((gc->rot == 180) || (gc->rot == 270))
+          {
+             cy--;
+             ch--;
+          }
      }
-
-   x2++; y2++;
 
    evas_gl_common_context_line_push(gc, x1, y1, x2, y2,
                                     c, cx, cy, cw, ch,
index ee19400..6b892be 100644 (file)
@@ -2206,7 +2206,7 @@ eng_image_native_set(void *data, void *image, void *native)
                       int pixmap_att[20], i;
                       int config_attrs[40], num = 0;
                       int tex_format = 0, tex_target = 0, yinvert = 0, mipmap = 0;
-                      unsigned int target;
+                      unsigned int target = 0;
                       GLXFBConfig *configs;
                       
                       i = 0;
index 8160fa8..722c9a3 100644 (file)
@@ -623,21 +623,7 @@ eng_image_native_set(void *data __UNUSED__, void *image, void *native __UNUSED__
    Evas_Native_Surface *ns = native;
    Image_Entry *im = image, *im2 = NULL;
 
-   if (!im)
-     {
-        if ((ns) && (ns->data.x11.visual))
-          {
-             im = evas_cache_image_data(evas_common_image_cache_get(),
-                                        im->w, im->h,
-                                        ns->data.x11.visual, 1,
-                                        EVAS_COLORSPACE_ARGB8888);
-             return im;
-          }
-        else
-           return NULL;
-     }
-
-   if ((!ns) && (!im)) return im;
+   if (!im || !ns) return im;
 
    if (!ns) return im;
 
index 73a62bc..c4f7089 100644 (file)
@@ -82,7 +82,7 @@ struct _Outbuf
                   Pixmap mask;
                   Visual *vis;
                   Colormap cmap;
-                  int depth, shm;
+                  int depth, imdepth, shm;
                   GC gc, gcm;
                   unsigned char swap : 1;
                   unsigned char bit_swap : 1;
@@ -97,7 +97,7 @@ struct _Outbuf
                   xcb_pixmap_t mask;
                   xcb_visualtype_t *visual;
                   xcb_colormap_t cmap;
-                  int depth, shm;
+                  int depth, imdepth, shm;
                   xcb_gcontext_t gc, gcm;
                   unsigned char swap : 1;
                   unsigned char bit_swap : 1;
index b84ee16..042248d 100644 (file)
@@ -87,7 +87,8 @@ Outbuf *
 evas_software_xcb_outbuf_setup(int w, int h, int rot, Outbuf_Depth depth, xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *vis, xcb_colormap_t cmap, int xdepth, Eina_Bool grayscale, int max_colors, xcb_drawable_t mask, Eina_Bool shape_dither, Eina_Bool alpha) 
 {
    Outbuf *buf = NULL;
-   Gfx_Func_Convert func_conv= NULL;
+   Gfx_Func_Convert func_conv = NULL;
+   Xcb_Output_Buffer *xob;
    const xcb_setup_t *setup;
 
    if (!(buf = calloc(1, sizeof(Outbuf)))) 
@@ -108,6 +109,27 @@ evas_software_xcb_outbuf_setup(int w, int h, int rot, Outbuf_Depth depth, xcb_co
    buf->priv.destination_alpha = alpha;
    buf->priv.x11.xcb.shm = evas_software_xcb_can_do_shm(conn, screen);
 
+   xob = 
+     evas_software_xcb_output_buffer_new(buf->priv.x11.xcb.conn, 
+                                         buf->priv.x11.xcb.visual, 
+                                         buf->priv.x11.xcb.depth, 
+                                         1, 1, buf->priv.x11.xcb.shm, 
+                                         NULL);
+   if (!xob) buf->priv.x11.xcb.shm = 0;
+   xob = 
+     evas_software_xcb_output_buffer_new(buf->priv.x11.xcb.conn, 
+                                         buf->priv.x11.xcb.visual, 
+                                         buf->priv.x11.xcb.depth, 
+                                         1, 1, buf->priv.x11.xcb.shm, 
+                                         NULL);
+   if (!xob) 
+     {
+        free(buf);
+        return NULL;
+     }
+   buf->priv.x11.xcb.imdepth = evas_software_xcb_output_buffer_depth(xob);
+   evas_software_xcb_output_buffer_free(xob, EINA_FALSE);
+   
    eina_array_step_set(&buf->priv.onebuf_regions, sizeof(Eina_Array), 8);
 
 #ifdef WORDS_BIGENDIAN
@@ -284,8 +306,11 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w,
         alpha = ((buf->priv.x11.xcb.mask) || (buf->priv.destination_alpha));
         use_shm = buf->priv.x11.xcb.shm;
 
-        if ((buf->rot == 0) && (buf->priv.mask.r == 0xff0000) && 
-            (buf->priv.mask.g == 0x00ff00) && (buf->priv.mask.b == 0x0000ff)) 
+        if ((buf->rot == 0) &&
+            (buf->priv.x11.xcb.imdepth == 32) &&
+            (buf->priv.mask.r == 0xff0000) &&
+            (buf->priv.mask.g == 0x00ff00) &&
+            (buf->priv.mask.b == 0x0000ff))
           {
              obr->xcbob = 
                evas_software_xcb_output_buffer_new(buf->priv.x11.xcb.conn, 
@@ -424,8 +449,11 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w,
 
    use_shm = buf->priv.x11.xcb.shm;
    alpha = ((buf->priv.x11.xcb.mask) || (buf->priv.destination_alpha));
-   if ((buf->rot == 0) && (buf->priv.mask.r == 0xff0000) && 
-       (buf->priv.mask.g == 0x00ff00) && (buf->priv.mask.b == 0x0000ff)) 
+   if ((buf->rot == 0) &&
+       (buf->priv.x11.xcb.imdepth == 32) &&
+       (buf->priv.mask.r == 0xff0000) && 
+       (buf->priv.mask.g == 0x00ff00) &&
+       (buf->priv.mask.b == 0x0000ff)) 
      {
         obr->xcbob = 
           _find_xcbob(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.visual, 
@@ -836,13 +864,35 @@ evas_software_xcb_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, in
    if (data != (unsigned char *)src_data) 
      {
         if (buf->priv.pal)
-          func_conv(src_data, data, update->cache_entry.w - w, 
-                    (bpl / (buf->depth / 8)) - obr->w, 
-                    obr->w, obr->h, x, y, buf->priv.pal->lookup);
+          {
+             func_conv(src_data, data, update->cache_entry.w - w, 
+                       bpl - obr->w, obr->w, obr->h, x, y,
+                       buf->priv.pal->lookup);
+          }
         else
-          func_conv(src_data, data, update->cache_entry.w - w, 
-                    (bpl / (buf->depth / 8)) - obr->w, 
-                    obr->w, obr->h, x, y, NULL);
+          {
+             int pixelb = evas_software_xcb_output_buffer_depth(obr->xob) / 8;
+             int run;
+             int dstjump;
+             
+             if (pixelb == 3)
+               {
+                  run = obr->w * pixelb;
+                  dstjump = bpl - run;
+               }
+             else if ((pixelb == 2) || (pixelb == 4))
+               {
+                  run = obr->w;
+                  dstjump = (bpl / pixelb) - run;
+               }
+             else
+               {
+                  run = obr->w;
+                  dstjump = bpl - run;
+               }
+             func_conv(src_data, data, update->cache_entry.w - w, dstjump,
+                       obr->w, obr->h, x, y, NULL);
+          }
      }
 #if 1
 #else
@@ -1065,7 +1115,7 @@ _find_xcbob(xcb_connection_t *conn, xcb_visualtype_t *vis, int depth, int w, int
      return evas_software_xcb_output_buffer_new(conn, vis, depth, w, h, 
                                                 shm, data);
 
-   lbytes = (((w + 31) / 32) * 4);
+   lbytes = (((w + 63) / 64) * 4);
    if (depth > 1) 
      {
         bpp = (depth / 8);
@@ -1080,7 +1130,7 @@ _find_xcbob(xcb_connection_t *conn, xcb_visualtype_t *vis, int depth, int w, int
         int szdif = 0;
 
         if ((xcbob2->xim->depth != depth) || (xcbob2->visual != vis) || 
-            (xcbob2->connection != conn)) continue;
+            (xcbob2->connection != conn) || (xcbob2->w != w)) continue;
         szdif = (xcbob2->psize - sz);
         if (szdif < 0) continue;
         if (szdif == 0) 
@@ -1107,7 +1157,7 @@ have_xcbob:
    _shmpool = eina_list_remove_list(_shmpool, xl);
    xcbob->w = w;
    xcbob->h = h;
-   xcbob->bpl = lbytes;
+//   xcbob->bpl = lbytes;
    xcbob->xim->width = xcbob->w;
    xcbob->xim->height = xcbob->h;
    xcbob->xim->stride = xcbob->bpl;
index ab4e777..9bbdd73 100644 (file)
@@ -53,7 +53,7 @@ _find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
        lbytes = (((w * bpp) + 3) / 4) * 4;
      }
    else
-     lbytes = ((w + 31) / 32) * 4;
+     lbytes = ((w + 63) / 64) * 4;
    sz = lbytes * h;
    SHMPOOL_LOCK();
    EINA_LIST_FOREACH(shmpool, l, xob2)
@@ -61,7 +61,7 @@ _find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
        int szdif;
 
        if ((xob2->xim->depth != depth) || (xob2->visual != v) ||
-           (xob2->display != d))
+           (xob2->display != d) || (xob2->w != w))
          continue;
        szdif = xob2->psize - sz;
        if (szdif < 0) continue;
@@ -89,7 +89,7 @@ _find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
    shmpool = eina_list_remove_list(shmpool, xl);
    xob->w = w;
    xob->h = h;
-   xob->bpl = lbytes;
+//   xob->bpl = lbytes;
    xob->xim->width = xob->w;
    xob->xim->height = xob->h;
    xob->xim->bytes_per_line = xob->bpl;
@@ -223,7 +223,6 @@ evas_software_xlib_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
                                                  buf->priv.x11.xlib.vis,
                                                  buf->priv.x11.xlib.depth,
                                                  1, 1, buf->priv.x11.xlib.shm, NULL);
-
       conv_func = NULL;
       if (xob)
        {
@@ -340,7 +339,8 @@ evas_software_xlib_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
                                                             buf->priv.mask.b, PAL_MODE_NONE,
                                                             buf->rot);
             }
-          evas_software_xlib_x_output_buffer_free(xob, 1);
+           buf->priv.x11.xlib.imdepth = evas_software_xlib_x_output_buffer_depth(xob);
+           evas_software_xlib_x_output_buffer_free(xob, 1);
           if (!conv_func)
             {
                 ERR("At depth: %i, RGB format mask: %08x %08x %08x, "
@@ -408,6 +408,7 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
 
        use_shm = buf->priv.x11.xlib.shm;
        if ((buf->rot == 0) &&
+            (buf->priv.x11.xlib.imdepth == 32) &&
            (buf->priv.mask.r == 0xff0000) &&
            (buf->priv.mask.g == 0x00ff00) &&
            (buf->priv.mask.b == 0x0000ff))
@@ -563,6 +564,7 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
    alpha = ((buf->priv.x11.xlib.mask) || (buf->priv.destination_alpha));
 
    if ((buf->rot == 0) &&
+       (buf->priv.x11.xlib.imdepth == 32) &&
        (buf->priv.mask.r == 0xff0000) &&
        (buf->priv.mask.g == 0x00ff00) &&
        (buf->priv.mask.b == 0x0000ff))
@@ -1009,21 +1011,34 @@ evas_software_xlib_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, i
    if (buf->priv.pal)
      {
        if (data != (unsigned char *)src_data)
-         conv_func(src_data, data,
-                   update->cache_entry.w - w,
-                   bpl /
-                   ((evas_software_xlib_x_output_buffer_depth(obr->xob) /
-                     8)) - obr->w, obr->w, obr->h, x, y,
-                   buf->priv.pal->lookup);
+         conv_func(src_data, data, update->cache_entry.w - w,
+                    bpl - obr->w, obr->w, obr->h, x, y,
+                    buf->priv.pal->lookup);
      }
    else
      {
+        int pixelb = evas_software_xlib_x_output_buffer_depth(obr->xob) / 8;
+        int run;
+        int dstjump;
+        
+        if (pixelb == 3)
+          {
+             run = obr->w * pixelb;
+             dstjump = bpl - run;
+          }
+        else if ((pixelb == 2) || (pixelb == 4))
+          {
+             run = obr->w;
+             dstjump = (bpl / pixelb) - run;
+          }
+        else
+          {
+             run = obr->w;
+             dstjump = bpl - run;
+          }
        if (data != (unsigned char *)src_data)
-         conv_func(src_data, data,
-                   update->cache_entry.w - w,
-                   bpl /
-                   ((evas_software_xlib_x_output_buffer_depth(obr->xob) /
-                     8)) - obr->w, obr->w, obr->h, x, y, NULL);
+         conv_func(src_data, data, update->cache_entry.w - w, dstjump,
+                    obr->w, obr->h, x, y, NULL);
      }
 #if 1
 #else