[Libreoffice-commits] core.git: 12 commits - include/vcl vcl/Library_vcl.mk vcl/source
Chris Sherlock
chris.sherlock79 at gmail.com
Mon Apr 21 09:34:43 PDT 2014
include/vcl/outdev.hxx | 1300 +++++++++++----------
include/vcl/print.hxx | 8
vcl/Library_vcl.mk | 6
vcl/source/gdi/pdfwriter_impl.cxx | 2
vcl/source/gdi/print.cxx | 18
vcl/source/gdi/print2.cxx | 67 -
vcl/source/outdev/bitmap.cxx | 416 ++++++
vcl/source/outdev/blend.cxx | 350 -----
vcl/source/outdev/curvedshapes.cxx | 8
vcl/source/outdev/gradient.cxx | 10
vcl/source/outdev/hatch.cxx | 36
vcl/source/outdev/line.cxx | 93 +
vcl/source/outdev/map.cxx | 2120 +++++++++++++++++++++++++++++++++++
vcl/source/outdev/nativecontrols.cxx | 328 +++++
vcl/source/outdev/outdev.cxx | 307 -----
vcl/source/outdev/outdevnative.cxx | 328 -----
vcl/source/outdev/outmap.cxx | 2120 -----------------------------------
vcl/source/outdev/pixel.cxx | 2
vcl/source/outdev/polygon.cxx | 8
vcl/source/outdev/polyline.cxx | 68 -
vcl/source/outdev/rect.cxx | 4
vcl/source/outdev/transparent.cxx | 6
22 files changed, 3743 insertions(+), 3862 deletions(-)
New commits:
commit 67d4ad765c560e932400624d611801b40de6a562
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Apr 22 02:21:05 2014 +1000
Move OutputDevice clipping functions into own file
Change-Id: Id1bfa4c6db202597107de3047326fe1bd17f2387
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 8a6cb5c..8ecfb69 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -235,6 +235,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/gdi/octree \
vcl/source/gdi/oldprintadaptor \
vcl/source/outdev/outdev \
+ vcl/source/outdev/clipping \
vcl/source/outdev/tworect \
vcl/source/outdev/polygon \
vcl/source/outdev/transparent \
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 032ed03..1658b7e 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -175,27 +175,6 @@ bool OutputDevice::ImplIsAntiparallel() const
return bRet;
}
-void OutputDevice::ClipToPaintRegion(Rectangle& /*rDstRect*/)
-{
-}
-
-bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGraphics )
-{
- DBG_TESTSOLARMUTEX();
-
- if( !pGraphics )
- {
- if( !mpGraphics )
- if( !ImplInitGraphics() )
- return false;
- pGraphics = mpGraphics;
- }
-
- bool bClipRegion = pGraphics->SetClipRegion( rRegion, this );
- OSL_ENSURE( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't create region" );
- return bClipRegion;
-}
-
OutputDevice::OutputDevice() :
maRegion(true),
maFillColor( COL_WHITE ),
@@ -802,223 +781,6 @@ void OutputDevice::ImplInitFillColor()
mbInitFillColor = false;
}
-// TODO: fdo#74424 - this needs to be moved out of OutputDevice and into the
-// Window, VirtualDevice and Printer classes
-void OutputDevice::ImplInitClipRegion()
-{
- DBG_TESTSOLARMUTEX();
-
- if ( GetOutDevType() == OUTDEV_WINDOW )
- {
- Window* pWindow = (Window*)this;
- Region aRegion;
-
- // Put back backed up background
- if ( pWindow->mpWindowImpl->mpFrameData->mpFirstBackWin )
- pWindow->ImplInvalidateAllOverlapBackgrounds();
- if ( pWindow->mpWindowImpl->mbInPaint )
- aRegion = *(pWindow->mpWindowImpl->mpPaintRegion);
- else
- {
- aRegion = *(pWindow->ImplGetWinChildClipRegion());
- // --- RTL -- only this region is in frame coordinates, so re-mirror it
- // the mpWindowImpl->mpPaintRegion above is already correct (see ImplCallPaint()) !
- if( ImplIsAntiparallel() )
- ReMirror ( aRegion );
- }
- if ( mbClipRegion )
- aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) );
- if ( aRegion.IsEmpty() )
- mbOutputClipped = true;
- else
- {
- mbOutputClipped = false;
- ImplSelectClipRegion( aRegion );
- }
- mbClipRegionSet = true;
- }
- else
- {
- if ( mbClipRegion )
- {
- if ( maRegion.IsEmpty() )
- mbOutputClipped = true;
- else
- {
- mbOutputClipped = false;
-
- // #102532# Respect output offset also for clip region
- Region aRegion( ImplPixelToDevicePixel( maRegion ) );
- const bool bClipDeviceBounds( ! GetPDFWriter()
- && GetOutDevType() != OUTDEV_PRINTER );
- if( bClipDeviceBounds )
- {
- // Perform actual rect clip against outdev
- // dimensions, to generate empty clips whenever one of the
- // values is completely off the device.
- Rectangle aDeviceBounds( mnOutOffX, mnOutOffY,
- mnOutOffX+GetOutputWidthPixel()-1,
- mnOutOffY+GetOutputHeightPixel()-1 );
- aRegion.Intersect( aDeviceBounds );
- }
-
- if ( aRegion.IsEmpty() )
- {
- mbOutputClipped = true;
- }
- else
- {
- mbOutputClipped = false;
- ImplSelectClipRegion( aRegion );
- }
- }
-
- mbClipRegionSet = true;
- }
- else
- {
- if ( mbClipRegionSet )
- {
- mpGraphics->ResetClipRegion();
- mbClipRegionSet = false;
- }
-
- mbOutputClipped = false;
- }
- }
-
- mbInitClipRegion = false;
-}
-
-void OutputDevice::ImplSetClipRegion( const Region* pRegion )
-{
- DBG_TESTSOLARMUTEX();
-
- if ( !pRegion )
- {
- if ( mbClipRegion )
- {
- maRegion = Region(true);
- mbClipRegion = false;
- mbInitClipRegion = true;
- }
- }
- else
- {
- maRegion = *pRegion;
- mbClipRegion = true;
- mbInitClipRegion = true;
- }
-}
-
-void OutputDevice::SetClipRegion()
-{
-
- if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( Region(), false ) );
-
- ImplSetClipRegion( NULL );
-
- if( mpAlphaVDev )
- mpAlphaVDev->SetClipRegion();
-}
-
-void OutputDevice::SetClipRegion( const Region& rRegion )
-{
-
- if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, true ) );
-
- if ( rRegion.IsNull() )
- {
- ImplSetClipRegion( NULL );
- }
- else
- {
- Region aRegion = LogicToPixel( rRegion );
- ImplSetClipRegion( &aRegion );
- }
-
- if( mpAlphaVDev )
- mpAlphaVDev->SetClipRegion( rRegion );
-}
-
-Region OutputDevice::GetClipRegion() const
-{
-
- return PixelToLogic( maRegion );
-}
-
-Region OutputDevice::GetActiveClipRegion() const
-{
-
- if ( GetOutDevType() == OUTDEV_WINDOW )
- {
- Region aRegion(true);
- Window* pWindow = (Window*)this;
- if ( pWindow->mpWindowImpl->mbInPaint )
- {
- aRegion = *(pWindow->mpWindowImpl->mpPaintRegion);
- aRegion.Move( -mnOutOffX, -mnOutOffY );
- }
- if ( mbClipRegion )
- aRegion.Intersect( maRegion );
- return PixelToLogic( aRegion );
- }
- else
- return GetClipRegion();
-}
-
-void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
-{
-
- if ( mbClipRegion )
- {
- if( mpMetaFile )
- mpMetaFile->AddAction( new MetaMoveClipRegionAction( nHorzMove, nVertMove ) );
-
- maRegion.Move( ImplLogicWidthToDevicePixel( nHorzMove ),
- ImplLogicHeightToDevicePixel( nVertMove ) );
- mbInitClipRegion = true;
- }
-
- if( mpAlphaVDev )
- mpAlphaVDev->MoveClipRegion( nHorzMove, nVertMove );
-}
-
-void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
-{
-
- if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaISectRectClipRegionAction( rRect ) );
-
- Rectangle aRect = LogicToPixel( rRect );
- maRegion.Intersect( aRect );
- mbClipRegion = true;
- mbInitClipRegion = true;
-
- if( mpAlphaVDev )
- mpAlphaVDev->IntersectClipRegion( rRect );
-}
-
-void OutputDevice::IntersectClipRegion( const Region& rRegion )
-{
-
- if(!rRegion.IsNull())
- {
- if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaISectRegionClipRegionAction( rRegion ) );
-
- Region aRegion = LogicToPixel( rRegion );
- maRegion.Intersect( aRegion );
- mbClipRegion = true;
- mbInitClipRegion = true;
- }
-
- if( mpAlphaVDev )
- mpAlphaVDev->IntersectClipRegion( rRegion );
-}
-
void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
{
commit 0347aecfc7bb72db1d4feb90d8323012cd1ae521
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Apr 22 01:42:23 2014 +1000
Reorganize outdev.hxx - mainly map functions
Mainly moved map functions into their own block, however I have also
done a bit more reorganization. Quite a bit to go, it seems...
Change-Id: I041d91c9b96066f5f1e11bd82968c2712988e5f4
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 5bf7c72..8fbcb83 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -390,11 +390,6 @@ private:
mutable bool mbRefPoint : 1;
mutable bool mbEnableRTL : 1;
-protected:
- virtual void ImplReleaseFonts();
- virtual void SetFontOrientation( ImplFontEntry* const pFontEntry ) const;
- virtual long GetFontExtLeading() const;
-
public:
/** @name Initialization and accessor functions
*/
@@ -463,181 +458,6 @@ public:
@returns y-axis DPI value
*/
SAL_DLLPRIVATE sal_Int32 ImplGetDPIY() const { return mnDPIY; }
-
- /** Convert a logical X coordinate to a device pixel's X coordinate.
-
- To get the device's X coordinate, it must calculate the mapping offset
- coordinate X position (if there is one - if not then it just adds
- the pseudo-window offset to the logical X coordinate), the X-DPI of
- the device and the mapping's X scaling factor.
-
- @param nX Logical X coordinate
-
- @returns Device's X pixel coordinate
- */
- SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
-
- /** Convert a logical Y coordinate to a device pixel's Y coordinate.
-
- To get the device's Y coordinate, it must calculate the mapping offset
- coordinate Y position (if there is one - if not then it just adds
- the pseudo-window offset to the logical Y coordinate), the Y-DPI of
- the device and the mapping's Y scaling factor.
-
- @param nY Logical Y coordinate
-
- @returns Device's Y pixel coordinate
- */
- SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
-
- /** Convert a logical width to a width in units of device pixels.
-
- To get the number of device pixels, it must calculate the X-DPI of the device and
- the map scaling factor. If there is no mapping, then it just returns the
- width as nothing more needs to be done.
-
- @param nWidth Logical width
-
- @returns Width in units of device pixels.
- */
- SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
-
- /** Convert a logical height to a height in units of device pixels.
-
- To get the number of device pixels, it must calculate the Y-DPI of the device and
- the map scaling factor. If there is no mapping, then it just returns the
- height as nothing more needs to be done.
-
- @param nHeight Logical height
-
- @returns Height in units of device pixels.
- */
- SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
-
- /** Convert device pixels to a width in logical units.
-
- To get the logical width, it must calculate the X-DPI of the device and the
- map scaling factor.
-
- @param nWidth Width in device pixels
-
- @returns Width in logical units.
- */
- SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
-
- /** Convert device pixels to a height in logical units.
-
- To get the logical height, it must calculate the Y-DPI of the device and the
- map scaling factor.
-
- @param nHeight Height in device pixels
-
- @returns Height in logical units.
- */
- SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
-
- /** Convert logical height to device pixels, with exact sub-pixel value.
-
- To get the \em exact pixel height, it must calculate the Y-DPI of the device and the
- map scaling factor.
-
- @param nHeight Exact height in logical units.
-
- @returns Exact height in pixels - returns as a float to provide for subpixel value.
- */
- SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float ) const;
-
- /** Convert a logical point to a physical point on the device.
-
- @param rLogicPt Const reference to a point in logical units.
-
- @returns Physical point on the device.
- */
- SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
-
- /** Convert a logical size to the size on the physical device.
-
- @param rLogicSize Const reference to a size in logical units
-
- @returns Physical size on the device.
- */
- SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
-
- /** Convert a logical rectangle to a rectangle in physical device pixel units.
-
- @param rLogicSize Const reference to a rectangle in logical units
-
- @returns Rectangle based on physical device pixel coordinates and units.
- */
- SAL_DLLPRIVATE Rectangle ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const;
-
- /** Convert a rectangle in physical pixel units to a rectangle in physical pixel units and coords.
-
- @param rPixelRect Const reference to rectangle in logical units and coords.
-
- @returns Rectangle based on logical coordinates and units.
- */
- SAL_DLLPRIVATE Rectangle ImplDevicePixelToLogic( const Rectangle& rPixelRect ) const;
-
- /** Convert a logical B2DPolygon to a B2DPolygon in physical device pixel units.
-
- @param rLogicSize Const reference to a B2DPolygon in logical units
-
- @returns B2DPolyPolygon based on physical device pixel coordinates and units.
- */
- SAL_DLLPRIVATE ::basegfx::B2DPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolygon& rLogicPoly ) const;
-
- /** Convert a logical B2DPolyPolygon to a B2DPolyPolygon in physical device pixel units.
-
- @param rLogicPolyPoly Const reference to a B2DPolyPolygon in logical units
-
- @returns B2DPolyPolygon based on physical device pixel coordinates and units.
- */
- SAL_DLLPRIVATE ::basegfx::B2DPolyPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
-
- /** Convert a logical polygon to a polygon in physical device pixel units.
-
- @param rLogicPoly Const reference to a polygon in logical units
-
- @returns Polygon based on physical device pixel coordinates and units.
- */
- SAL_DLLPRIVATE Polygon ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const;
-
- /** Convert a logical polypolygon to a polypolygon in physical device pixel units.
-
- @param rLogicPolyPoly Const reference to a polypolygon in logical units
-
- @returns Polypolygon based on physical device pixel coordinates and units.
- */
- SAL_DLLPRIVATE PolyPolygon ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyPoly ) const;
-
- /** Convert a line in logical units to a line in physical device pixel units.
-
- @param rLineInfo Const refernece to a line in logical units
-
- @returns Line based on physical device pixel coordinates and units.
- */
- SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
-
- /** Convert a region in pixel units to a region in device pixel units and coords.
-
- @param rPixelRect Const reference to region.
-
- @returns Region based on device pixel coordinates and units.
- */
- SAL_DLLPRIVATE Region ImplPixelToDevicePixel( const Region& rRegion ) const;
-
- /** Invalidate the view transformation.
-
- @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
- */
- SAL_DLLPRIVATE void ImplInvalidateViewTransform();
-
- /** Get device transformation.
-
- @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
- */
- SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
///@}
/** @name Clipping functions
@@ -650,16 +470,12 @@ public:
///@}
+public:
/** @name Text and font functions
*/
///@{
SAL_DLLPRIVATE bool ImplNewFont() const;
SAL_DLLPRIVATE void ImplInitTextColor();
-
-protected:
- virtual void InitFont() const;
-
-public:
static
SAL_DLLPRIVATE void ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
const OUString& rOrigStr, sal_uInt16 nStyle,
@@ -697,6 +513,12 @@ public:
SAL_DLLPRIVATE void ImplInitFontList() const;
SAL_DLLPRIVATE void ImplUpdateFontData( bool bNewFontLists );
SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
+
+protected:
+ virtual void InitFont() const;
+ virtual void ImplReleaseFonts();
+ virtual void SetFontOrientation( ImplFontEntry* const pFontEntry ) const;
+ virtual long GetFontExtLeading() const;
///@}
SAL_DLLPRIVATE void ImplInitFillColor();
@@ -1300,159 +1122,33 @@ protected:
///@}
public:
- void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
- void DrawWaveLine( const Point& rStartPos, const Point& rEndPos );
- void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags );
-
- void DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
- void DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency);
- void DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
- const Gradient& rTransparenceGradient );
-
- /** Added return value to see if EPS could be painted directly.
- Theoreticaly, handing over a matrix would be needed to handle
- painting rotated EPS files (e.g. contained in Metafiles). This
- would then need to be supported for Mac and PS printers, but
- that's too much for now, wrote \#i107046# for this */
- bool DrawEPS( const Point& rPt, const Size& rSz,
- const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL );
-
- /// Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd
- void DrawCheckered(
- const Point& rPos,
- const Size& rSize,
- sal_uInt32 nLen = 8,
- Color aStart = Color(COL_WHITE),
- Color aEnd = Color(COL_BLACK));
-
- Color GetPixel( const Point& rPt ) const;
-
- Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
-
- /** Query extended bitmap (with alpha channel, if available).
+ /** @name Map functions
*/
- BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
-
+ ///@{
void EnableMapMode( bool bEnable = true );
bool IsMapModeEnabled() const { return mbMap; }
- // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
- virtual void EnableRTL( bool bEnable = true);
- bool IsRTLEnabled() const { return mbEnableRTL; }
+ virtual void SetMapMode();
+ virtual void SetMapMode( const MapMode& rNewMapMode );
+ virtual void SetRelativeMapMode( const MapMode& rNewMapMode );
+ const MapMode& GetMapMode() const { return maMapMode; }
+ bool IsMapMode() const { return mbMap; }
- void SetConnectMetaFile( GDIMetaFile* pMtf );
- GDIMetaFile* GetConnectMetaFile() const { return mpMetaFile; }
+ // #i75163#
+ basegfx::B2DHomMatrix GetViewTransformation() const;
+ basegfx::B2DHomMatrix GetInverseViewTransformation() const;
- void EnableOutput( bool bEnable = true );
- bool IsOutputEnabled() const { return mbOutput; }
- bool IsDeviceOutput() const { return mbDevOutput; }
- bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
- bool IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); }
+ basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
+ basegfx::B2DHomMatrix GetInverseViewTransformation( const MapMode& rMapMode ) const;
- void SetClipRegion();
- void SetClipRegion( const Region& rRegion );
- Region GetClipRegion() const;
- bool IsClipRegion() const { return mbClipRegion; }
- Region GetActiveClipRegion() const;
- void MoveClipRegion( long nHorzMove, long nVertMove );
- void IntersectClipRegion( const Rectangle& rRect );
- void IntersectClipRegion( const Region& rRegion );
+ /** Set an offset in pixel
- void SetAntialiasing( sal_uInt16 nMode = 0 );
- sal_uInt16 GetAntialiasing() const { return mnAntialiasing; }
-
- void SetDrawMode( sal_uLong nDrawMode );
- sal_uLong GetDrawMode() const { return mnDrawMode; }
-
- void SetLayoutMode( sal_uLong nTextLayoutMode );
- sal_uLong GetLayoutMode() const { return mnTextLayoutMode; }
-
- void SetDigitLanguage( LanguageType );
- LanguageType GetDigitLanguage() const { return meTextLanguage; }
-
- void SetRasterOp( RasterOp eRasterOp );
- RasterOp GetRasterOp() const { return meRasterOp; }
-
- /**
- If this OutputDevice is used for displaying a Print Preview
- the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
-
- A View can then make painting decisions dependent on this OutDevViewType.
- E.g. text colors need to be handled differently, dependent on whether it's a PrintPreview or not. (see #106611# for more)
- */
- void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
- OutDevViewType GetOutDevViewType() const { return meOutDevViewType; }
-
- void SetFillColor();
- void SetFillColor( const Color& rColor );
- const Color& GetFillColor() const { return maFillColor; }
- bool IsFillColor() const { return mbFillColor; }
-
- void SetBackground();
- void SetBackground( const Wallpaper& rBackground );
-
- const Wallpaper& GetBackground() const { return maBackground; }
- bool IsBackground() const { return mbBackground; }
-
- void SetFont( const Font& rNewFont );
- const Font& GetFont() const { return maFont; }
-
- SystemFontData GetSysFontData( int nFallbacklevel ) const;
- SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
- sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- const sal_Int32* pDXAry = NULL ) const;
-
- void SetTextColor( const Color& rColor );
- const Color& GetTextColor() const { return maTextColor; }
- void SetTextFillColor();
- void SetTextFillColor( const Color& rColor );
-
- Color GetTextFillColor() const;
- bool IsTextFillColor() const { return !maFont.IsTransparent(); }
- void SetTextLineColor();
- void SetTextLineColor( const Color& rColor );
- const Color& GetTextLineColor() const { return maTextLineColor; }
- bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
- void SetOverlineColor();
- void SetOverlineColor( const Color& rColor );
- const Color& GetOverlineColor() const { return maOverlineColor; }
- bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
- void SetTextAlign( TextAlign eAlign );
- TextAlign GetTextAlign() const { return maFont.GetAlign(); }
-
- virtual void SetSettings( const AllSettings& rSettings );
- const AllSettings& GetSettings() const { return *mxSettings; }
-
- SystemGraphicsData GetSystemGfxData() const;
- css::uno::Any GetSystemGfxDataAny() const;
-
- virtual void SetMapMode();
- virtual void SetMapMode( const MapMode& rNewMapMode );
- virtual void SetRelativeMapMode( const MapMode& rNewMapMode );
- const MapMode& GetMapMode() const { return maMapMode; }
- bool IsMapMode() const { return mbMap; }
-
- void SetRefPoint();
- void SetRefPoint( const Point& rRefPoint );
- const Point& GetRefPoint() const { return maRefPoint; }
- bool IsRefPoint() const { return mbRefPoint; }
-
- // #i75163#
- basegfx::B2DHomMatrix GetViewTransformation() const;
- basegfx::B2DHomMatrix GetInverseViewTransformation() const;
-
- basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
- basegfx::B2DHomMatrix GetInverseViewTransformation( const MapMode& rMapMode ) const;
-
-
- /** Set an offset in pixel
-
- This method offsets every drawing operation that converts its
- coordinates to pixel by the given value. Normally, the effect
- can be achieved by setting a MapMode with a different
- origin. Unfortunately, this origin is in logical coordinates
- and can lead to rounding errors (see #102532# for details).
+ This method offsets every drawing operation that converts its
+ coordinates to pixel by the given value. Normally, the effect
+ can be achieved by setting a MapMode with a different
+ origin. Unfortunately, this origin is in logical coordinates
+ and can lead to rounding errors (see #102532# for details).
@attention This offset is only applied when converting to
pixel, i.e. some output modes such as metafile recordings
@@ -1501,11 +1197,12 @@ public:
const MapMode& rMapMode ) const;
Region LogicToPixel( const Region& rLogicRegion,
const MapMode& rMapMode ) const;
+ basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon& rLogicPoly ) const;
+
Point PixelToLogic( const Point& rDevicePt ) const;
Size PixelToLogic( const Size& rDeviceSize ) const;
Rectangle PixelToLogic( const Rectangle& rDeviceRect ) const;
Polygon PixelToLogic( const Polygon& rDevicePoly ) const;
- basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon& rLogicPoly ) const;
PolyPolygon PixelToLogic( const PolyPolygon& rDevicePolyPoly ) const;
basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
Region PixelToLogic( const Region& rDeviceRegion ) const;
@@ -1525,6 +1222,7 @@ public:
const MapMode& rMapMode ) const;
Region PixelToLogic( const Region& rDeviceRegion,
const MapMode& rMapMode ) const;
+
Point LogicToLogic( const Point& rPtSource,
const MapMode* pMapModeSource,
const MapMode* pMapModeDest ) const;
@@ -1558,6 +1256,353 @@ public:
// for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest);
+ /** Convert a logical rectangle to a rectangle in physical device pixel units.
+
+ @param rLogicSize Const reference to a rectangle in logical units
+
+ @returns Rectangle based on physical device pixel coordinates and units.
+ */
+ SAL_DLLPRIVATE Rectangle ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const;
+
+ /** Convert a logical point to a physical point on the device.
+
+ @param rLogicPt Const reference to a point in logical units.
+
+ @returns Physical point on the device.
+ */
+ SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
+
+ /** Convert a logical width to a width in units of device pixels.
+
+ To get the number of device pixels, it must calculate the X-DPI of the device and
+ the map scaling factor. If there is no mapping, then it just returns the
+ width as nothing more needs to be done.
+
+ @param nWidth Logical width
+
+ @returns Width in units of device pixels.
+ */
+ SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
+
+private:
+ /** Convert a logical X coordinate to a device pixel's X coordinate.
+
+ To get the device's X coordinate, it must calculate the mapping offset
+ coordinate X position (if there is one - if not then it just adds
+ the pseudo-window offset to the logical X coordinate), the X-DPI of
+ the device and the mapping's X scaling factor.
+
+ @param nX Logical X coordinate
+
+ @returns Device's X pixel coordinate
+ */
+ SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
+
+ /** Convert a logical Y coordinate to a device pixel's Y coordinate.
+
+ To get the device's Y coordinate, it must calculate the mapping offset
+ coordinate Y position (if there is one - if not then it just adds
+ the pseudo-window offset to the logical Y coordinate), the Y-DPI of
+ the device and the mapping's Y scaling factor.
+
+ @param nY Logical Y coordinate
+
+ @returns Device's Y pixel coordinate
+ */
+ SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
+
+ /** Convert a logical height to a height in units of device pixels.
+
+ To get the number of device pixels, it must calculate the Y-DPI of the device and
+ the map scaling factor. If there is no mapping, then it just returns the
+ height as nothing more needs to be done.
+
+ @param nHeight Logical height
+
+ @returns Height in units of device pixels.
+ */
+ SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
+
+ /** Convert device pixels to a width in logical units.
+
+ To get the logical width, it must calculate the X-DPI of the device and the
+ map scaling factor.
+
+ @param nWidth Width in device pixels
+
+ @returns Width in logical units.
+ */
+ SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
+
+ /** Convert device pixels to a height in logical units.
+
+ To get the logical height, it must calculate the Y-DPI of the device and the
+ map scaling factor.
+
+ @param nHeight Height in device pixels
+
+ @returns Height in logical units.
+ */
+ SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
+
+ /** Convert logical height to device pixels, with exact sub-pixel value.
+
+ To get the \em exact pixel height, it must calculate the Y-DPI of the device and the
+ map scaling factor.
+
+ @param nHeight Exact height in logical units.
+
+ @returns Exact height in pixels - returns as a float to provide for subpixel value.
+ */
+ SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float ) const;
+
+ /** Convert a logical size to the size on the physical device.
+
+ @param rLogicSize Const reference to a size in logical units
+
+ @returns Physical size on the device.
+ */
+ SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
+
+ /** Convert a rectangle in physical pixel units to a rectangle in physical pixel units and coords.
+
+ @param rPixelRect Const reference to rectangle in logical units and coords.
+
+ @returns Rectangle based on logical coordinates and units.
+ */
+ SAL_DLLPRIVATE Rectangle ImplDevicePixelToLogic( const Rectangle& rPixelRect ) const;
+
+ /** Convert a logical B2DPolygon to a B2DPolygon in physical device pixel units.
+
+ @param rLogicSize Const reference to a B2DPolygon in logical units
+
+ @returns B2DPolyPolygon based on physical device pixel coordinates and units.
+ */
+ SAL_DLLPRIVATE ::basegfx::B2DPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolygon& rLogicPoly ) const;
+
+ /** Convert a logical B2DPolyPolygon to a B2DPolyPolygon in physical device pixel units.
+
+ @param rLogicPolyPoly Const reference to a B2DPolyPolygon in logical units
+
+ @returns B2DPolyPolygon based on physical device pixel coordinates and units.
+ */
+ SAL_DLLPRIVATE ::basegfx::B2DPolyPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
+
+ /** Convert a logical polygon to a polygon in physical device pixel units.
+
+ @param rLogicPoly Const reference to a polygon in logical units
+
+ @returns Polygon based on physical device pixel coordinates and units.
+ */
+ SAL_DLLPRIVATE Polygon ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const;
+
+ /** Convert a logical polypolygon to a polypolygon in physical device pixel units.
+
+ @param rLogicPolyPoly Const reference to a polypolygon in logical units
+
+ @returns Polypolygon based on physical device pixel coordinates and units.
+ */
+ SAL_DLLPRIVATE PolyPolygon ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyPoly ) const;
+
+ /** Convert a line in logical units to a line in physical device pixel units.
+
+ @param rLineInfo Const refernece to a line in logical units
+
+ @returns Line based on physical device pixel coordinates and units.
+ */
+ SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
+
+ /** Convert a region in pixel units to a region in device pixel units and coords.
+
+ @param rPixelRect Const reference to region.
+
+ @returns Region based on device pixel coordinates and units.
+ */
+ SAL_DLLPRIVATE Region ImplPixelToDevicePixel( const Region& rRegion ) const;
+
+ /** Invalidate the view transformation.
+
+ @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
+ */
+ SAL_DLLPRIVATE void ImplInvalidateViewTransform();
+
+ /** Get device transformation.
+
+ @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
+ */
+ SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
+ ///@}
+
+public:
+ /** @name Native Widget Rendering functions
+
+ These all just call through to the private mpGraphics functions of the same name.
+ */
+ ///@{
+
+ /** Query the platform layer for control support
+ */
+ bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
+
+ /** Query the native control to determine if it was acted upon
+ */
+ bool HitTestNativeControl( ControlType nType,
+ ControlPart nPart,
+ const Rectangle& rControlRegion,
+ const Point& aPos,
+ bool& rIsInside ) const;
+
+ /** Request rendering of a particular control and/or part
+ */
+ bool DrawNativeControl( ControlType nType,
+ ControlPart nPart,
+ const Rectangle& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ const OUString& aCaption );
+
+ /** Query the native control's actual drawing region (including adornment)
+ */
+ bool GetNativeControlRegion( ControlType nType,
+ ControlPart nPart,
+ const Rectangle& rControlRegion,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ const OUString& aCaption,
+ Rectangle &rNativeBoundingRegion,
+ Rectangle &rNativeContentRegion ) const;
+ ///@}
+
+public:
+ void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
+ void DrawWaveLine( const Point& rStartPos, const Point& rEndPos );
+ void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags );
+
+ void DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
+ void DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency);
+ void DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
+ const Gradient& rTransparenceGradient );
+
+ /** Added return value to see if EPS could be painted directly.
+ Theoreticaly, handing over a matrix would be needed to handle
+ painting rotated EPS files (e.g. contained in Metafiles). This
+ would then need to be supported for Mac and PS printers, but
+ that's too much for now, wrote \#i107046# for this */
+ bool DrawEPS( const Point& rPt, const Size& rSz,
+ const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL );
+
+ /// Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd
+ void DrawCheckered(
+ const Point& rPos,
+ const Size& rSize,
+ sal_uInt32 nLen = 8,
+ Color aStart = Color(COL_WHITE),
+ Color aEnd = Color(COL_BLACK));
+
+ 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; }
+
+ void SetConnectMetaFile( GDIMetaFile* pMtf );
+ GDIMetaFile* GetConnectMetaFile() const { return mpMetaFile; }
+
+ void EnableOutput( bool bEnable = true );
+ bool IsOutputEnabled() const { return mbOutput; }
+ bool IsDeviceOutput() const { return mbDevOutput; }
+ bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
+ bool IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); }
+
+ void SetClipRegion();
+ void SetClipRegion( const Region& rRegion );
+ Region GetClipRegion() const;
+ bool IsClipRegion() const { return mbClipRegion; }
+ Region GetActiveClipRegion() const;
+
+ void MoveClipRegion( long nHorzMove, long nVertMove );
+ void IntersectClipRegion( const Rectangle& rRect );
+ void IntersectClipRegion( const Region& rRegion );
+
+ void SetAntialiasing( sal_uInt16 nMode = 0 );
+ sal_uInt16 GetAntialiasing() const { return mnAntialiasing; }
+
+ void SetDrawMode( sal_uLong nDrawMode );
+ sal_uLong GetDrawMode() const { return mnDrawMode; }
+
+ void SetLayoutMode( sal_uLong nTextLayoutMode );
+ sal_uLong GetLayoutMode() const { return mnTextLayoutMode; }
+
+ void SetDigitLanguage( LanguageType );
+ LanguageType GetDigitLanguage() const { return meTextLanguage; }
+
+ void SetRasterOp( RasterOp eRasterOp );
+ RasterOp GetRasterOp() const { return meRasterOp; }
+
+ /**
+ If this OutputDevice is used for displaying a Print Preview
+ the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
+
+ A View can then make painting decisions dependent on this OutDevViewType.
+ E.g. text colors need to be handled differently, dependent on whether it's a PrintPreview or not. (see #106611# for more)
+ */
+ void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
+ OutDevViewType GetOutDevViewType() const { return meOutDevViewType; }
+
+ void SetFillColor();
+ void SetFillColor( const Color& rColor );
+ const Color& GetFillColor() const { return maFillColor; }
+ bool IsFillColor() const { return mbFillColor; }
+
+ void SetBackground();
+ void SetBackground( const Wallpaper& rBackground );
+
+ const Wallpaper& GetBackground() const { return maBackground; }
+ bool IsBackground() const { return mbBackground; }
+
+ void SetFont( const Font& rNewFont );
+ const Font& GetFont() const { return maFont; }
+
+ SystemFontData GetSysFontData( int nFallbacklevel ) const;
+ SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
+ sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
+ const sal_Int32* pDXAry = NULL ) const;
+
+ void SetTextColor( const Color& rColor );
+ const Color& GetTextColor() const { return maTextColor; }
+ void SetTextFillColor();
+ void SetTextFillColor( const Color& rColor );
+
+ Color GetTextFillColor() const;
+ bool IsTextFillColor() const { return !maFont.IsTransparent(); }
+ void SetTextLineColor();
+ void SetTextLineColor( const Color& rColor );
+ const Color& GetTextLineColor() const { return maTextLineColor; }
+ bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
+ void SetOverlineColor();
+ void SetOverlineColor( const Color& rColor );
+ const Color& GetOverlineColor() const { return maOverlineColor; }
+ bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
+ void SetTextAlign( TextAlign eAlign );
+ TextAlign GetTextAlign() const { return maFont.GetAlign(); }
+
+ virtual void SetSettings( const AllSettings& rSettings );
+ const AllSettings& GetSettings() const { return *mxSettings; }
+
+ SystemGraphicsData GetSystemGfxData() const;
+ css::uno::Any GetSystemGfxDataAny() const;
+
+ void SetRefPoint();
+ void SetRefPoint( const Point& rRefPoint );
+ const Point& GetRefPoint() const { return maRefPoint; }
+ bool IsRefPoint() const { return mbRefPoint; }
+
Size GetOutputSizePixel() const
{ return Size( mnOutWidth, mnOutHeight ); }
long GetOutputWidthPixel() const { return mnOutWidth; }
@@ -1665,46 +1710,6 @@ public:
bool bDownsampleBitmaps,
const Color& rBackground = Color( COL_TRANSPARENT )
);
-public:
- /** @name Native Widget Rendering functions
-
- These all just call through to the private mpGraphics functions of the same name.
- */
- ///@{
-
- /** Query the platform layer for control support
- */
- bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
-
- /** Query the native control to determine if it was acted upon
- */
- bool HitTestNativeControl( ControlType nType,
- ControlPart nPart,
- const Rectangle& rControlRegion,
- const Point& aPos,
- bool& rIsInside ) const;
-
- /** Request rendering of a particular control and/or part
- */
- bool DrawNativeControl( ControlType nType,
- ControlPart nPart,
- const Rectangle& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- const OUString& aCaption );
-
- /** Query the native control's actual drawing region (including adornment)
- */
- bool GetNativeControlRegion( ControlType nType,
- ControlPart nPart,
- const Rectangle& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- const OUString& aCaption,
- Rectangle &rNativeBoundingRegion,
- Rectangle &rNativeContentRegion ) const;
- ///@}
-
};
#endif // INCLUDED_VCL_OUTDEV_HXX
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index b82354c..8a6cb5c 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -252,7 +252,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/outdev/curvedshapes \
vcl/source/outdev/wallpaper \
vcl/source/outdev/nativecontrols \
- vcl/source/outdev/outmap \
+ vcl/source/outdev/map \
vcl/source/gdi/pdfextoutdevdata \
vcl/source/gdi/pdffontcache \
vcl/source/gdi/pdfwriter \
diff --git a/vcl/source/outdev/outmap.cxx b/vcl/source/outdev/map.cxx
similarity index 100%
rename from vcl/source/outdev/outmap.cxx
rename to vcl/source/outdev/map.cxx
commit f9fa335da091c12ddf5f7eff37230e9bc6ae7012
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Apr 22 01:22:21 2014 +1000
Move DownsizeBitmap from gdi/print2.cxx to outdev/bitmap.cxx
Change-Id: Ib10024fe92ae364d31082177724be718d426fe26
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 6758076..5bf7c72 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1039,7 +1039,21 @@ public:
const Image& rImage,
sal_uInt16 nStyle = 0 );
+ /** Retrieve downsampled and cropped bitmap
+
+ @attention This method ignores negative rDstSz values, thus
+ mirroring must happen outside this method (e.g. in DrawBitmap)
+ */
+ Bitmap GetDownsampledBitmap(
+ const Size& rDstSz,
+ const Point& rSrcPt,
+ const Size& rSrcSz,
+ const Bitmap& rBmp,
+ long nMaxBmpDPIX,
+ long nMaxBmpDPIY );
+
protected:
+
/** Draw BitmapEx transformed
@param rTransformation
@@ -1651,30 +1665,27 @@ public:
bool bDownsampleBitmaps,
const Color& rBackground = Color( COL_TRANSPARENT )
);
- /** Retrieve downsampled and cropped bitmap
+public:
+ /** @name Native Widget Rendering functions
- @attention This method ignores negative rDstSz values, thus
- mirroring must happen outside this method (e.g. in DrawBitmap)
+ These all just call through to the private mpGraphics functions of the same name.
*/
- Bitmap GetDownsampledBitmap( const Size& rDstSz,
- const Point& rSrcPt, const Size& rSrcSz,
- const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY );
-
- // Native Widget Rendering functions
-
- // These all just call through to the private mpGraphics functions of the same name.
+ ///@{
- // Query the platform layer for control support
+ /** Query the platform layer for control support
+ */
bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
- // Query the native control to determine if it was acted upon
+ /** Query the native control to determine if it was acted upon
+ */
bool HitTestNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
const Point& aPos,
bool& rIsInside ) const;
- // Request rendering of a particular control and/or part
+ /** Request rendering of a particular control and/or part
+ */
bool DrawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
@@ -1682,7 +1693,8 @@ public:
const ImplControlValue& aValue,
const OUString& aCaption );
- // Query the native control's actual drawing region (including adornment)
+ /** Query the native control's actual drawing region (including adornment)
+ */
bool GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
@@ -1691,6 +1703,7 @@ public:
const OUString& aCaption,
Rectangle &rNativeBoundingRegion,
Rectangle &rNativeContentRegion ) const;
+ ///@}
};
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index ca77fcc..3f838f1 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -1342,73 +1342,6 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
return bTransparent;
}
-Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
- const Point& rSrcPt, const Size& rSrcSz,
- const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY )
-{
- Bitmap aBmp( rBmp );
-
- if( !aBmp.IsEmpty() )
- {
- Point aPoint;
- const Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() );
- Rectangle aSrcRect( rSrcPt, rSrcSz );
-
- // do cropping if necessary
- if( aSrcRect.Intersection( aBmpRect ) != aBmpRect )
- {
- if( !aSrcRect.IsEmpty() )
- aBmp.Crop( aSrcRect );
- else
- aBmp.SetEmpty();
- }
-
- if( !aBmp.IsEmpty() )
- {
- // do downsampling if necessary
- Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) );
-
- // #103209# Normalize size (mirroring has to happen outside of this method)
- aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) );
-
- const Size aBmpSize( aBmp.GetSizePixel() );
- const double fBmpPixelX = aBmpSize.Width();
- const double fBmpPixelY = aBmpSize.Height();
- const double fMaxPixelX = aDstSizeTwip.Width() * nMaxBmpDPIX / 1440.0;
- const double fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
-
- // check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
- if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
- ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
- ( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
- {
- // do scaling
- Size aNewBmpSize;
- const double fBmpWH = fBmpPixelX / fBmpPixelY;
- const double fMaxWH = fMaxPixelX / fMaxPixelY;
-
- if( fBmpWH < fMaxWH )
- {
- aNewBmpSize.Width() = FRound( fMaxPixelY * fBmpWH );
- aNewBmpSize.Height() = FRound( fMaxPixelY );
- }
- else if( fBmpWH > 0.0 )
- {
- aNewBmpSize.Width() = FRound( fMaxPixelX );
- aNewBmpSize.Height() = FRound( fMaxPixelX / fBmpWH);
- }
-
- if( aNewBmpSize.Width() && aNewBmpSize.Height() )
- aBmp.Scale( aNewBmpSize );
- else
- aBmp.SetEmpty();
- }
- }
- }
-
- return aBmp;
-}
-
void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient )
{
const PrinterOptions& rPrinterOptions = GetPrinterOptions();
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 4647817..d29aa6a 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -160,6 +160,73 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
}
}
+Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
+ const Point& rSrcPt, const Size& rSrcSz,
+ const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY )
+{
+ Bitmap aBmp( rBmp );
+
+ if( !aBmp.IsEmpty() )
+ {
+ Point aPoint;
+ const Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() );
+ Rectangle aSrcRect( rSrcPt, rSrcSz );
+
+ // do cropping if necessary
+ if( aSrcRect.Intersection( aBmpRect ) != aBmpRect )
+ {
+ if( !aSrcRect.IsEmpty() )
+ aBmp.Crop( aSrcRect );
+ else
+ aBmp.SetEmpty();
+ }
+
+ if( !aBmp.IsEmpty() )
+ {
+ // do downsampling if necessary
+ Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) );
+
+ // #103209# Normalize size (mirroring has to happen outside of this method)
+ aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) );
+
+ const Size aBmpSize( aBmp.GetSizePixel() );
+ const double fBmpPixelX = aBmpSize.Width();
+ const double fBmpPixelY = aBmpSize.Height();
+ const double fMaxPixelX = aDstSizeTwip.Width() * nMaxBmpDPIX / 1440.0;
+ const double fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
+
+ // check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
+ if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
+ ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
+ ( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
+ {
+ // do scaling
+ Size aNewBmpSize;
+ const double fBmpWH = fBmpPixelX / fBmpPixelY;
+ const double fMaxWH = fMaxPixelX / fMaxPixelY;
+
+ if( fBmpWH < fMaxWH )
+ {
+ aNewBmpSize.Width() = FRound( fMaxPixelY * fBmpWH );
+ aNewBmpSize.Height() = FRound( fMaxPixelY );
+ }
+ else if( fBmpWH > 0.0 )
+ {
+ aNewBmpSize.Width() = FRound( fMaxPixelX );
+ aNewBmpSize.Height() = FRound( fMaxPixelX / fBmpWH);
+ }
+
+ if( aNewBmpSize.Width() && aNewBmpSize.Height() )
+ aBmp.Scale( aNewBmpSize );
+ else
+ aBmp.SetEmpty();
+ }
+ }
+ }
+
+ return aBmp;
+}
+
void OutputDevice::DrawBitmapEx( const Point& rDestPt,
const BitmapEx& rBitmapEx )
{
commit 3f52bc19d508863267ca09c761dc08f773da48bc
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Apr 22 00:58:58 2014 +1000
Reorganize native control functions in OutputDevice
Rename lcl_* functions in nativecontrols.cxx, also renamed
outdevnative.cxx to nativecontrols.cxx
Change-Id: Ie9a362f09cb5044e486086e7d890ae433f7dddc6
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 4cfa61a..b82354c 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -251,7 +251,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/outdev/gradient \
vcl/source/outdev/curvedshapes \
vcl/source/outdev/wallpaper \
- vcl/source/outdev/outdevnative \
+ vcl/source/outdev/nativecontrols \
vcl/source/outdev/outmap \
vcl/source/gdi/pdfextoutdevdata \
vcl/source/gdi/pdffontcache \
diff --git a/vcl/source/outdev/outdevnative.cxx b/vcl/source/outdev/nativecontrols.cxx
similarity index 94%
rename from vcl/source/outdev/outdevnative.cxx
rename to vcl/source/outdev/nativecontrols.cxx
index 8b0ef8a..2a78cce 100644
--- a/vcl/source/outdev/outdevnative.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -24,7 +24,7 @@
#include "salgdi.hxx"
-static bool lcl_enableNativeWidget( const OutputDevice& i_rDevice )
+static bool EnableNativeWidget( const OutputDevice& i_rDevice )
{
const OutDevType eType( i_rDevice.GetOutDevType() );
switch ( eType )
@@ -142,7 +142,7 @@ PushButtonValue* PushButtonValue::clone() const
bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart ) const
{
- if( !lcl_enableNativeWidget( *this ) )
+ if( !EnableNativeWidget( *this ) )
return false;
if ( !mpGraphics )
@@ -158,7 +158,7 @@ bool OutputDevice::HitTestNativeControl( ControlType nType,
const Point& aPos,
bool& rIsInside ) const
{
- if( !lcl_enableNativeWidget( *this ) )
+ if( !EnableNativeWidget( *this ) )
return false;
if ( !mpGraphics )
@@ -173,7 +173,7 @@ bool OutputDevice::HitTestNativeControl( ControlType nType,
rIsInside, this ) );
}
-static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const ImplControlValue& rVal, const OutputDevice& rDev )
+static boost::shared_ptr< ImplControlValue > TransformControlValue( const ImplControlValue& rVal, const OutputDevice& rDev )
{
boost::shared_ptr< ImplControlValue > aResult;
switch( rVal.getType() )
@@ -258,7 +258,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType,
const ImplControlValue& aValue,
const OUString& aCaption )
{
- if( !lcl_enableNativeWidget( *this ) )
+ if( !EnableNativeWidget( *this ) )
return false;
// make sure the current clip region is initialized correctly
@@ -278,7 +278,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType,
// Convert the coordinates from relative to Window-absolute, so we draw
// in the correct place in platform code
- boost::shared_ptr< ImplControlValue > aScreenCtrlValue( lcl_transformControlValue( aValue, *this ) );
+ boost::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) );
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
Region aTestRegion( GetActiveClipRegion() );
@@ -300,7 +300,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType,
Rectangle &rNativeBoundingRegion,
Rectangle &rNativeContentRegion ) const
{
- if( !lcl_enableNativeWidget( *this ) )
+ if( !EnableNativeWidget( *this ) )
return false;
if ( !mpGraphics )
@@ -309,7 +309,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType,
// Convert the coordinates from relative to Window-absolute, so we draw
// in the correct place in platform code
- boost::shared_ptr< ImplControlValue > aScreenCtrlValue( lcl_transformControlValue( aValue, *this ) );
+ boost::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) );
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
commit 31ae9995759c42844aede3f6b66812350f3bf640
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Apr 22 00:55:00 2014 +1000
Group OutputDevice masking functions together in outdev.hxx
Change-Id: Idde02b1456ab23e2479f097bee018f9d6398f003
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 3cd63d1..6758076 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -770,10 +770,6 @@ public:
protected:
OutputDevice();
- virtual void ApplyMask ( const Bitmap& rMask, const Color& rMaskColor,
- const Point& rDestPt, const Size& rDestSize,
- const Point& rSrcPtPixel, const Size& rSrcSizePixel );
-
virtual bool UsePolyPolygonForComplexGradient() = 0;
virtual void EmulateDrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
@@ -1164,15 +1160,6 @@ private:
///@}
public:
- void DrawMask( const Point& rDestPt,
- const Bitmap& rBitmap, const Color& rMaskColor );
- void DrawMask( const Point& rDestPt, const Size& rDestSize,
- const Bitmap& rBitmap, const Color& rMaskColor );
- void DrawMask( const Point& rDestPt, const Size& rDestSize,
- const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const Bitmap& rBitmap, const Color& rMaskColor,
- sal_uLong nAction );
-public:
/** @name Hatch functions
*/
///@{
@@ -1275,6 +1262,29 @@ private:
css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
///@}
+
+public:
+ /** @name Polyline functions
+ */
+ ///@{
+
+ void DrawMask( const Point& rDestPt,
+ const Bitmap& rBitmap, const Color& rMaskColor );
+
+ void DrawMask( const Point& rDestPt, const Size& rDestSize,
+ const Bitmap& rBitmap, const Color& rMaskColor );
+
+ void DrawMask( const Point& rDestPt, const Size& rDestSize,
+ const Point& rSrcPtPixel, const Size& rSrcSizePixel,
+ const Bitmap& rBitmap, const Color& rMaskColor,
+ sal_uLong nAction );
+
+protected:
+ virtual void ApplyMask ( const Bitmap& rMask, const Color& rMaskColor,
+ const Point& rDestPt, const Size& rDestSize,
+ const Point& rSrcPtPixel, const Size& rSrcSizePixel );
+ ///@}
+
public:
void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
void DrawWaveLine( const Point& rStartPos, const Point& rEndPos );
commit 77675447a8e9c61353c2b34d6f60bfc616c1269c
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Apr 22 00:40:20 2014 +1000
Rearrange OutputDevice line functions
Reorganized OutputDevice line functions - several of these functions
should be private. I have renamed the following functions:
* ImplInitLineColor -> InitLineColor (made this private)
* ImplPaintLineGeometryWithEvtlExpand -> PaintLineGeometryWithEvtlExpand
(made this private)
* ImplTryDrawPolyLineDirect -> TryDrawPolyLineDirectNoAA (made this
private)
I also made a small code change to make bTryAA more clear, and also
change (bTryAA && TryDrawPolyLineDirect(rPoly.getB2DPolygon()) to a
nestied if statement.
Change-Id: I90e8083d69b715912bf0ad1d400bc355f3501981
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 584aa23..3cd63d1 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -699,30 +699,8 @@ public:
SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
///@}
- /** @name Line functions
- */
- ///@{
- SAL_DLLPRIVATE void ImplInitLineColor();
SAL_DLLPRIVATE void ImplInitFillColor();
- // #i101491#
- // Helper which holds the old line geometry creation and is extended to use AA when
- // switched on. Advantage is that line geometry is only temporarily used for paint
- SAL_DLLPRIVATE void ImplDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo);
-
- // #i101491#
- // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool. Contains no AA check.
- SAL_DLLPRIVATE bool ImplTryDrawPolyLineDirect(
- const basegfx::B2DPolygon& rB2DPolygon,
- double fLineWidth = 0.0,
- double fTransparency = 0.0,
- basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
- css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
-
- // Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area)
- void ImplPaintLineGeometryWithEvtlExpand(const LineInfo& rInfo, basegfx::B2DPolyPolygon aLinePolyPolygon);
- ///@}
-
/** @name Polygon functions
*/
///@{
@@ -929,44 +907,6 @@ public:
void DrawPixel( const Polygon& rPts, const Color* pColors = NULL );
void DrawPixel( const Polygon& rPts, const Color& rColor );
- void DrawLine( const Point& rStartPt, const Point& rEndPt );
- void DrawLine( const Point& rStartPt, const Point& rEndPt,
- const LineInfo& rLineInfo );
-
- /** Render the given polygon as a line stroke
-
- The given polygon is stroked with the current LineColor, start
- and end point are not automatically connected
-
- @see DrawPolygon
- @see DrawPolyPolygon
- */
- void DrawPolyLine( const Polygon& rPoly );
- void DrawPolyLine(
- const basegfx::B2DPolygon&,
- double fLineWidth = 0.0,
- basegfx::B2DLineJoin = basegfx::B2DLINEJOIN_ROUND,
- css::drawing::LineCap = css::drawing::LineCap_BUTT);
- bool TryDrawPolyLineDirect(
- const basegfx::B2DPolygon& rB2DPolygon,
- double fLineWidth = 0.0,
- double fTransparency = 0.0,
- basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
- css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
-
- /** Render the given polygon as a line stroke
-
- The given polygon is stroked with the current LineColor, start
- and end point are not automatically connected. The line is
- rendered according to the specified LineInfo, e.g. supplying a
- dash pattern, or a line thickness.
-
- @see DrawPolygon
- @see DrawPolyPolygon
- */
- void DrawPolyLine( const Polygon& rPoly,
- const LineInfo& rLineInfo );
-
/** Render the given polygon
The given polygon is stroked with the current LineColor, and
@@ -1256,6 +1196,86 @@ private:
///@}
public:
+ /** @name Line functions
+ */
+ ///@{
+
+ void DrawLine( const Point& rStartPt, const Point& rEndPt );
+
+ void DrawLine( const Point& rStartPt, const Point& rEndPt,
+ const LineInfo& rLineInfo );
+
+ void SetLineColor();
+ void SetLineColor( const Color& rColor );
+ const Color& GetLineColor() const { return maLineColor; }
+ bool IsLineColor() const { return mbLineColor; }
+
+private:
+ SAL_DLLPRIVATE void InitLineColor();
+
+ /** Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area)
+ */
+ SAL_DLLPRIVATE void PaintLineGeometryWithEvtlExpand( const LineInfo& rInfo, basegfx::B2DPolyPolygon aLinePolyPolygon );
+ ///@}
+
+public:
+ /** @name Polyline functions
+ */
+ ///@{
+
+ /** Render the given polygon as a line stroke
+
+ The given polygon is stroked with the current LineColor, start
+ and end point are not automatically connected
+
+ @see DrawPolygon
+ @see DrawPolyPolygon
+ */
+ void DrawPolyLine( const Polygon& rPoly );
+
+ void DrawPolyLine(
+ const basegfx::B2DPolygon&,
+ double fLineWidth = 0.0,
+ basegfx::B2DLineJoin = basegfx::B2DLINEJOIN_ROUND,
+ css::drawing::LineCap = css::drawing::LineCap_BUTT);
+
+ /** Render the given polygon as a line stroke
+
+ The given polygon is stroked with the current LineColor, start
+ and end point are not automatically connected. The line is
+ rendered according to the specified LineInfo, e.g. supplying a
+ dash pattern, or a line thickness.
+
+ @see DrawPolygon
+ @see DrawPolyPolygon
+ */
+ void DrawPolyLine( const Polygon& rPoly,
+ const LineInfo& rLineInfo );
+private:
+ // #i101491#
+ // Helper which holds the old line geometry creation and is extended to use AA when
+ // switched on. Advantage is that line geometry is only temporarily used for paint
+ SAL_DLLPRIVATE void DrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo);
+
+
+ bool TryDrawPolyLineDirect(
+ const basegfx::B2DPolygon& rB2DPolygon,
+ double fLineWidth = 0.0,
+ double fTransparency = 0.0,
+ basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
+ css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
+
+ // #i101491#
+ // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool. Contains no AA check.
+ SAL_DLLPRIVATE bool TryDrawPolyLineDirectNoAA(
+ const basegfx::B2DPolygon& rB2DPolygon,
+ double fLineWidth = 0.0,
+ double fTransparency = 0.0,
+ basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
+ css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
+ ///@}
+
+public:
void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
void DrawWaveLine( const Point& rStartPos, const Point& rEndPos );
void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags );
@@ -1340,11 +1360,6 @@ public:
void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
OutDevViewType GetOutDevViewType() const { return meOutDevViewType; }
- void SetLineColor();
- void SetLineColor( const Color& rColor );
- const Color& GetLineColor() const { return maLineColor; }
- bool IsLineColor() const { return mbLineColor; }
-
void SetFillColor();
void SetFillColor( const Color& rColor );
const Color& GetFillColor() const { return maFillColor; }
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 6fe9b38..6983a3c 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -858,7 +858,7 @@ void Printer::ApplyMask( const Bitmap& rMask, const Color& rMaskColor,
Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
SetLineColor( rMaskColor );
SetFillColor( rMaskColor );
- ImplInitLineColor();
+ InitLineColor();
ImplInitFillColor();
// create forward mapping tables
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index 7fe7e68..160d06b 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -56,7 +56,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
Polygon aRectPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
if ( aRectPoly.GetSize() >= 2 )
@@ -103,7 +103,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
@@ -146,7 +146,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
@@ -196,7 +196,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect,
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index af1e7b3..f89a004 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -104,7 +104,7 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
EnableMapMode( false );
Push( PUSH_LINECOLOR );
SetLineColor( aHatch.GetColor() );
- ImplInitLineColor();
+ InitLineColor();
DrawHatch( aPolyPoly, aHatch, false );
Pop();
EnableMapMode( bOldMap );
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 14b630c..c6e9a86 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -24,6 +24,8 @@
#include <salgdi.hxx>
+#include "outdata.hxx"
+
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
@@ -45,8 +47,11 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt,
if ( !IsDeviceOutputNecessary() || !mbLineColor || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() )
return;
- if( !mpGraphics && !ImplGetGraphics() )
- return;
+ if( !mpGraphics )
+ {
+ if ( !ImplGetGraphics() )
+ return;
+ }
if ( mbInitClipRegion )
ImplInitClipRegion();
@@ -61,7 +66,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt,
const bool bLineWidthUsed(aInfo.GetWidth() > 1);
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if(bDashUsed || bLineWidthUsed)
{
@@ -69,7 +74,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt,
aLinePolygon.append(basegfx::B2DPoint(aStartPt.X(), aStartPt.Y()));
aLinePolygon.append(basegfx::B2DPoint(aEndPt.X(), aEndPt.Y()));
- ImplPaintLineGeometryWithEvtlExpand(aInfo, basegfx::B2DPolyPolygon(aLinePolygon));
+ PaintLineGeometryWithEvtlExpand(aInfo, basegfx::B2DPolyPolygon(aLinePolygon));
}
else
{
@@ -97,11 +102,12 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
if ( mbInitClipRegion )
ImplInitClipRegion();
+
if ( mbOutputClipped )
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
// #i101598# support AA and snap for lines, too
if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
@@ -139,9 +145,78 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
mpAlphaVDev->DrawLine( rStartPt, rEndPt );
}
-void OutputDevice::ImplPaintLineGeometryWithEvtlExpand(
- const LineInfo& rInfo,
- basegfx::B2DPolyPolygon aLinePolyPolygon)
+void OutputDevice::SetLineColor()
+{
+
+ if ( mpMetaFile )
+ mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
+
+ if ( mbLineColor )
+ {
+ mbInitLineColor = true;
+ mbLineColor = false;
+ maLineColor = Color( COL_TRANSPARENT );
+ }
+
+ if( mpAlphaVDev )
+ mpAlphaVDev->SetLineColor();
+}
+
+void OutputDevice::SetLineColor( const Color& rColor )
+{
+
+ Color aColor = ImplDrawModeToColor( rColor );
+
+ if( mpMetaFile )
+ mpMetaFile->AddAction( new MetaLineColorAction( aColor, true ) );
+
+ if( ImplIsColorTransparent( aColor ) )
+ {
+ if ( mbLineColor )
+ {
+ mbInitLineColor = true;
+ mbLineColor = false;
+ maLineColor = Color( COL_TRANSPARENT );
+ }
+ }
+ else
+ {
+ if( maLineColor != aColor )
+ {
+ mbInitLineColor = true;
+ mbLineColor = true;
+ maLineColor = aColor;
+ }
+ }
+
+ if( mpAlphaVDev )
+ mpAlphaVDev->SetLineColor( COL_BLACK );
+}
+
+void OutputDevice::InitLineColor()
+{
+ DBG_TESTSOLARMUTEX();
+
+ if( mbLineColor )
+ {
+ if( ROP_0 == meRasterOp )
+ mpGraphics->SetROPLineColor( SAL_ROP_0 );
+ else if( ROP_1 == meRasterOp )
+ mpGraphics->SetROPLineColor( SAL_ROP_1 );
+ else if( ROP_INVERT == meRasterOp )
+ mpGraphics->SetROPLineColor( SAL_ROP_INVERT );
+ else
+ mpGraphics->SetLineColor( ImplColorToSal( maLineColor ) );
+ }
+ else
+ mpGraphics->SetLineColor();
+
+ mbInitLineColor = false;
+}
+
+void OutputDevice::PaintLineGeometryWithEvtlExpand(
+ const LineInfo& rInfo,
+ basegfx::B2DPolyPolygon aLinePolyPolygon)
{
const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
@@ -245,7 +320,7 @@ void OutputDevice::ImplPaintLineGeometryWithEvtlExpand(
const Color aOldFillColor( maFillColor );
SetLineColor();
- ImplInitLineColor();
+ InitLineColor();
SetFillColor( aOldLineColor );
ImplInitFillColor();
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 997ccc4..032ed03 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -781,27 +781,6 @@ void OutputDevice::ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const
}
-void OutputDevice::ImplInitLineColor()
-{
- DBG_TESTSOLARMUTEX();
-
- if( mbLineColor )
- {
- if( ROP_0 == meRasterOp )
- mpGraphics->SetROPLineColor( SAL_ROP_0 );
- else if( ROP_1 == meRasterOp )
- mpGraphics->SetROPLineColor( SAL_ROP_1 );
- else if( ROP_INVERT == meRasterOp )
- mpGraphics->SetROPLineColor( SAL_ROP_INVERT );
- else
- mpGraphics->SetLineColor( ImplColorToSal( maLineColor ) );
- }
- else
- mpGraphics->SetLineColor();
-
- mbInitLineColor = false;
-}
-
void OutputDevice::ImplInitFillColor()
{
DBG_TESTSOLARMUTEX();
@@ -1068,23 +1047,6 @@ void OutputDevice::SetRasterOp( RasterOp eRasterOp )
mpAlphaVDev->SetRasterOp( eRasterOp );
}
-void OutputDevice::SetLineColor()
-{
-
- if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
-
- if ( mbLineColor )
- {
- mbInitLineColor = true;
- mbLineColor = false;
- maLineColor = Color( COL_TRANSPARENT );
- }
-
- if( mpAlphaVDev )
- mpAlphaVDev->SetLineColor();
-}
-
Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const
{
Color aColor( rColor );
@@ -1125,37 +1087,6 @@ Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const
return aColor;
}
-void OutputDevice::SetLineColor( const Color& rColor )
-{
-
- Color aColor = ImplDrawModeToColor( rColor );
-
- if( mpMetaFile )
- mpMetaFile->AddAction( new MetaLineColorAction( aColor, true ) );
-
- if( ImplIsColorTransparent( aColor ) )
- {
- if ( mbLineColor )
- {
- mbInitLineColor = true;
- mbLineColor = false;
- maLineColor = Color( COL_TRANSPARENT );
- }
- }
- else
- {
- if( maLineColor != aColor )
- {
- mbInitLineColor = true;
- mbLineColor = true;
- maLineColor = aColor;
- }
- }
-
- if( mpAlphaVDev )
- mpAlphaVDev->SetLineColor( COL_BLACK );
-}
-
void OutputDevice::SetFillColor()
{
diff --git a/vcl/source/outdev/outdevnative.cxx b/vcl/source/outdev/outdevnative.cxx
index e521ae7..8b0ef8a 100644
--- a/vcl/source/outdev/outdevnative.cxx
+++ b/vcl/source/outdev/outdevnative.cxx
@@ -272,7 +272,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType,
return true;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index 02c8741..5da1ca3 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -92,7 +92,7 @@ void OutputDevice::DrawPixel( const Point& rPt )
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
mpGraphics->DrawPixel( aPt.X(), aPt.Y(), this );
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 7402675..3598186 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -56,7 +56,7 @@ void OutputDevice::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
@@ -163,7 +163,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
@@ -263,7 +263,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
return;
if( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if( mbInitFillColor )
ImplInitFillColor();
@@ -528,7 +528,7 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLon
}
if( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if( mbInitFillColor )
ImplInitFillColor();
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index 97dab0f..3d06e27 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -50,31 +50,34 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
- const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
- && mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
- && ROP_OVERPAINT == GetRasterOp()
- && IsLineColor());
+ const bool bTryAA( (mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ && mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
+ && ROP_OVERPAINT == GetRasterOp()
+ && IsLineColor());
// use b2dpolygon drawing if possible
- if(bTryAA && ImplTryDrawPolyLineDirect(rPoly.getB2DPolygon()))
+ if(bTryAA)
{
- basegfx::B2DPolygon aB2DPolyLine(rPoly.getB2DPolygon());
- const ::basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
- const ::basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 );
+ if ( TryDrawPolyLineDirectNoAA( rPoly.getB2DPolygon() ) )
+ {
+ basegfx::B2DPolygon aB2DPolyLine(rPoly.getB2DPolygon());
+ const ::basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
+ const ::basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 );
- // transform the polygon
- aB2DPolyLine.transform( aTransform );
+ // transform the polygon
+ aB2DPolyLine.transform( aTransform );
- if(mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE)
- {
- aB2DPolyLine = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine);
- }
+ if(mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE)
+ {
+ aB2DPolyLine = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine);
+ }
- if(mpGraphics->DrawPolyLine( aB2DPolyLine, 0.0, aB2DLineWidth, basegfx::B2DLINEJOIN_NONE, css::drawing::LineCap_BUTT, this))
- {
- return;
+ if(mpGraphics->DrawPolyLine( aB2DPolyLine, 0.0, aB2DLineWidth, basegfx::B2DLINEJOIN_NONE, css::drawing::LineCap_BUTT, this))
+ {
+ return;
+ }
}
}
@@ -122,7 +125,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyLineAction( rPoly, rLineInfo ) );
- ImplDrawPolyLineWithLineInfo(rPoly, rLineInfo);
+ DrawPolyLineWithLineInfo(rPoly, rLineInfo);
}
void OutputDevice::DrawPolyLine(
@@ -156,7 +159,7 @@ void OutputDevice::DrawPolyLine(
return;
if( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
@@ -164,9 +167,10 @@ void OutputDevice::DrawPolyLine(
&& IsLineColor());
// use b2dpolygon drawing if possible
- if(bTryAA && ImplTryDrawPolyLineDirect(rB2DPolygon, fLineWidth, 0.0, eLineJoin, eLineCap))
+ if(bTryAA)
{
- return;
+ if ( TryDrawPolyLineDirectNoAA(rB2DPolygon, fLineWidth, 0.0, eLineJoin, eLineCap) )
+ return;
}
// #i101491#
@@ -188,7 +192,7 @@ void OutputDevice::DrawPolyLine(
const Color aOldFillColor(maFillColor);
SetLineColor();
- ImplInitLineColor();
+ InitLineColor();
SetFillColor(aOldLineColor);
ImplInitFillColor();
@@ -200,7 +204,7 @@ void OutputDevice::DrawPolyLine(
}
SetLineColor(aOldLineColor);
- ImplInitLineColor();
+ InitLineColor();
SetFillColor(aOldFillColor);
ImplInitFillColor();
@@ -210,7 +214,7 @@ void OutputDevice::DrawPolyLine(
// to avoid optical gaps
for(sal_uInt32 a(0); a < aAreaPolyPolygon.count(); a++)
{
- ImplTryDrawPolyLineDirect(aAreaPolyPolygon.getB2DPolygon(a));
+ TryDrawPolyLineDirectNoAA(aAreaPolyPolygon.getB2DPolygon(a));
}
}
}
@@ -221,11 +225,11 @@ void OutputDevice::DrawPolyLine(
LineInfo aLineInfo;
if( fLineWidth != 0.0 )
aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
- ImplDrawPolyLineWithLineInfo( aToolsPolygon, aLineInfo );
+ DrawPolyLineWithLineInfo( aToolsPolygon, aLineInfo );
}
}
-void OutputDevice::ImplDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo)
+void OutputDevice::DrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo)
{
sal_uInt16 nPoints(rPoly.GetSize());
@@ -245,7 +249,7 @@ void OutputDevice::ImplDrawPolyLineWithLineInfo(const Polygon& rPoly, const Line
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) );
const bool bDashUsed(LINE_DASH == aInfo.GetStyle());
@@ -253,7 +257,7 @@ void OutputDevice::ImplDrawPolyLineWithLineInfo(const Polygon& rPoly, const Line
if(bDashUsed || bLineWidthUsed)
{
- ImplPaintLineGeometryWithEvtlExpand(aInfo, basegfx::B2DPolyPolygon(aPoly.getB2DPolygon()));
+ PaintLineGeometryWithEvtlExpand(aInfo, basegfx::B2DPolyPolygon(aPoly.getB2DPolygon()));
}
else
{
@@ -273,7 +277,7 @@ void OutputDevice::ImplDrawPolyLineWithLineInfo(const Polygon& rPoly, const Line
mpAlphaVDev->DrawPolyLine( rPoly, rLineInfo );
}
-bool OutputDevice::ImplTryDrawPolyLineDirect(
+bool OutputDevice::TryDrawPolyLineDirectNoAA(
const basegfx::B2DPolygon& rB2DPolygon,
double fLineWidth,
double fTransparency,
@@ -336,7 +340,7 @@ bool OutputDevice::TryDrawPolyLineDirect(
return true;
if( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
@@ -345,7 +349,7 @@ bool OutputDevice::TryDrawPolyLineDirect(
if(bTryAA)
{
- if(ImplTryDrawPolyLineDirect(rB2DPolygon, fLineWidth, fTransparency, eLineJoin, eLineCap))
+ if(TryDrawPolyLineDirectNoAA(rB2DPolygon, fLineWidth, fTransparency, eLineJoin, eLineCap))
{
// worked, add metafile action (if recorded) and return true
if( mpMetaFile )
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index c8663d8..6e26585 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -51,7 +51,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect )
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
@@ -92,7 +92,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
return;
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 964d255..acf9464 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -196,7 +196,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
return;
if( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if( mbInitFillColor )
ImplInitFillColor();
@@ -276,7 +276,7 @@ bool OutputDevice::DrawTransparentNatively ( const PolyPolygon& rPolyPoly,
if( mbOutputClipped )
return false;
if( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if( mbInitFillColor )
ImplInitFillColor();
@@ -360,7 +360,7 @@ void OutputDevice::EmulateDrawTransparent ( const PolyPolygon& rPolyPoly,
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbInitLineColor )
- ImplInitLineColor();
+ InitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
commit ce224a70a83d11f6eedea68b3bb8318e2e36f64d
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Mon Apr 21 23:45:47 2014 +1000
Renamed function ImplHatchCmpFnc to HatchCmpFnc
Change-Id: Idcb2b3c1ad1830bb781b5a9a0527dd2a08ef2b18
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 743db9e..af1e7b3 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -31,7 +31,7 @@
#define HATCH_MAXPOINTS 1024
-extern "C" int SAL_CALL ImplHatchCmpFnc( const void* p1, const void* p2 )
+extern "C" int SAL_CALL HatchCmpFnc( const void* p1, const void* p2 )
{
const long nX1 = ( (Point*) p1 )->X();
const long nX2 = ( (Point*) p2 )->X();
@@ -374,7 +374,7 @@ void OutputDevice::DrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPol
if( nPCounter > 1 )
{
- qsort( pPtBuffer, nPCounter, sizeof( Point ), ImplHatchCmpFnc );
+ qsort( pPtBuffer, nPCounter, sizeof( Point ), HatchCmpFnc );
if( nPCounter & 1 )
nPCounter--;
commit b302925d075ff377d58eee609e02017e35292108
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Mon Apr 21 23:38:59 2014 +1000
Reorganize OutputDevice hatch functions
Grouped hatch functions in outdev.hxx. Renamed ImplDrawHatch to DrawHatch
(allow C++ overloading to work out which to use), and renamed
ImplCalcHatchValues to CalcHatchValues and ImplDrawHatchLine to
DrawHatchLIne.
Change-Id: I7be62ec1754864424f6c158ab70178606ccbf1b1
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 5b4cb6d..584aa23 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -736,14 +736,6 @@ public:
///@}
public:
- /** @name Hatch functions
- */
- ///@{
- SAL_DLLPRIVATE void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
- SAL_DLLPRIVATE void ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
- SAL_DLLPRIVATE void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
- ///@}
-
/** @name Wallpaper functions
*/
///@{
@@ -1240,7 +1232,10 @@ public:
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const Color& rMaskColor,
sal_uLong nAction );
-
+public:
+ /** @name Hatch functions
+ */
+ ///@{
#ifdef _MSC_VER
void DrawHatch( const PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
void AddHatchActions( const PolyPolygon& rPolyPoly,
@@ -1253,6 +1248,14 @@ public:
GDIMetaFile& rMtf );
#endif
+ void DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
+
+private:
+ SAL_DLLPRIVATE void CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list