summaryrefslogtreecommitdiffstats
path: root/image/RasterImage.cpp
diff options
context:
space:
mode:
authorAndy <webmaster@RealityRipple.com>2020-07-31 13:01:18 -0700
committerAndy <webmaster@RealityRipple.com>2020-07-31 13:01:18 -0700
commit232f987cf45aad65d20e79d283f14c72771c9bc8 (patch)
tree1a794fa80b38b0248439085c8ce76b6dfce1cb3a /image/RasterImage.cpp
parent091749192cc7595a0013850fb450a5c1b6dde20b (diff)
downloadUXP-232f987cf45aad65d20e79d283f14c72771c9bc8.tar
UXP-232f987cf45aad65d20e79d283f14c72771c9bc8.tar.gz
UXP-232f987cf45aad65d20e79d283f14c72771c9bc8.tar.lz
UXP-232f987cf45aad65d20e79d283f14c72771c9bc8.tar.xz
UXP-232f987cf45aad65d20e79d283f14c72771c9bc8.zip
Issue #1619 - Convert Intrinsic Ratio to Float
https://bugzilla.mozilla.org/show_bug.cgi?id=1547792 Aspect Ratio handling simplified by using floating point integers: - Multiplication of value (or inverse value) to a known side for Scaling - No unequal equal values such as "4/3" vs "8/6" vs "20/15" - Truly "Empty" aspect ratios, even if one dimension is not 0
Diffstat (limited to 'image/RasterImage.cpp')
-rw-r--r--image/RasterImage.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp
index b67ec3bef..5725aee3a 100644
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -240,13 +240,14 @@ RasterImage::GetIntrinsicSize(nsSize* aSize)
//******************************************************************************
NS_IMETHODIMP
-RasterImage::GetIntrinsicRatio(nsSize* aRatio)
+RasterImage::GetIntrinsicRatio(AspectRatio* aRatio)
{
if (mError) {
return NS_ERROR_FAILURE;
}
- *aRatio = nsSize(mSize.width, mSize.height);
+ *aRatio = AspectRatio::FromSize(mSize);
+
return NS_OK;
}