Page MenuHomePhabricator

elm_image_object_size_get reports the images size multiplied by elm scale
Closed, ResolvedPublic


Elm scale is 1.20 on my system

With a 48x48 PNG file elm_image_object_size_get reports its size as 57x57, and a 300x451 JPG is reported as 360x541.

Obviously the reported size has elm scale multiplier applied where it should be the real size of the image according to documentation:

@property object_size {
   get {
      [[Get the current size of the image.

        This is the real size of the image, not the size of the object.]]
kuuko created this task.Mar 4 2016, 2:47 AM
stefan_schmidt edited projects, added efl; removed Restricted Project.Jul 20 2016, 7:26 AM
raster closed this task as Invalid.Jul 25 2016, 10:36 PM
raster added a subscriber: raster.

umm errrr. that's no longer in the eo api for efl.ui.image but now it's Efl.Gfx.View.view_size.get ... now the question is in the interpretation. that description doesn't say to get the size in PIXELS. the real size. does it account for scaling? seemingly so. i do see something rather buggy tho in _efl_ui_image_efl_gfx_view_view_size_get() in like:

tw = tw > cw ? tw : cw;
th = th > ch ? th : ch;
tw = ((double)tw) * sd->scale;
th = ((double)th) * sd->scale;

that's going to lead to trouble++. i'll fix that.

raster changed the task status from Invalid to Resolved.Jul 25 2016, 11:22 PM

actually accounting for scaling at all is pretty broken. that's what scale down/up flags are for - they should account for scaling.