Commit Graph

24467 Commits

Author SHA1 Message Date
Jean-Philippe Andre 22b8377255 Evas filters: Rename Text's special_effect into filter_chain
For consistency with Textblock.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 9da4789b66 Evas filters: Disable styles when filter_chain is set
Since the default theme includes a dark shadow behind normal
lines text (white on dark grey), we need to skip those when using
a filter program.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 109894bb56 Evas filters: Add fill command
This will simply clear the target buffer with the specified color.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 0a450b3ace Evas filters: Fix blur with small buffers
If the buffer is smaller than the blur kernel, then artifacts appear
and CRASHES happen because we read/write out of the buffer bounds.

Output buffer must be larger than the kernel diameter.
Input buffer's size is used to reduce the blurring effect on the edges.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 91e20084c1 Evas filters: Clear buffers after allocation
malloc() and mmap() don't return empty buffers, so blending on top
will present tons of artifacts.
Visible mostly on very small buffers as they are malloc()'ed from
previously used memory segments.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre aa945c25e0 Evas filters: Use strcasecmp in the parser
We don't care about the case for our language.
EVEN for buffer names, so beware :)
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre a5abbf784e Evas filters: Add basic support for clip in blend
Right now, clip is used only when blending RGBA surfaces.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre a0634dc04e Evas filters: Allow empty commands
If an instruction line contains only ';', skip it.
This is a convenience for Textblock and C++ style comments.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 0450e027e7 Evas filters: Add Eo APIs and some comments
The entry points on evas text are there!
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 98f745d140 Evas filters: Add all filters to Makefile
Compile the following evas_filter files:
- evas_filter.c
- blend.c
- blur.c
- bump.c
- curve.c
- displace.c
- mask.c
- parser.c
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 5e78ce5eeb Evas filters: Implement style parser
So, the (font) effects will be described by a string. It's
basically a new language (yeah yeah sorry), VERY simple, based
on function calls a la Python, with sequential and named arguments.

This string is intended to be passed directly to an evas text object
and embedded into the evas textblock's markup tags.

This file implements both the basic parsing functions, the
compilation of instructions into a queue of commands, and the glue
code for the rest of the filter infrastructure.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre d7ed901ffd Evas filters: Implement bump maps
These bump maps implement two light effects at once:
- 3D Shadows
- Specular lights

The specular light is activated by a flag.
Another flag enables compensation for darkening/whitening of
horizontal surfaces.

NOTE: This implementation is VERY SLOW.
It uses double values and divisions all over the place.
It might be possible to optimize by computing two LUTs before
running the algorithm.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 40c7f90bdc Evas filters: Implement displacement maps
Displacement maps are a simple but powerful tool to move pixels
around in a buffer, based on a displacement map (image).

Currently, various modes are implemented:
- X, Y or XY displacement
- Alpha map or RGBA map where R and G only are used

An intensity parameter is given as well.

Some of these might not be useful, we can just strip them off when
the final API is decided.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 6458df7a65 Evas filters: Implement color curves filter
Color curves are a very simple tool to alter the colors of an image,
on a per-pixel basis. This implementation will simply map each pixel
to a 256 bytes buffer, provided by the application.

NOTE: There are no convenience functions yet for easy curve
generation, but this is the plan (give point A, B, B and interpolate
between them to generate the 256 values array).
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 84caa5902e Evas filters: Implement blur functions
Currently supported:
- Box blur for Alpha and RGBA
- Gaussian blur for Alpha and RGBA

Motion blur is not implemented.

These effects are SLOW. Gaussian blur is based on a true gaussian
curve for small radii, or a sine-based approximation.
The true gaussian might need to be removed for consistency, since
it gives slightly different results from the sine one (less blur).

It is not possible to mix Alpha and RGBA surfaces in this filter.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 65d779c7a3 Evas filters: Implement other masking functions
These functions differ from normal blending as they will use
a mask on top of input and output buffers.
So, basically they blend input+mask into a third buffer output.

If output is RGBA then mask or input MUST be RGBA.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 3f0f703f50 Evas filters: Implement blend functions
Currently, blending supports the following:
- Alpha --> Alpha (simple alpha masking)
- Alpha + Color --> RGBA (same as mask)
- RGBA --> RGBA (normal blend)
- RGBA --> Alpha (desaturate using A=(R+G+B)/3)
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre af106ffc81 Evas filters: Import main implementation file
evas_filter.c contains the entry points for the evas filters subsystem,
in particular, the filter API, the (yet very basic) buffer management
system, the command queue and main context handling functions.

Right now, the Evas engine is left untouched, so these implementations
will work ONLY in the software engine.

NOTE: This will not compile on its own (thus, not added to Makefile.am),
as it will require the filter implementations to be linked.
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 5a06208230 Evas filters: Import main header file
evas_filter.h contains the API declarations for the internal
Evas Filter module: enums, functions and some documentation.
2014-02-07 17:33:16 +09:00
Carsten Haitzler dc9d37de0b ecore-x xpresent - fix build if you DONT have xpresent there. 2014-02-07 17:33:01 +09:00
Doyoun Kang 50b941f907 ecore_x: added @since comment about ecore_x_e_illume_window_state_send
Reviewers: seoz

CC: zmike, cedric, raster

Differential Revision: https://phab.enlightenment.org/D526
2014-02-07 17:06:22 +09:00
Jean-Philippe Andre 9adbbe0bd1 Evas fonts: Pass RGBA_Image instead of DATA32 buffer
Since we want to be able to draw to alpha buffers, it's
easier if we pass the whole image struct instead of just
the data pointer.
2014-02-07 15:38:43 +09:00
Jean-Philippe Andre 160d012559 Evas text utils: Check syntax in color parse
If the color string is not correct (ie. not #RRGGBBAA, #RGBA, #RGB, #RRGGBB),
return an error.
2014-02-07 15:38:42 +09:00
Jean-Philippe Andre 2928a2d2da Evas: Move _format_color_parse to common file
This (simple) code should be shared between Textblock and Filters.
2014-02-07 15:38:42 +09:00
Jean-Philippe Andre d8301fae6e Evas: Add support for Alpha buffers
Evas is an RGBA only engine, BUT we also use some alpha masks,
especially in the font rendering pipeline.
This commit adds basic support for alpha buffer operations
(blend and copy).

RGBA_Image can then point to either alpha-only data, if
its colorspace is grey.
2014-02-07 15:38:42 +09:00
Jaehwan Kim 71c7d0e9ad ecore_x: Add ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_OVER.
This Atom is for accessibility.
In the touch screen, when the finger moves continuously, it is uesd.
2014-02-07 14:51:28 +09:00
ChunEon Park 5efa4f9305 evas/common - code refactoring.
tiny change for readibility.
2014-02-07 13:39:11 +09:00
Doyoun Kang 541ef547ab ecore_x: Added API - ecore_x_e_illume_window_state_send
Summary:
there exists ecore_x_e_illume_window_state_set and ecore_x_e_illume_window_state_get,
but no ecore_x_e_illume_window_state_send.

Reviewers: raster, seoz, cedric

Reviewed By: seoz

CC: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D512
2014-02-07 13:05:00 +09:00
Vincent Torri b1954cc74d autotools: use libevil libdl implementation.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-07 12:56:37 +09:00
Wonsik Jung 3420eda31a evas: gl backend - ensure eng_window_use in image_content_hint_set
Summary: Ensure eng_window_use in image_content_hint_set

Test Plan:
1. make native OpenGLES application.
2. set evas object image  with evas_object_image_native_surface_set.
3. GLES Application try to call eglMakeCurrent with own eglContext, then resize evas object resize

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

CC: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D523

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-07 12:18:16 +09:00
Vyacheslav Reutskiy 793a1a5c1c edje: edje_calc - fix deffect by find the part description when 'approximate' is EINA_FALSE
Reviewers: cedric, raster, seoz

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D495

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-07 12:16:21 +09:00
Tom Hacohen ec41f67be4 Evas font: Change font fallback to not depend on fontconfig >= 2.11.
Apparently, it was available for quite a while. It's just a case of confusing documentation
that made me think the minimum version is 2.11.
2014-02-05 13:54:41 +00:00
Tom Hacohen 9cc7e69338 Evas textblock: Improved error messages when detecting errors in markup. 2014-02-05 13:51:22 +00:00
Youngbok Shin c48c9827ff evas: textblock - Added Null checking in evas_textblock_text_markup_to_utf8 before calling eina_strbuf_append_length API.
Summary:
When input string has non-finished markup tags or escaped tags,
eina_strbuf_append_length is called with Null string.
There is a Null checking in eina_strbuf_* API, but it will print error message when input string is Null.
Strictly speaking, *_markup_to_utf8 API could be used with any kind of input string.
So, we need to add Null checking for removing the useless error message.

Test Plan:
Call the API like the following code.
evas_textblock_text_markup_to_utf8(NULL, "test_text&&&&");

ERR message will be printed.

Reviewers: woohyun, tasn, seoz, Hermet, hbr4570

CC: cedric

Differential Revision: https://phab.enlightenment.org/D493
2014-02-05 13:23:55 +00:00
ChunEon Park eea4fbff6a evas/map - added comment to do. 2014-02-05 20:55:38 +09:00
Cedric BAIL b7b6b5f956 eina: restore magic debug option for ABI compatibility purpose.
We can't remove that option as it break ABI for people who did turn
it off in 1.7.

- cherry-pick me -
2014-02-05 11:10:29 +09:00
Tom Hacohen 17d028f944 Evas font: Added support for font fallback for eet/edje fonts.
This is a long awaited feature that has been requested years ago.
Fontconfig finally added the support needed to make it happen, so here
it is.

I added a fontconfig query to look for similar fonts in case we loaded a
font from eet/edje/file(no fontconfig). This now works quite well.

Still missing: if you load a bold/italic/whatever font directly (set the file)
without putting ":weight=bold" you will not get run-time emboldenment if
only non-bold fonts are found.

This unfortunately depends on very recent fontconfig version (#ifed out
when unavailable), so only people with fontconfig >= 2.11 will enjoy
this feature.
2014-02-04 10:44:11 +00:00
Tom Hacohen 1c44890491 Evas font: Renamed evas_load_fontconfig and added support for a base set.
Renamed it so it'll be more obvious that it's internal.
Added the parameter as the first step towards supporting edje font
fallback using fontconfig.
2014-02-04 10:44:11 +00:00
zmike c3ece04211 edje embryo reset timer should probably call the reset function 2014-02-03 18:23:50 -05:00
zmike 0ee6327035 edje embryo now supports reset_timer()
works the same as ecore_timer_reset()
2014-02-03 17:19:31 -05:00
Mike Blumenkrantz a5a907023d edje freeze count can no longer become negative 2014-02-03 11:52:06 -05:00
Cedric BAIL 90cd40753d Patcna: fix wrong widgth and height in eina_rectangle computation logic.
Reviewers: cedric, raster, seoz, Hermet, bluezery

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D500

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-03 15:35:44 +09:00
Carsten Haitzler ef2127c900 evas - fix tom's bold-killer from 2cb9db171e 2014-02-02 10:59:33 +09:00
Jihoon Kim ab712a9966 evas: fix doxygen warning in group of Evas_Key
Evas_Common.h:5243: warning: end of file while inside a group
2014-02-01 14:19:38 +09:00
Jihoon Kim 4fb75474d8 edje: fix the mismatched argument name with doxygen
warning: argument 'above' of command @param is not found in the argument list of edje_edit_part_restack_part_above(Evas_Object *obj, const char *part, const char *below)
2014-02-01 13:32:57 +09:00
Jihoon Kim a759462078 edje: call imf reset before selecting text area 2014-02-01 10:32:53 +09:00
maxerba 06490efc22 Updating hungarian and italian translations 2014-01-29 19:18:58 +01:00
Tom Hacohen 19cde8f194 Evas font: Added support for the freetype spacing tag.
This doesn't work nicely, as for some reason fontconfig doesn't work
nicely with ':spacing=mono' without a font name.
Doesn't work with fc-match either. It does work with fc-list, but that's
not what we'd like to use. It could be just an issue with my local
fontconfig configuration.

This fixes T865 although the problem is now with freetype.
2014-01-29 14:36:22 +00:00
Tom Hacohen 2cb9db171e Evas font: Added support for weight/width/slant font tags.
This let's you set those directly, instead of using the style tag.
2014-01-29 14:10:43 +00:00
Tom Hacohen 22813f5b52 Evas textblock: Fix selection with bidi text.
This is a regression introduced in
548e548632.

This is really bad, and essentially broke selection geometry for bidi
text. Very serious.

The problematic code assumed that the range comparison for the items
assumed the item marked with 1 is always logically before the item marked
with 2, which is just not true.
2014-01-29 13:27:45 +00:00