summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/vcl/bitmapex.hxx23
-rw-r--r--include/vcl/bmpacc.hxx10
2 files changed, 30 insertions, 3 deletions
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 9a0d159d6b74..73ae31ed9c56 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -393,25 +393,42 @@ public:
@param rTransformation
The back transformation for each pixel in (0 .. fWidth),(0 .. fHeight) to
local pixel coordiantes
+
+ @param bSmooth
+ Defines if pixel interpolation is to be used to create the result
*/
BitmapEx TransformBitmapEx(
double fWidth,
double fHeight,
- const basegfx::B2DHomMatrix& rTransformation) const;
+ const basegfx::B2DHomMatrix& rTransformation,
+ bool bSmooth = true) const;
/** Create transformed Bitmap
@param rTransformation
- The transformation from unit coordinates to target
+ The transformation from unit coordinates to the unit range
+
+ @param rVisibleRange
+ The relative visible range in unit coordinates, relative to (0,0,1,1) which
+ defines the whole target area
@param fMaximumArea
A limitation for the maximum size of pixels to use for the result
+ @param bSmooth
+ Defines if pixel interpolation is to be used to create the result
+
+ The traget size of the result bitmap is defined by transforming the given
+ rTargetRange with the given rTransformation; the area of the result is
+ linearly scaled to not exceed the given fMaximumArea
+
@return The transformed bitmap
*/
BitmapEx getTransformed(
const basegfx::B2DHomMatrix& rTransformation,
- double fMaximumArea = 500000.0) const;
+ const basegfx::B2DRange& rVisibleRange,
+ double fMaximumArea = 500000.0,
+ bool bSmooth = true) const;
/** Create ColorStack-modified version of this BitmapEx
diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx
index ea36a05b0d36..70015ba17fa6 100644
--- a/include/vcl/bmpacc.hxx
+++ b/include/vcl/bmpacc.hxx
@@ -158,6 +158,16 @@ public:
inline BitmapColor GetColor( long nY, long nX ) const;
inline sal_uInt8 GetPixelIndex( long nY, long nX ) const;
inline sal_uInt8 GetLuminance( long nY, long nX ) const;
+
+ /** Get the interpolated color at coordinates fY, fX; if outside, return rFallback */
+ BitmapColor GetInterpolatedColorWithFallback( double fY, double fX, const BitmapColor& rFallback ) const;
+
+ /** Get the color at coordinates fY, fX; if outside, return rFallback. Automatically does the correct
+ inside/outside checks, e.g. static_cast< sal_uInt32 >(-0.25) *is* 0, not -1 and has to be outside */
+ BitmapColor GetColorWithFallback( double fY, double fX, const BitmapColor& rFallback ) const;
+
+ /** Get the color at coordinates nY, nX; if outside, return rFallback */
+ BitmapColor GetColorWithFallback( long nY, long nX, const BitmapColor& rFallback ) const;
};
// ---------------------