mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Add dox comment, fix travis
This commit is contained in:
parent
ad4b876866
commit
60442980dd
@ -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 @@ 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"""
|
||||
|
BIN
tests/testdata/control_images/image_cache/expected_opaque_image/expected_opaque_image.png
vendored
Normal file
BIN
tests/testdata/control_images/image_cache/expected_opaque_image/expected_opaque_image.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
tests/testdata/control_images/image_cache/expected_opaque_image/expected_opaque_image_mask.png
vendored
Normal file
BIN
tests/testdata/control_images/image_cache/expected_opaque_image/expected_opaque_image_mask.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
x
Reference in New Issue
Block a user