forked from enlightenment/efl
evas: move Evas.VG to use Efl.Gfx.Fill.
This commit is contained in:
parent
7ba7ed4a1c
commit
5f2527f791
|
@ -441,8 +441,8 @@ _evas_vg_size_set(Eo *obj EINA_UNUSED, Evas_VG_Data *pd,
|
|||
}
|
||||
|
||||
void
|
||||
_evas_vg_fill_set(Eo *obj EINA_UNUSED, Evas_VG_Data *pd,
|
||||
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
|
||||
_evas_vg_efl_gfx_fill_fill_set(Eo *obj EINA_UNUSED, Evas_VG_Data *pd,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
pd->fill.x = x;
|
||||
pd->fill.y = y;
|
||||
|
@ -451,8 +451,8 @@ _evas_vg_fill_set(Eo *obj EINA_UNUSED, Evas_VG_Data *pd,
|
|||
}
|
||||
|
||||
void
|
||||
_evas_vg_fill_get(Eo *obj EINA_UNUSED, Evas_VG_Data *pd,
|
||||
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
||||
_evas_vg_efl_gfx_fill_fill_get(Eo *obj EINA_UNUSED, Evas_VG_Data *pd,
|
||||
int *x, int *y, int *w, int *h)
|
||||
{
|
||||
if (x) *x = pd->fill.x;
|
||||
if (y) *y = pd->fill.y;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Evas.VG (Evas.Object, Efl.File)
|
||||
class Evas.VG (Evas.Object, Efl.File, Efl.Gfx.Fill)
|
||||
{
|
||||
legacy_prefix: evas_object_vg;
|
||||
eo_prefix: evas_obj_vg;
|
||||
|
@ -30,62 +30,14 @@ class Evas.VG (Evas.Object, Efl.File)
|
|||
uint h;
|
||||
}
|
||||
}
|
||||
fill {
|
||||
set {
|
||||
/*@
|
||||
Set how to fill an image object's drawing rectangle given the
|
||||
(real) image bound to it.
|
||||
|
||||
Note that if @p w or @p h are smaller than the dimensions of
|
||||
@p obj, the displayed image will be @b tiled around the object's
|
||||
area. To have only one copy of the bound image drawn, @p x and @p y
|
||||
must be 0 and @p w and @p h need to be the exact width and height
|
||||
of the image object itself, respectively.
|
||||
|
||||
See the following image to better understand the effects of this
|
||||
call. On this diagram, both image object and original image source
|
||||
have @c a x @c a dimensions and the image itself is a circle, with
|
||||
empty space around it:
|
||||
|
||||
@image html image-fill.png
|
||||
@image rtf image-fill.png
|
||||
@image latex image-fill.eps
|
||||
|
||||
@warning The default values for the fill parameters are @p x = 0,
|
||||
@p y = 0, @p w = 0 and @p h = 0. Thus, if you're not using the
|
||||
evas_object_image_filled_add() helper and want your image
|
||||
displayed, you'll have to set valid values with this function on
|
||||
your object.
|
||||
|
||||
@note evas_object_image_filled_set() is a helper function which
|
||||
will @b override the values set here automatically, for you, in a
|
||||
given way. */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieve how an image object is to fill its drawing rectangle,
|
||||
given the (real) image bound to it.
|
||||
|
||||
@note Use @c NULL pointers on the fill components you're not
|
||||
interested in: they'll be ignored by the function.
|
||||
|
||||
See @ref evas_object_image_fill_set() for more details. */
|
||||
}
|
||||
values {
|
||||
Evas_Coord x; /*@ The x coordinate (from the top left corner of the bound
|
||||
image) to start drawing from. */
|
||||
Evas_Coord y; /*@ The y coordinate (from the top left corner of the bound
|
||||
image) to start drawing from. */
|
||||
Evas_Coord w; /*@ The width the bound image will be displayed at. */
|
||||
Evas_Coord h; /*@ The height the bound image will be displayed at. */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Eo.Base.constructor;
|
||||
Efl.File.file.set;
|
||||
Efl.File.file.get;
|
||||
Efl.File.mmap.set;
|
||||
Efl.File.mmap.get;
|
||||
Efl.Gfx.Fill.fill.set;
|
||||
Efl.Gfx.Fill.fill.get;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue