39 : mpOutputDevice(nullptr)
49 auto it = std::find(pLst->begin(), pLst->end(),
this);
50 if (it != pLst->end())
76 std::vector< VCLXGraphics* > *pLst =
mpOutputDevice->GetUnoGraphicsList();
79 pLst->push_back(
this );
140 awt::SimpleFontMetric aM;
241 const awt::Rectangle& aRect )
252void VCLXGraphics::copy(
const uno::Reference< awt::XDevice >& rxSource, sal_Int32 nSourceX, sal_Int32 nSourceY, sal_Int32 nSourceWidth, sal_Int32 nSourceHeight, sal_Int32 nDestX, sal_Int32 nDestY, sal_Int32 nDestWidth, sal_Int32 nDestHeight )
259 DBG_ASSERT( pFromDev,
"VCLXGraphics::copy - invalid device" );
269void VCLXGraphics::draw(
const uno::Reference< awt::XDisplayBitmap >& rxBitmapHandle, sal_Int32 nSourceX, sal_Int32 nSourceY, sal_Int32 nSourceWidth, sal_Int32 nSourceHeight, sal_Int32 nDestX, sal_Int32 nDestY, sal_Int32 nDestWidth, sal_Int32 nDestHeight )
277 uno::Reference< awt::XBitmap > xBitmap( rxBitmapHandle, uno::UNO_QUERY );
280 Point aPos(nDestX - nSourceX, nDestY - nSourceY);
283 if(nDestWidth != nSourceWidth)
285 float zoomX =
static_cast<float>(nDestWidth) /
static_cast<float>(nSourceWidth);
289 if(nDestHeight != nSourceHeight)
291 float zoomY =
static_cast<float>(nDestHeight) /
static_cast<float>(nSourceHeight);
295 if(nSourceX || nSourceY || aSz.
Width() != nSourceWidth || aSz.
Height() != nSourceHeight)
374 sal_uInt16 nPolys =
static_cast<sal_uInt16
>(DataX.getLength());
376 for ( sal_uInt16
n = 0;
n < nPolys;
n++ )
394void VCLXGraphics::drawArc( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
405void VCLXGraphics::drawPie( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
416void VCLXGraphics::drawChord( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
438 aGradient.
SetOfsX(rGradient.XOffset);
439 aGradient.
SetOfsY(rGradient.YOffset);
442 aGradient.
SetSteps(rGradient.StepCount);
465 aDXA.
reserve(rText.getLength());
466 for(
int i = 0;
i < rText.getLength(); ++
i)
473void VCLXGraphics::drawImage( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int16 nStyle,
const uno::Reference< graphic::XGraphic >& xGraphic )
479 Image aImage( xGraphic );
const Size & GetSizePixel() const
void SetOfsX(sal_uInt16 nOfsX)
void SetStartIntensity(sal_uInt16 nIntens)
void SetBorder(sal_uInt16 nBorder)
void SetSteps(sal_uInt16 nSteps)
void SetOfsY(sal_uInt16 nOfsY)
void SetAngle(Degree10 nAngle)
void SetEndIntensity(sal_uInt16 nIntens)
void reserve(size_t nCapacity)
void push_back(sal_Int32 nUnit)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static css::awt::SimpleFontMetric CreateFontMetric(const FontMetric &rFontMetric)
static vcl::Region GetRegion(const css::uno::Reference< css::awt::XRegion > &rxRegion)
static BitmapEx GetBitmap(const css::uno::Reference< css::awt::XBitmap > &rxBitmap)
static tools::Polygon CreatePolygon(const css::uno::Sequence< sal_Int32 > &DataX, const css::uno::Sequence< sal_Int32 > &DataY)
::tools::Rectangle ConvertToVCLRect(css::awt::Rectangle const &_rRect)
static vcl::Font CreateFont(const css::awt::FontDescriptor &rDescr, const vcl::Font &rInitFont)
A UNO wrapper for the VCL OutputDevice.
const VclPtr< OutputDevice > & GetOutputDevice() const
virtual void SAL_CALL drawGradient(::sal_Int32 nX, ::sal_Int32 nY, ::sal_Int32 nWidth, ::sal_Int32 Height, const css::awt::Gradient &aGradient) override
virtual void SAL_CALL setTextColor(::sal_Int32 _textcolor) override
virtual void SAL_CALL selectFont(const css::awt::FontDescriptor &aDescription) override
virtual void SAL_CALL setRasterOp(css::awt::RasterOperation _rasterop) override
virtual void SAL_CALL drawText(::sal_Int32 X, ::sal_Int32 Y, const OUString &Text) override
virtual void SAL_CALL drawArc(::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int32 X1, ::sal_Int32 Y1, ::sal_Int32 X2, ::sal_Int32 Y2) override
virtual void SAL_CALL drawChord(::sal_Int32 nX, ::sal_Int32 nY, ::sal_Int32 nWidth, ::sal_Int32 nHeight, ::sal_Int32 nX1, ::sal_Int32 nY1, ::sal_Int32 nX2, ::sal_Int32 nY2) override
virtual void SAL_CALL setTextFillColor(::sal_Int32 _textfillcolor) override
virtual void SAL_CALL drawEllipse(::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height) override
std::unique_ptr< vcl::Region > mpClipRegion
virtual ~VCLXGraphics() override
virtual void SAL_CALL drawPixel(::sal_Int32 X, ::sal_Int32 Y) override
virtual void SAL_CALL drawPolyLine(const css::uno::Sequence< ::sal_Int32 > &DataX, const css::uno::Sequence< ::sal_Int32 > &DataY) override
virtual void SAL_CALL draw(const css::uno::Reference< css::awt::XDisplayBitmap > &xBitmapHandle, ::sal_Int32 SourceX, ::sal_Int32 SourceY, ::sal_Int32 SourceWidth, ::sal_Int32 SourceHeight, ::sal_Int32 DestX, ::sal_Int32 DestY, ::sal_Int32 DestWidth, ::sal_Int32 DestHeight) override
virtual css::awt::SimpleFontMetric SAL_CALL getFontMetric() override
virtual void SAL_CALL drawPolyPolygon(const css::uno::Sequence< css::uno::Sequence< ::sal_Int32 > > &DataX, const css::uno::Sequence< css::uno::Sequence< ::sal_Int32 > > &DataY) override
virtual void SAL_CALL setFont(const css::uno::Reference< css::awt::XFont > &_font) override
virtual css::uno::Reference< css::awt::XDevice > SAL_CALL getDevice() override
virtual void SAL_CALL setFillColor(::sal_Int32 _fillcolor) override
void SetOutputDevice(OutputDevice *pOutDev)
void Init(OutputDevice *pOutDev)
VclPtr< OutputDevice > mpOutputDevice
virtual void SAL_CALL drawTextArray(::sal_Int32 X, ::sal_Int32 Y, const OUString &Text, const css::uno::Sequence< ::sal_Int32 > &Longs) override
virtual void SAL_CALL drawRoundedRect(::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int32 nHorzRound, ::sal_Int32 nVertRound) override
virtual void SAL_CALL setClipRegion(const css::uno::Reference< css::awt::XRegion > &Clipping) override
void InitOutputDevice(InitOutDevFlags nFlags)
virtual void SAL_CALL drawPie(::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int32 X1, ::sal_Int32 Y1, ::sal_Int32 X2, ::sal_Int32 Y2) override
virtual void SAL_CALL intersectClipRegion(const css::uno::Reference< css::awt::XRegion > &xClipping) override
virtual void SAL_CALL drawRect(::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height) override
virtual void SAL_CALL push() override
virtual void SAL_CALL drawImage(::sal_Int32 nX, ::sal_Int32 nY, ::sal_Int32 nWidth, ::sal_Int32 nHeight, ::sal_Int16 nStyle, const css::uno::Reference< css::graphic::XGraphic > &aGraphic) override
virtual void SAL_CALL setLineColor(::sal_Int32 _linecolor) override
virtual void SAL_CALL drawLine(::sal_Int32 X1, ::sal_Int32 Y1, ::sal_Int32 X2, ::sal_Int32 Y2) override
virtual void SAL_CALL clear(const css::awt::Rectangle &aRect) override
virtual void SAL_CALL pop() override
virtual void SAL_CALL copy(const css::uno::Reference< css::awt::XDevice > &xSource, ::sal_Int32 nSourceX, ::sal_Int32 nSourceY, ::sal_Int32 nSourceWidth, ::sal_Int32 nSourceHeight, ::sal_Int32 nDestX, ::sal_Int32 nDestY, ::sal_Int32 nDestWidth, ::sal_Int32 nDestHeight) override
virtual void SAL_CALL drawPolygon(const css::uno::Sequence< ::sal_Int32 > &DataX, const css::uno::Sequence< ::sal_Int32 > &DataY) override
css::uno::Reference< css::awt::XDevice > mxDevice
void reset(reference_type *pBody)
#define DBG_ASSERT(sCon, aError)