EAPI void evas_object_anti_alias_set (Evas_Object *obj, Evas_Bool antialias);
EAPI Evas_Bool evas_object_anti_alias_get (const Evas_Object *obj);
+ EAPI void evas_object_scale_set (Evas_Object *obj, double scale);
+ EAPI double evas_object_scale_get (const Evas_Object *obj);
+
EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a);
EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a);
if (!obj) return NULL;
obj->magic = MAGIC_OBJ;
+ obj->cur.scale = 1.0;
+ obj->prev.scale = 1.0;
return obj;
}
MAGIC_CHECK_END();
if (obj->delete_me) return;
if (obj->cur.anti_alias == !!anti_alias)
- return;
+ return;
obj->cur.anti_alias = !!anti_alias;
evas_object_change(obj);
}
}
/**
+ * Sets the scaling factor for an evas object. Does not affect all objects.
+ * @param obj The given evas object.
+ * @param scale. The scaling factor. 1.0 == none.
+ * @ingroup Evas_Object_Group
+ */
+EAPI void
+evas_object_scale_set(Evas_Object *obj, double scale)
+{
+ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+ return;
+ MAGIC_CHECK_END();
+ if (obj->delete_me) return;
+ if (obj->cur.scale == scale)
+ return;
+ obj->cur.scale = scale;
+ evas_object_change(obj);
+}
+
+
+/**
+ * Retrieves the scaling factor for the given evas object.
+ * @param obj The given evas object.
+ * @return The scaling factor.
+ * @ingroup Evas_Object_Group
+ */
+EAPI double
+evas_object_scale_get(const Evas_Object *obj)
+{
+ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+ return 0;
+ MAGIC_CHECK_END();
+ if (obj->delete_me) return 1.0;
+ return obj->cur.scale;
+}
+
+/**
* Sets the color_space to be used for linear interpolation of colors.
* @param obj The given evas object.
* @param color_space, one of EVAS_COLOR_SPACE_ARGB or EVAS_COLOR_SPACE_AHSV.
evas_font_free(obj->layer->evas, o->engine_data);
o->engine_data = NULL;
}
- o->engine_data = evas_font_load(obj->layer->evas, font, o->cur.source, size);
+ o->engine_data = evas_font_load(obj->layer->evas, font, o->cur.source, size * obj->cur.scale);
if (!same_font)
{
if (o->cur.font) evas_stringshare_del(o->cur.font);
evas_object_render_pre_prev_cur_add(&rects, obj);
goto done;
}
+ if (obj->cur.scale != obj->prev.scale)
+ {
+ evas_object_render_pre_prev_cur_add(&rects, obj);
+ goto done;
+ }
if (o->changed)
{
if ((o->cur.size != o->prev.size) ||
buf = strdup(fmt->font.name);
fmt->font.font = evas_font_load(obj->layer->evas,
buf, fmt->font.source,
- fmt->font.size);
+ fmt->font.size * obj->cur.scale);
if (buf) free(buf);
if (of) evas_font_free(obj->layer->evas, of);
}
buf = strdup(fmt2->font.name);
fmt2->font.font = evas_font_load(obj->layer->evas,
buf, fmt2->font.source,
- fmt2->font.size);
+ fmt2->font.size * obj->cur.scale);
if (buf) free(buf);
return fmt2;
}
Evas_Bool dirty : 1;
} clip;
} cache;
+ double scale;
Evas_Coord_Rectangle geometry;
struct {
unsigned char r, g, b, a;