Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add dox comment, fix travis
  • Loading branch information
nirvn committed Dec 5, 2018
1 parent ad4b876 commit 6044298
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion python/core/auto_generated/qgsimagecache.sip.in
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsimagecache.h
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsimagecache.py
Expand Up @@ -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"""
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6044298

Please sign in to comment.