Skip to content
Permalink
Browse files

Add dox comment, fix travis

  • Loading branch information
nirvn committed Dec 5, 2018
1 parent ad4b876 commit 60442980dd62146124b366cd94e34b8ecbab12fd
@@ -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.
@@ -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.
@@ -77,7 +77,7 @@ def testRemoteImage(self):
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.
Binary file not shown.

0 comments on commit 6044298

Please sign in to comment.
You can’t perform that action at this time.