Commit Graph

13 Commits

Author SHA1 Message Date
Jean-Philippe Andre d9fb0cdc34 Evas filters: Add transform filter
This is the simplest solution I can come up with for "mirror" effects.
Displacement maps are HARD to generate and use properly, since the buffer
size is unknown until runtime.
Even if we align the map to the text itself (using the padding information),
it's still hard to describe properly how to apply the displacement map, and
to generate it... So let's just add a simple flip operation.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 388a30950a Evas filters: Add padding info to filter runtime context 2014-02-07 17:33:17 +09:00
Jean-Philippe Andre e7a67dd13b Evas filters: Remove complicated displacement flags
The displacement effect is way too complicated. Let's keep it
simple and have only one displacement map format (RG + Alpha).

Here's what's missing now:
- Alpha support, to blend in the input with a variable intensity
- Extra padding (see below)

Also, the intensity VS. map values are not perfectly defined yet.

Problems: How to create a complete mirror effect (map needs to go
over boundaries... add extra padding to the buffers).
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre df60cd30c0 Evas filters: Start implementing stretch for blend
The fillmode is ignored when blending... for now.
First, implement none and stretch options for RGBA.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 2da17927da Evas filters: Implement fill with padding
Add parameters l, r, t, b to clip the fill area.
While l=x and t=y, the width and height of the clip are determined
at filter run-time, since we don't know the buffer size before.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 82032d494f Evas filters: Implement curve script API
Currently supports interpolation modes "none" and "linear".
Cubic interpolation is not implemented yet.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 7000907cd3 Evas filters: Move scaling to a common file
NOTE: Alpha scaling is NOT supported.
It could be faked in 3 expensive steps:
1. Draw to RGBA
2. Scale RGBA
3. Draw to Alpha.
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 40bb984b42 Evas filters: Implement mask stretch in RGBA blend
Brutal method for now: allocate YET ANOTHER buffer,
render scaled image to it (smooth scaling, oh yeah),
use this as a new mask.

For now, supports:
Alpha Input, RGBA mask, RGBA output, X,Y,XY stretching
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 9623e1f238 Evas filters: Pass fillmode to the filters
I just need to actually implement them, now :)
2014-02-07 17:33:16 +09:00
Jean-Philippe Andre 37eb6b6233 Evas filters: Change default buffer size to input size
This should make more commands work intuitively.
Now we still need to specify how to repeat or stretch buffers
when running commands.
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 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 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