Page MenuHomePhabricator

enum Efl.Gfx.Image_Scale_Type
Closed, ResolvedPublic

Description

enum @beta Efl.Gfx.Image_Scale_Type
{
   [[Enumeration that defines scale types of an image.]]
   none,        [[Use the image's natural size.]]
   fill,        [[Scale the image so that it matches
                  the object's area exactly.
                  The image's aspect ratio might be changed.]]
   fit,         [[Scale the image
                  so that it fits completely inside the object's area
                  while maintaining the aspect ratio.
                  At least one of the dimensions of the image
                  will be equal to the corresponding dimension
                  of the object.]]
   fit_width,   [[Scale the image
                  so that it covers the entire object area horizontally
                  while maintaining the aspect ratio.
                  The image may become taller than the object.]]
   fit_height,  [[Scale the image
                  so that it covers the entire object area vertically
                  while maintaining the aspect ratio.
                  The image may become wider than the object.]]
   expand,      [[Scale the image
                  so that it covers the entire object area on one axis
                  while maintaining the aspect ratio, preferring whichever
                  axis is largest.
                  The image may become larger than the object.]]
   tile,        [[Tile image at its original size.]]
}

Related Objects

StatusAssignedTask
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
segfaultxavi triaged this task as TODO priority.
ali.alzyod added a subscriber: ali.alzyod.EditedAug 2 2019, 10:51 AM

Just Idea
I know Android use same name for this property, but it is not clear what does it mean, it may understood as scaling algorithm used like ( Bilinear, Bicubic, .. etc).

but when using more specific name like (resize_mode, fit_mode, stretch_mode) because it is related to viewing not actual image property.

I also suggest modes to be :
main modes
-None (actual size),
-Fit,
-Fill,
-Stretch(aspect ration Change),
-FitWidth,
-FitHeight
-Tile (I did not use such property in image control before )

Also I suggest other property for Image Viewing called Align (it can be flags)

  • left
  • top
  • bottom
  • right
  • center

And since these properties related to viewing content should be inside efl.ui.image widget which is responsible for viewing image

zmike updated the task description. (Show Details)Aug 30 2019, 11:09 AM

I rewrote this a week or two ago. @woohyun does this fit your needs?

@segfaultxavi

zmike moved this task from Backlog to Trivial on the efl: api board.Aug 30 2019, 11:10 AM

I see nothing wrong with this?

Should this be renamed to Scale_Method or similar? Same with corresponding property.

Yeah, probably makes more sense.

zmike added a comment.Sep 23 2019, 7:18 PM

This was renamed, so I guess we're done here.

zmike moved this task from Trivial to Stabilized on the efl: api board.Sep 23 2019, 7:18 PM