Evas loader: Introduce border param
This commit is contained in:
parent
8c80b1a7f4
commit
2b191b3c51
|
@ -181,6 +181,10 @@ struct _Evas_Image_Property
|
|||
|
||||
const Evas_Colorspace *cspaces; /**< Specify the color space handled by the loader @since 1.10 */
|
||||
Evas_Colorspace cspace; /**< Specify the color space handle by the engine @since 1.10 */
|
||||
|
||||
struct {
|
||||
unsigned char l, r, t, b; /**< Specify the dimensions of duplicated pixels borders (for OpenGL compressed textures). Set by the loader. @since 1.11 */
|
||||
} borders;
|
||||
};
|
||||
|
||||
struct _Evas_Image_Animated
|
||||
|
|
|
@ -607,6 +607,11 @@ struct _Image_Entry
|
|||
unsigned int h;
|
||||
} allocated;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned char l, r, t, b;
|
||||
} borders; // Duplicated borders for use by GL engines.
|
||||
|
||||
struct
|
||||
{
|
||||
Evas_Module *module;
|
||||
|
|
|
@ -239,6 +239,10 @@ evas_image_load_file_head_tgv(void *loader_data,
|
|||
|
||||
prop->w = loader->size.width;
|
||||
prop->h = loader->size.height;
|
||||
prop->borders.l = 1;
|
||||
prop->borders.t = 1;
|
||||
prop->borders.r = roundup(loader->size.width + 2, 4) - prop->w - 1;
|
||||
prop->borders.b = roundup(loader->size.height + 2, 4) - prop->h - 1;
|
||||
|
||||
ret = EINA_TRUE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue