Kaydet (Commit) b9fa01a8 authored tarafından Armin Le Grand's avatar Armin Le Grand

Support buffering SystemDependent GraphicData

This is a first step to allow buffering of system
dependent data, especially (but not only) for the
system-dependent implementations of graphic output.
For example, for B2DPolygon and Win output, it allows
buffering the Gdiplus::GraphicsPath instead of re-
creating it all the time.
To support that, the change includes forwarding the
current transformation to the renderers in SalGraphics.
The current state in VCL is to transform all and
everything to device coordinates at every single
paint.
I have currently started to do this for ::drawPolyLine
implementations. The fallbacks for all systems will
at the start of that method just transform the data
to device coordinates, so all works as before.
This may also be done for FilledPolygon paint in a later
step, but most urgent is FatLine painting.
An arrangement of shared_ptr/weak_ptr is used so that
either the instance buffering (in the example B2DPolygon)
or the instance managing it can delete it. The instance
managing it currently uses a 1s Timer and a cycle-lifetime
management, but that can be extended in the future
to e.g. include size hints, too.
The mechanism it designed to support multiple Data per
buffering element, e.g. for B2DPolygon at the same time
system-dependent instances of Gdiplus and Cairo can be
buffered, but also PDF-data.
This is achieved semi-automatic by using
typeid(class).hash_code() as key for organization.
The mechanism will be used for now at B2DPolygon, but
is not limited to. There is already a similar but less
general buffer (see GdiPlusBuffer) that can and will
be converted to use this new mechanism.

Added vcl/headless Cairo renderer to support given
ObjectToDevice transformation (not to transform given
B2DPolygon)
Added support for CairoPath buffered at B2DPolygon,
seems to work well. Need to do more tests

Moved usage to templates suggested by Noel Grandin
(Noel Grandin <noelgrandin@gmail.com>), thanks for
these suggestions. Adapted Win usage to that, too.

Converted Win-specific GdiPlus BitmapBuffer to new
mechanism, works well. Checked, the manager holds
now a mix of bitmap and path data under Win

Added a cleanup mechanism to flush all buffered data
at DeInitVCL() using flushAll() at
SystemDependentDataBuffer

Adapted Linux-versions of ::drawPolyLine to support
PixelSnapHairline, for now in a simplified version
that still allows buffering. This will also be used
(and use buffering) for the Cairo-fallback in
X11SalGraphics

