Add dox comment, fix travis

This commit is contained in:
nirvn 2018-12-04 15:53:50 +07:00 committed by Mathieu Pellerin
parent ad4b876866
commit 60442980dd
5 changed files with 5 additions and 3 deletions

View File

@ -44,7 +44,8 @@ size, and then the result cached for subsequent lookups.
``path`` may be a local file, remote (HTTP) url, or a base 64 encoded string (with a "base64:" prefix).
The ``size`` parameter dictates the target size of the image. An invalid size indicates the
original raster image size (with no resampling).
original raster image size (with no resampling). A size in which the width or height is
set to zero will have the zeroed value automatically computed when keepAspectRatio is true.
If ``keepAspectRatio`` is true, then the original raster aspect ratio will be maintained during
any resampling operations.

View File

@ -106,7 +106,8 @@ class CORE_EXPORT QgsImageCache : public QgsAbstractContentCache< QgsImageCacheE
* \a path may be a local file, remote (HTTP) url, or a base 64 encoded string (with a "base64:" prefix).
*
* The \a size parameter dictates the target size of the image. An invalid size indicates the
* original raster image size (with no resampling).
* original raster image size (with no resampling). A size in which the width or height is
* set to zero will have the zeroed value automatically computed when keepAspectRatio is true.
*
* If \a keepAspectRatio is true, then the original raster aspect ratio will be maintained during
* any resampling operations.

View File

@ -77,7 +77,7 @@ class TestQgsImageCache(unittest.TestCase):
image, in_cache = QgsApplication.imageCache().pathAsImage(url, QSize(100, 100), 1.0, True)
self.assertTrue(self.imageCheck('Remote Image', 'remote_image', image))
self.assertEqual(QgsApplication.imageCache().originalSize(url), QSize(511, 800))
self.assertEqual(QgsApplication.imageCache().originalSize(url), QSize(511, 800), 1.0)
def testRemoteImageMissing(self):
"""Test fetching remote image with bad url"""

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB