[dali_2.3.29] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / public-api / images / image-operations.h
index 07b97df..8642976 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_IMAGE_OPERATIONS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -49,30 +49,33 @@ using ImageDimensions = Dali::Uint16Pair;
  */
 namespace FittingMode
 {
-  /**
+/**
    * @brief Enumeration for FittingMode type.
    * @SINCE_1_0.0
    */
-  enum Type
-  {
-    SHRINK_TO_FIT, ///< Fit full image inside desired width & height, potentially not
-                   ///  filling one of either the desired image width or height with
-                   ///  pixels.
-                   ///  @SINCE_1_0.0
-    SCALE_TO_FILL, ///< Image fills whole desired width & height with image data. The
-                   ///  image is centred in the desired dimensions, exactly touching
-                   ///  in one dimension, with image regions outside the other desired
-                   ///  dimension cropped away.
-                   ///  @SINCE_1_0.0
-    FIT_WIDTH,     ///< Image fills whole width. Height is scaled proportionately to
-                   ///  maintain aspect ratio.
-                   ///  @SINCE_1_0.0
-    FIT_HEIGHT     ///< Image fills whole height. Width is scaled proportionately to
-                   ///  maintain aspect ratio.
-                   ///  @SINCE_1_0.0
-  };
-  const Type DEFAULT = SHRINK_TO_FIT;
-}
+enum Type
+{
+  SHRINK_TO_FIT, ///< Fit full image inside desired width & height, potentially not
+                 ///  filling one of either the desired image width or height with
+                 ///  pixels.
+                 ///  @SINCE_1_0.0
+  SCALE_TO_FILL, ///< Image fills whole desired width & height with image data. The
+                 ///  image is centred in the desired dimensions, exactly touching
+                 ///  in one dimension, with image regions outside the other desired
+                 ///  dimension cropped away.
+                 ///  @SINCE_1_0.0
+  FIT_WIDTH,     ///< Image fills whole width. Height is scaled proportionately to
+                 ///  maintain aspect ratio.
+                 ///  @SINCE_1_0.0
+  FIT_HEIGHT,    ///< Image fills whole height. Width is scaled proportionately to
+                 ///  maintain aspect ratio.
+                 ///  @SINCE_1_0.0
+  VISUAL_FITTING /// < Image is scaled to fit within the desired dimensions.
+                 ///  maintain aspect ratio.
+                 ///  @SINCE_2_3.24
+};
+const Type DEFAULT = SHRINK_TO_FIT;
+} // namespace FittingMode
 
 /**
  * @brief Filtering options, used when resizing images to sample original pixels.
@@ -88,40 +91,40 @@ namespace FittingMode
  */
 namespace SamplingMode
 {
-  /**
+/**
    * @brief Enumeration for SamplingMode type.
    * @SINCE_1_0.0
    */
-  enum Type
-  {
-    BOX,              ///< Iteratively box filter to generate an image of 1/2, 1/4,
-                      ///  1/8, etc width and height and approximately the desired
-                      ///  size. This is the default.
-                      ///  @SINCE_1_0.0
-    NEAREST,          ///< For each output pixel, read one input pixel.
-                      ///  @SINCE_1_0.0
-    LINEAR,           ///< For each output pixel, read a quad of four input pixels
-                      ///  and write a weighted average of them.
-                      ///  @SINCE_1_0.0
-    BOX_THEN_NEAREST, ///< Iteratively box filter to generate an image of 1/2, 1/4,
-                      ///  1/8 etc width and height and approximately the desired
-                      ///  size, then for each output pixel, read one pixel from the
-                      ///  last level of box filtering.
-                      ///  @SINCE_1_0.0
-    BOX_THEN_LINEAR,  ///< Iteratively box filter to almost the right size, then for
-                      ///  each output pixel, read four pixels from the last level of
-                      ///  box filtering and write their weighted average.
-                      ///  @SINCE_1_0.0
-    NO_FILTER,        ///< No filtering is performed. If the SCALE_TO_FILL scaling mode
-                      ///  is enabled, the borders of the image may be trimmed to
-                      ///  match the aspect ratio of the desired dimensions.
-                      ///  @SINCE_1_0.0
-    DONT_CARE         ///< For caching algorithms where a client strongly prefers a
-                      ///  cache-hit to reuse a cached image.
-                      ///  @SINCE_1_0.0
-  };
-  const Type DEFAULT = BOX;
-}
+enum Type
+{
+  BOX,              ///< Iteratively box filter to generate an image of 1/2, 1/4,
+                    ///  1/8, etc width and height and approximately the desired
+                    ///  size. This is the default.
+                    ///  @SINCE_1_0.0
+  NEAREST,          ///< For each output pixel, read one input pixel.
+                    ///  @SINCE_1_0.0
+  LINEAR,           ///< For each output pixel, read a quad of four input pixels
+                    ///  and write a weighted average of them.
+                    ///  @SINCE_1_0.0
+  BOX_THEN_NEAREST, ///< Iteratively box filter to generate an image of 1/2, 1/4,
+                    ///  1/8 etc width and height and approximately the desired
+                    ///  size, then for each output pixel, read one pixel from the
+                    ///  last level of box filtering.
+                    ///  @SINCE_1_0.0
+  BOX_THEN_LINEAR,  ///< Iteratively box filter to almost the right size, then for
+                    ///  each output pixel, read four pixels from the last level of
+                    ///  box filtering and write their weighted average.
+                    ///  @SINCE_1_0.0
+  NO_FILTER,        ///< No filtering is performed. If the SCALE_TO_FILL scaling mode
+                    ///  is enabled, the borders of the image may be trimmed to
+                    ///  match the aspect ratio of the desired dimensions.
+                    ///  @SINCE_1_0.0
+  DONT_CARE         ///< For caching algorithms where a client strongly prefers a
+                    ///  cache-hit to reuse a cached image.
+                    ///  @SINCE_1_0.0
+};
+const Type DEFAULT = BOX;
+} // namespace SamplingMode
 
 /**
  * @}