Change-Id: I88d7e438a20b96ddab7707050893bdd590c098c7
Reviewed-on: https://gerrit.libreoffice.org/59555Tested-by: 's avatarArmin Le Grand <Armin.Le.Grand@cib.de>
Reviewed-by: 's avatarArmin Le Grand <Armin.Le.Grand@cib.de>
üst f4a9ce33
......@@ -72,6 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,basegfx,\
basegfx/source/tools/keystoplerp \
basegfx/source/tools/numbertools \
basegfx/source/tools/stringconversiontools \
basegfx/source/tools/systemdependentdata \
basegfx/source/tools/tools \
basegfx/source/tools/unopolypolygon \
basegfx/source/tools/zoomtools \
......
......@@ -24,6 +24,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/curve/b2dcubicbezier.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/utils/systemdependentdata.hxx>
#include <algorithm>
#include <memory>
#include <vector>
......@@ -455,20 +456,21 @@ public:
}
};
class ImplBufferedData
class ImplBufferedData : public basegfx::SystemDependentDataHolder
{
private:
// Possibility to hold the last subdivision
std::unique_ptr< basegfx::B2DPolygon > mpDefaultSubdivision;
std::unique_ptr< basegfx::B2DPolygon > mpDefaultSubdivision;
// Possibility to hold the last B2DRange calculation
std::unique_ptr< basegfx::B2DRange > mpB2DRange;
std::unique_ptr< basegfx::B2DRange > mpB2DRange;
public:
ImplBufferedData()
: mpDefaultSubdivision(),
mpB2DRange()
{}
{
}
const basegfx::B2DPolygon& getDefaultAdaptiveSubdivision(const basegfx::B2DPolygon& rSource) const
{
......@@ -1100,6 +1102,26 @@ public:
maPoints.transform(rMatrix);
}
}
void addOrReplaceSystemDependentData(basegfx::SystemDependentData_SharedPtr& rData)
{
if(!mpBufferedData)
{
mpBufferedData.reset(new ImplBufferedData);
}
mpBufferedData->addOrReplaceSystemDependentData(rData);
}
basegfx::SystemDependentData_SharedPtr getSystemDependentData(size_t hash_code) const
{
if(mpBufferedData)
{
return mpBufferedData->getSystemDependentData(hash_code);
}
return basegfx::SystemDependentData_SharedPtr();
}
};
namespace basegfx
......@@ -1470,6 +1492,23 @@ namespace basegfx
}
}
void B2DPolygon::addOrReplaceSystemDependentDataInternal(SystemDependentData_SharedPtr& rData) const
{
// Need to get ImplB2DPolygon* from cow_wrapper *without*
// calling make_unique() here - we do not want to
// 'modify' the ImplB2DPolygon, but add buffered data that
// is valid for all referencing instances
const B2DPolygon* pMe(this);
const ImplB2DPolygon* pMyImpl(pMe->mpPolygon.get());
const_cast<ImplB2DPolygon*>(pMyImpl)->addOrReplaceSystemDependentData(rData);
}
SystemDependentData_SharedPtr B2DPolygon::getSystemDependantDataInternal(size_t hash_code) const
{
return mpPolygon->getSystemDependentData(hash_code);
}
} // end of namespace basegfx
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <basegfx/utils/systemdependentdata.hxx>
namespace basegfx
{
SystemDependentDataManager::SystemDependentDataManager()
{
}
SystemDependentDataManager::~SystemDependentDataManager()
{
}
} // namespace basegfx
namespace basegfx
{
MinimalSystemDependentDataManager::MinimalSystemDependentDataManager()
: SystemDependentDataManager(),
maSystemDependentDataReferences()
{
}
MinimalSystemDependentDataManager::~MinimalSystemDependentDataManager()
{
}
void MinimalSystemDependentDataManager::startUsage(basegfx::SystemDependentData_SharedPtr& rData)
{
if(rData)
{
maSystemDependentDataReferences.insert(rData);
}
}
void MinimalSystemDependentDataManager::endUsage(basegfx::SystemDependentData_SharedPtr& rData)
{
if(rData)
{
maSystemDependentDataReferences.erase(rData);
}
}
void MinimalSystemDependentDataManager::touchUsage(basegfx::SystemDependentData_SharedPtr& /* rData */)
{
}
void MinimalSystemDependentDataManager::flushAll()
{
maSystemDependentDataReferences.clear();
}
} // namespace basegfx
namespace basegfx
{
SystemDependentData::SystemDependentData(
SystemDependentDataManager& rSystemDependentDataManager,
sal_uInt32 nHoldCycles)
: mrSystemDependentDataManager(rSystemDependentDataManager),
mnHoldCycles(nHoldCycles)
{
}
SystemDependentData::~SystemDependentData()
{
}
} // namespace basegfx
namespace basegfx
{
SystemDependentDataHolder::SystemDependentDataHolder()
: maSystemDependentReferences()
{
}
SystemDependentDataHolder::~SystemDependentDataHolder()
{
for(auto& candidate : maSystemDependentReferences)
{
basegfx::SystemDependentData_SharedPtr aData(candidate.second.lock());
if(aData)
{
aData->getSystemDependentDataManager().endUsage(aData);
}
}
}
void SystemDependentDataHolder::addOrReplaceSystemDependentData(basegfx::SystemDependentData_SharedPtr& rData)
{
const size_t hash_code(typeid(*rData.get()).hash_code());
auto result(maSystemDependentReferences.find(hash_code));
if(result != maSystemDependentReferences.end())
{
basegfx::SystemDependentData_SharedPtr aData(result->second.lock());
if(aData)
{
aData->getSystemDependentDataManager().endUsage(aData);
}
maSystemDependentReferences.erase(result);
result = maSystemDependentReferences.end();
}
maSystemDependentReferences[hash_code] = rData;
rData->getSystemDependentDataManager().startUsage(rData);
}
SystemDependentData_SharedPtr SystemDependentDataHolder::getSystemDependentData(size_t hash_code) const
{
basegfx::SystemDependentData_SharedPtr aRetval;
auto result(maSystemDependentReferences.find(hash_code));
if(result != maSystemDependentReferences.end())
{
aRetval = result->second.lock();
if(aRetval)
{
aRetval->getSystemDependentDataManager().touchUsage(aRetval);
}
else
{
const_cast< SystemDependentDataHolder* >(this)->maSystemDependentReferences.erase(result);
}
}
return aRetval;
}
} // namespace basegfx
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -40,6 +40,7 @@
#include <vcl/vclmedit.hxx>
#include <vcl/button.hxx>
#include <svtools/optionsdrawinglayer.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
using namespace com::sun::star;
......@@ -454,6 +455,7 @@ void ScreenshotAnnotationDlg_Impl::PaintControlDataEntry(
// try to use transparency
if (!mpVirtualBufferDevice->DrawPolyLineDirect(
basegfx::B2DHomMatrix(),
aPolygon,
fLineWidth,
fTransparency,
......
......@@ -291,6 +291,9 @@ namespace drawinglayer
maLineAttribute(rLineAttribute),
maStrokeAttribute(rStrokeAttribute)
{
// simplify curve segments: moved here to not need to use it
// at VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect
maPolygon = basegfx::utils::simplifyCurveSegments(maPolygon);
}
PolygonStrokePrimitive2D::PolygonStrokePrimitive2D(
......@@ -301,6 +304,9 @@ namespace drawinglayer
maLineAttribute(rLineAttribute),
maStrokeAttribute()
{
// simplify curve segments: moved here to not need to use it
// at VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect
maPolygon = basegfx::utils::simplifyCurveSegments(maPolygon);
}
bool PolygonStrokePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
......
......@@ -127,9 +127,9 @@ namespace drawinglayer
bool VclPixelProcessor2D::tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency)
{
basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
const basegfx::B2DPolygon& rLocalPolygon(rSource.getB2DPolygon());
if(!aLocalPolygon.count())
if(!rLocalPolygon.count())
{
// no geometry, done
return true;
......@@ -139,10 +139,14 @@ namespace drawinglayer
mpOutputDevice->SetFillColor();
mpOutputDevice->SetLineColor(Color(aLineColor));
aLocalPolygon.transform(maCurrentTransformation);
//aLocalPolygon.transform(maCurrentTransformation);
// try drawing; if it did not work, use standard fallback
return mpOutputDevice->DrawPolyLineDirect( aLocalPolygon, 0.0, fTransparency);
return mpOutputDevice->DrawPolyLineDirect(
maCurrentTransformation,
rLocalPolygon,
0.0,
fTransparency);
}
bool VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency)
......@@ -158,7 +162,8 @@ namespace drawinglayer
basegfx::B2DPolyPolygon aHairLinePolyPolygon;
// simplify curve segments
aLocalPolygon = basegfx::utils::simplifyCurveSegments(aLocalPolygon);
// moved to PolygonStrokePrimitive2D::PolygonStrokePrimitive2D
// aLocalPolygon = basegfx::utils::simplifyCurveSegments(aLocalPolygon);
if(rSource.getStrokeAttribute().isDefault() || 0.0 == rSource.getStrokeAttribute().getFullDotDashLen())
{
......@@ -182,24 +187,24 @@ namespace drawinglayer
return true;
}
// check if LineWidth can be simplified in world coordinates
double fLineWidth(rSource.getLineAttribute().getWidth());
if(basegfx::fTools::more(fLineWidth, 0.0))
{
basegfx::B2DVector aLineWidth(fLineWidth, 0.0);
aLineWidth = maCurrentTransformation * aLineWidth;
fLineWidth = aLineWidth.getLength();
}
const double fWorldLineWidth(aLineWidth.getLength());
// draw simple hairline for small line widths
// see also RenderPolygonStrokePrimitive2D which is used if this try fails
bool bIsAntiAliasing = getOptionsDrawinglayer().IsAntiAliasing();
if ( (basegfx::fTools::lessOrEqual(fLineWidth, 1.0) && bIsAntiAliasing)
|| (basegfx::fTools::lessOrEqual(fLineWidth, 1.5) && !bIsAntiAliasing))
{
// draw simple hairline
fLineWidth = 0.0;
// draw simple hairline for small line widths
// see also RenderPolygonStrokePrimitive2D which is used if this try fails
bool bIsAntiAliasing = getOptionsDrawinglayer().IsAntiAliasing();
if ( (basegfx::fTools::lessOrEqual(fWorldLineWidth, 1.0) && bIsAntiAliasing)
|| (basegfx::fTools::lessOrEqual(fWorldLineWidth, 1.5) && !bIsAntiAliasing))
{
// draw simple hairline
fLineWidth = 0.0;
}
}
const basegfx::BColor aLineColor(
......@@ -208,7 +213,9 @@ namespace drawinglayer
mpOutputDevice->SetFillColor();
mpOutputDevice->SetLineColor(Color(aLineColor));
aHairLinePolyPolygon.transform(maCurrentTransformation);
// do not transform self
// aHairLinePolyPolygon.transform(maCurrentTransformation);
bool bHasPoints(false);
bool bTryWorked(false);
......@@ -222,6 +229,7 @@ namespace drawinglayer
bHasPoints = true;
if(mpOutputDevice->DrawPolyLineDirect(
maCurrentTransformation,
aSingle,
fLineWidth,
fTransparency,
......
......@@ -29,6 +29,7 @@
#include <basegfx/basegfxdllapi.h>
class ImplB2DPolygon;
class SalGraphicsImpl;
namespace basegfx
{
......@@ -37,6 +38,9 @@ namespace basegfx
class B2DVector;
class B2DHomMatrix;
class B2DCubicBezier;
class SystemDependentData;
class SystemDependentDataManager;
typedef std::shared_ptr<SystemDependentData> SystemDependentData_SharedPtr;
}
namespace basegfx
......@@ -218,6 +222,26 @@ namespace basegfx
/// apply transformation given in matrix form
void transform(const basegfx::B2DHomMatrix& rMatrix);
// exclusive management op's for SystemDependentData at B2DPolygon
template<class T>
std::shared_ptr<T> getSystemDependentData() const
{
return std::static_pointer_cast<T>(getSystemDependantDataInternal(typeid(T).hash_code()));
}
template<class T, class... Args>
std::shared_ptr<T> addOrReplaceSystemDependentData(SystemDependentDataManager& manager, Args&&... args) const
{
std::shared_ptr<T> r = std::make_shared<T>(manager, std::forward<Args>(args)...);
basegfx::SystemDependentData_SharedPtr r2(r);
addOrReplaceSystemDependentDataInternal(r2);
return r;
}
private:
void addOrReplaceSystemDependentDataInternal(SystemDependentData_SharedPtr& rData) const;
SystemDependentData_SharedPtr getSystemDependantDataInternal(size_t hash_code) const;
};
// typedef for a vector of B2DPolygons
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_BASEGFX_SYSTEMDEPENDENTDATA_HXX
#define INCLUDED_BASEGFX_SYSTEMDEPENDENTDATA_HXX
#include <sal/types.h>
#include <basegfx/basegfxdllapi.h>
#include <memory>
#include <map>
#include <set>
namespace basegfx
{
class SystemDependentData;
typedef std::shared_ptr<SystemDependentData> SystemDependentData_SharedPtr;
typedef std::weak_ptr<SystemDependentData> SystemDependentData_WeakPtr;
} // end of namespace basegfx
namespace basegfx
{
class BASEGFX_DLLPUBLIC SystemDependentDataManager
{
private:
// noncopyable
SystemDependentDataManager(const SystemDependentDataManager&) = delete;
SystemDependentDataManager& operator=(const SystemDependentDataManager&) = delete;
public:
SystemDependentDataManager();
virtual ~SystemDependentDataManager();
// call from (and with) SystemDependentData objects when start/end/touch
// usage is needed
virtual void startUsage(basegfx::SystemDependentData_SharedPtr& rData) = 0;
virtual void endUsage(basegfx::SystemDependentData_SharedPtr& rData) = 0;
virtual void touchUsage(basegfx::SystemDependentData_SharedPtr& rData) = 0;
// flush all buffred data (e.g. cleanup/shutdown)
virtual void flushAll() = 0;
};
} // end of namespace basegfx
namespace basegfx
{
class BASEGFX_DLLPUBLIC MinimalSystemDependentDataManager : public SystemDependentDataManager
{
private:
// example of a minimal SystemDependentDataManager. It *needs to hold*
// a SystemDependentData_SharedPtr while SystemDependentDataHolder's will
// use a SystemDependentData_WeakPtr. When the held SystemDependentData_SharedPtr
// is deleted, the corresponding SystemDependentData_WeakPtr will get void.
// To make this work, a minimal SystemDependentDataManager *has* to hold at
// least that one SystemDependentData_SharedPtr.
// That SystemDependentData_SharedPtr may be (e.g. Timer-based or ressource-based)
// be freed then. This minimal implementation does never free it, so all stay valid.
// The instances may still be removed by endUsage calls, but there is no
// caching/buffering mechanism involved here at all. It's an example, but
// not used - better use an advanced derivation of SystemDependentDataManager
std::set< SystemDependentData_SharedPtr > maSystemDependentDataReferences;
public:
MinimalSystemDependentDataManager();
virtual ~MinimalSystemDependentDataManager() override;
virtual void startUsage(basegfx::SystemDependentData_SharedPtr& rData) override;
virtual void endUsage(basegfx::SystemDependentData_SharedPtr& rData) override;
virtual void touchUsage(basegfx::SystemDependentData_SharedPtr& rData) override;
virtual void flushAll() override;
};
} // end of namespace basegfx
namespace basegfx
{
class BASEGFX_DLLPUBLIC SystemDependentData
{
private:
// noncopyable
SystemDependentData(const SystemDependentData&) = delete;
SystemDependentData& operator=(const SystemDependentData&) = delete;
// reference to a SystemDependentDataManager, probably
// a single, globally used one, but not necessarily
SystemDependentDataManager& mrSystemDependentDataManager;
// number of cycles a SystemDependentDataManager should/might
// hold this instance - does not have to be used, but should be
sal_uInt32 mnHoldCycles;
public:
SystemDependentData(
SystemDependentDataManager& rSystemDependentDataManager,
sal_uInt32 nHoldCycles = 60);
// CAUTION! It is VERY important to keep this base class
// virtual, else typeid(class).hash_code() from derived classes
// will NOT work what is ESSENTIAL for the SystemDependentData
// mechanism to work properly. So DO NOT REMOVE virtual here, please.
virtual ~SystemDependentData();
// allow access to call startUsage/endUsage/touchUsage
// using getSystemDependentDataManager()
SystemDependentDataManager& getSystemDependentDataManager() { return mrSystemDependentDataManager; }
// number of cycles to hold data
sal_uInt32 getHoldCycles() const { return mnHoldCycles; }
};
} // end of namespace basegfx
namespace basegfx
{
class BASEGFX_DLLPUBLIC SystemDependentDataHolder
{
private:
// Possibility to hold System-Dependent B2DPolygon-Representations
std::map< size_t, SystemDependentData_WeakPtr > maSystemDependentReferences;
// noncopyable
SystemDependentDataHolder(const SystemDependentDataHolder&) = delete;
SystemDependentDataHolder& operator=(const SystemDependentDataHolder&) = delete;
public:
SystemDependentDataHolder();
virtual ~SystemDependentDataHolder();
void addOrReplaceSystemDependentData(SystemDependentData_SharedPtr& rData);
SystemDependentData_SharedPtr getSystemDependentData(size_t hash_code) const;
};
} // end of namespace basegfx
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -800,6 +800,7 @@ public:
// #i101491#
// Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
bool DrawPolyLineDirect(
const basegfx::B2DHomMatrix& rObjectTransform,
const basegfx::B2DPolygon& rB2DPolygon,
double fLineWidth = 0.0,
double fTransparency = 0.0,
......
......@@ -369,6 +369,7 @@ basegfx/source/tools/gradienttools.cxx
basegfx/source/tools/keystoplerp.cxx
basegfx/source/tools/numbertools.cxx
basegfx/source/tools/stringconversiontools.cxx
basegfx/source/tools/systemdependentdata.cxx
basegfx/source/tools/tools.cxx
basegfx/source/tools/unopolypolygon.cxx
basegfx/source/tools/unotools.cxx
......@@ -5838,6 +5839,7 @@ include/basegfx/utils/gradienttools.hxx
include/basegfx/utils/keystoplerp.hxx
include/basegfx/utils/lerp.hxx
include/basegfx/utils/rectcliptools.hxx
include/basegfx/utils/systemdependentdata.hxx
include/basegfx/utils/tools.hxx
include/basegfx/utils/unopolypolygon.hxx
include/basegfx/utils/zoomtools.hxx
......
This diff is collapsed.
......@@ -99,16 +99,23 @@ public:
static cairo_user_data_key_t* getDamageKey();
static void clipRegion(cairo_t* cr, const vcl::Region& rClipRegion);
static basegfx::B2DRange drawPolyLine(
// need this static version of ::drawPolyLine for usage from
// vcl/unx/generic/gdi/salgdi.cxx. It gets wrapped by
// ::drawPolyLine with some added parameters (see there)
static bool drawPolyLine(
cairo_t* cr,
basegfx::B2DRange* pExtents,
const Color& rLineColor,
bool bAntiAliasB2DDraw,
const basegfx::B2DHomMatrix& rObjectToDevice,
const basegfx::B2DPolygon& rPolyLine,
double fTransparency,
const basegfx::B2DVector& rLineWidths,
basegfx::B2DLineJoin eLineJoin,
css::drawing::LineCap eLineCap,
double fMiterMinimumAngle);
double fMiterMinimumAngle,
bool bPixelSnapHairline);
private:
void invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags);
......@@ -194,12 +201,15 @@ public:
virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
virtual bool drawPolyPolygon( const basegfx::B2DPolyPolygon&, double fTransparency ) override;
virtual bool drawPolyLine( const basegfx::B2DPolygon&,
double fTransparency,
const basegfx::B2DVector& rLineWidths,
basegfx::B2DLineJoin,
css::drawing::LineCap,
double fMiterMinimumAngle) override;
virtual bool drawPolyLine(
const basegfx::B2DHomMatrix& rObjectToDevice,
const basegfx::B2DPolygon&,
double fTransparency,
const basegfx::B2DVector& rLineWidths,
basegfx::B2DLineJoin,
css::drawing::LineCap,
double fMiterMinimumAngle,
bool bPixelSnapHairline) override;
virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
virtual void drawPolyPolygon( sal_uInt32 nPoly,
......
......@@ -252,12 +252,14 @@ public:
virtual bool drawPolyPolygon( const basegfx::B2DPolyPolygon&, double fTransparency ) override;
virtual bool drawPolyLine(
const basegfx::B2DHomMatrix& rObjectToDevice,
const basegfx::B2DPolygon&,
double fTransparency,
const basegfx::B2DVector& rLineWidths,
basegfx::B2DLineJoin,
css::drawing::LineCap,
double fMiterMinimumAngle) override;
double fMiterMinimumAngle,
bool bPixelSnapHairline) override;
virtual bool drawPolyLineBezier(
sal_uInt32 nPoints,
......
......@@ -116,9 +116,11 @@ public:
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
const PolyFlags* const* pFlgAry) override;
virtual bool drawPolyLine(const basegfx::B2DPolygon&, double fTransparency,
virtual bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice,
const basegfx::B2DPolygon&, double fTransparency,
const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin,
css::drawing::LineCap eLineCap, double fMiterMinimumAngle) override;
css::drawing::LineCap eLineCap, double fMiterMinimumAngle,
bool bPixelSnapHairline) override;
virtual bool drawGradient(const tools::PolyPolygon&, const Gradient&) override;
virtual void copyArea(long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
......
......@@ -229,12 +229,14 @@ public:
virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override;
virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry ) override;
virtual bool drawPolyLine(
const basegfx::B2DHomMatrix& rObjectToDevice,
const basegfx::B2DPolygon&,
double fTransparency,
const basegfx::B2DVector& rLineWidths,
basegfx::B2DLineJoin,
css::drawing::LineCap eLineCap,
double fMiterMinimumAngle) override;
double fMiterMinimumAngle,
bool bPixelSnapHairline) override;
virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override { return false; };
// CopyArea --> No RasterOp, but ClipRegion
......
......@@ -54,6 +54,7 @@ namespace basegfx {
class B2DVector;
class B2DPolygon;
class B2DPolyPolygon;
class SystemDependentDataManager;
}
typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode
......@@ -76,6 +77,10 @@ public:
virtual SalGraphicsImpl* GetImpl() const = 0;
// access to single global managing instance of a basegfx::SystemDependentDataManager,
// used to handle graphic data in system-dependent form
static basegfx::SystemDependentDataManager& getSystemDependentDataManager();
/// Check that our mpImpl is OpenGL and return the context, otherwise NULL.
rtl::Reference<OpenGLContext> GetOpenGLContext() const;
......@@ -242,12 +247,14 @@ public:
const OutputDevice *i_pOutDev);
bool DrawPolyLine(
const basegfx::B2DHomMatrix& rObjectToDevice,
const basegfx::B2DPolygon& i_rPolygon,
double i_fTransparency,
const basegfx::B2DVector& i_rLineWidth,
basegfx::B2DLineJoin i_eLineJoin,
css::drawing::LineCap i_eLineCap,
double i_fMiterMinimumAngle,
bool bPixelSnapHairline,
const OutputDevice* i_pOutDev);