efl/gfx.image: add can_upscale and can_downscale properties
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 22 Aug 2019 12:26:06 +0000 (08:26 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 23 Aug 2019 08:53:53 +0000 (17:53 +0900)
these are more granular properties which allow blocking of image
upscaling and/or downscaling regardless of scale hint

ref T7875

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9703

src/lib/efl/interfaces/efl_gfx_image.eo

index 1007326..5b8ea58 100644 (file)
@@ -88,6 +88,24 @@ interface @beta Efl.Gfx.Image
             scale_type: Efl.Gfx.Image_Scale_Type; [[Image scale type]]
          }
       }
+      @property can_upscale {
+         [[If $true, the image may be scaled to a larger size. If $false,
+           the image will never be resized larger than its native size.
+           This is set to $true by default.
+         ]]
+         values {
+            upscale: bool; [[Allow image upscaling]]
+         }
+      }
+      @property can_downscale {
+         [[If $true, the image may be scaled to a smaller size. If $false,
+           the image will never be resized smaller than its native size.
+           This is set to $true by default.
+         ]]
+         values {
+            downscale: bool; [[Allow image downscaling]]
+         }
+      }
       @property ratio {
          [[The native width/height ratio of the image.]]
          get {