137 const bool bOldMap =
mbMap;
147 const bool bTransparent = aBmpEx.
IsAlpha();
151 bool bDrawGradientBackground =
false;
152 bool bDrawColorBackground =
false;
158 bDrawGradientBackground =
true;
164 aVDev->SetBackground( rWallpaper.
GetColor() );
165 aVDev->SetOutputSizePixel(
Size( nBmpWidth, nBmpHeight ) );
166 aVDev->DrawBitmapEx(
Point(), aBmpEx );
167 aBmpEx = aVDev->GetBitmapEx(
Point(), aVDev->GetOutputSizePixel() );
170 bDrawColorBackground =
true;
176 bDrawGradientBackground =
true;
178 bDrawColorBackground =
true;
182 if( bDrawGradientBackground )
186 else if( bDrawColorBackground && bTransparent )
189 bDrawColorBackground =
false;
204 aPos =
Point( 0, 0 );
205 aSize =
Size( nWidth, nHeight );
224 aBmpEx.
Scale( aSize );
233 aPos.AdjustX(( aSize.
Width() - nBmpWidth ) >> 1 );
237 aPos.AdjustX( aSize.
Width() - nBmpWidth);
241 aPos.AdjustY(( aSize.
Height() - nBmpHeight ) >> 1 );
245 aPos.AdjustX(( aSize.
Width() - nBmpWidth ) >> 1 );
246 aPos.AdjustY(( aSize.
Height() - nBmpHeight ) >> 1 );
250 aPos.AdjustX(aSize.
Width() - nBmpWidth);
251 aPos.AdjustY(( aSize.
Height() - nBmpHeight ) >> 1 );
255 aPos.AdjustY( aSize.
Height() - nBmpHeight );
259 aPos.AdjustX(( aSize.
Width() - nBmpWidth ) >> 1 );
260 aPos.AdjustY( aSize.
Height() - nBmpHeight );
264 aPos.AdjustX( aSize.
Width() - nBmpWidth );
265 aPos.AdjustY( aSize.
Height() - nBmpHeight );
282 nFirstX = aPos.X() + ( ( aSize.
Width() - nBmpWidth ) >> 1 );
283 nFirstY = aPos.Y() + ( ( aSize.
Height() - nBmpHeight ) >> 1 );
286 const tools::Long nOffX = ( nFirstX - nX ) % nBmpWidth;
287 const tools::Long nOffY = ( nFirstY - nY ) % nBmpHeight;
292 nStartX -= nBmpWidth;
295 nStartY -= nBmpHeight;
297 for(
tools::Long nBmpY = nStartY; nBmpY <= nBottom; nBmpY += nBmpHeight )
299 for(
tools::Long nBmpX = nStartX; nBmpX <= nRight; nBmpX += nBmpWidth )
312 if( bDrawColorBackground )
315 const Point aTmpPoint;
340 aOutRect.
Right(), aPos.Y() + aBmpSize.
Height() - 1 );
380 const bool bOldMap =
mbMap;
const AlphaMask & GetAlphaMask() const
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
Scale the bitmap.
Bitmap GetBitmap(Color aTransparentReplaceColor) const
const Size & GetSizePixel() const
Bitmap CreateDisplayBitmap(OutputDevice *pDisplay) const
bool IsTransparent() const
void EnableMapMode(bool bEnable=true)
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
SAL_DLLPRIVATE bool is_double_buffered_window() const
void DrawGradientWallpaper(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper &rWallpaper)
RasterOp GetRasterOp() const
Size GetOutputSizePixel() const
SAL_DLLPRIVATE bool ImplIsRecordLayout() const
void DrawRect(const tools::Rectangle &rRect)
SAL_DLLPRIVATE void DrawColorWallpaper(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper &rWallpaper)
virtual Color GetReadableFontColor(const Color &rFontColor, const Color &rBgColor) const
const Wallpaper & GetBackground() const
SAL_DLLPRIVATE void DrawBitmapWallpaper(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper &rWallpaper)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void SetRasterOp(RasterOp eRasterOp)
const Color & GetLineColor() const
bool IsDeviceOutputNecessary() const
VclPtr< VirtualDevice > mpAlphaVDev
void DrawWallpaper(const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
void IntersectClipRegion(const tools::Rectangle &rRect)
const Color & GetFillColor() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
SAL_DLLPRIVATE void ImplSetCachedBitmap(const BitmapEx &rBmp) const
const BitmapEx & GetBitmap() const
SAL_DLLPRIVATE void ImplReleaseCachedBitmap() const
const Color & GetColor() const
WallpaperStyle GetStyle() const
SAL_DLLPRIVATE const BitmapEx * ImplGetCachedBitmap() const
Gradient GetGradient() const
const tools::Rectangle & GetRect() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)