summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/outdev.hxx30
-rw-r--r--include/vcl/print.hxx16
-rw-r--r--vcl/source/gdi/print.cxx8
-rw-r--r--vcl/source/outdev/bitmap.cxx4
4 files changed, 27 insertions, 31 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 57c32f240ee4..990c47a1471e 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -544,19 +544,13 @@ public:
SAL_DLLPRIVATE void ImplDrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
///@}
- /** @name Bitmap functions
- */
- ///@{
SAL_DLLPRIVATE void ImplDrawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
- SAL_DLLPRIVATE void DrawAlphaBitmap ( const Bitmap& rBmp, const AlphaMask& rAlpha,
- const Point& rDestPt, const Size& rDestSize,
- const Point& rSrcPtPixel, const Size& rSrcSizePixel );
+
virtual void ClipToPaintRegion ( Rectangle& rDstRect );
SAL_DLLPRIVATE void ImplPrintTransparent ( const Bitmap& rBmp, const Bitmap& rMask,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel );
SAL_DLLPRIVATE Color ImplDrawModeToColor ( const Color& rColor ) const;
- ///@}
/** @name Frame functions
*/
@@ -861,6 +855,13 @@ public:
const Image& rImage,
sal_uInt16 nStyle = 0 );
+
+ virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
+
+ /** Query extended bitmap (with alpha channel, if available).
+ */
+ BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
+
/** Retrieve downsampled and cropped bitmap
@attention This method ignores negative rDstSz values, thus
@@ -926,6 +927,15 @@ protected:
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
BitmapEx& rBitmapEx );
private:
+
+ SAL_DLLPRIVATE void DrawAlphaBitmap(
+ const Bitmap& rBmp,
+ const AlphaMask& rAlpha,
+ const Point& rDestPt,
+ const Size& rDestSize,
+ const Point& rSrcPtPixel,
+ const Size& rSrcSizePixel );
+
SAL_DLLPRIVATE Bitmap BlendBitmap(
Bitmap aBmp,
BitmapReadAccess* pP,
@@ -1503,12 +1513,6 @@ public:
Color GetPixel( const Point& rPt ) const;
- Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
-
- /** Query extended bitmap (with alpha channel, if available).
- */
- BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
-
// Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
virtual void EnableRTL( bool bEnable = true);
bool IsRTLEnabled() const { return mbEnableRTL; }
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index c29f8458113c..b02f739d4451 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -51,9 +51,6 @@ namespace vcl {
}
-// - Printer-Types -
-
-
#define PAGEQUEUE_ALLPAGES 0xFFFF
enum PrinterSupport { SUPPORT_SET_ORIENTATION, SUPPORT_SET_PAPERBIN,
@@ -62,9 +59,6 @@ enum PrinterSupport { SUPPORT_SET_ORIENTATION, SUPPORT_SET_PAPERBIN,
SUPPORT_SETUPDIALOG, SUPPORT_FAX, SUPPORT_PDF };
-// - PrinterPage -
-
-
class VCL_DLLPUBLIC PrinterPage
{
GDIMetaFile* mpMtf;
@@ -85,9 +79,6 @@ public:
-// - QueueInfo -
-
-
class VCL_DLLPUBLIC QueueInfo
{
friend class Printer;
@@ -119,9 +110,6 @@ public:
};
-// - PrinterOptions -
-
-
enum PrinterTransparencyMode
{
PRINTER_TRANSPARENCY_AUTO = 0,
@@ -208,9 +196,6 @@ public:
};
-// - Printer -
-
-
class VCL_DLLPUBLIC Printer : public OutputDevice
{
friend class OutputDevice;
@@ -278,6 +263,7 @@ protected:
public:
void DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient );
+ virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const SAL_OVERRIDE;
protected:
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index b3daa804a7e6..5b571d9ea6ab 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1844,4 +1844,12 @@ void Printer::DrawImage( const Point&, const Size&, const Image&, sal_uInt16 )
assert(false);
}
+
+Bitmap Printer::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
+{
+ SAL_WARN("vcl.gdi", "GetBitmap(): This should never be called on by a Printer instance");
+
+ return OutputDevice::GetBitmap( rSrcPt, rSize );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 019fe99a5a68..68e13c742535 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -474,7 +474,7 @@ bool OutputDevice::TransformAndReduceBitmapExToTargetRange(
aVisibleRange.transform(aMakeVisibleRangeRelative);
}
- // for pixel devices, do *not* limit size, else OutputDevice::ImplDrawAlpha
+ // for pixel devices, do *not* limit size, else OutputDevice::DrawAlphaBitmap
// will create another, badly scaled bitmap to do the job. Nonetheless, do a
// maximum clipping of something big (1600x1280x2). Add 1.0 to avoid rounding
// errors in rough estimations
@@ -880,8 +880,6 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
{
- OSL_ENSURE(OUTDEV_PRINTER != GetOutDevType(), "OutputDevice::GetBitmap with sorce type OUTDEV_PRINTER should not be used (!)");
-
Bitmap aBmp;
long nX = ImplLogicXToDevicePixel( rSrcPt.X() );
long nY = ImplLogicYToDevicePixel( rSrcPt.Y() );