35 mpBuffer(
std::move( xBuffer ))
37 const ::basegfx::B2ISize aImageSize(
mpBuffer->getWidth(),
mpBuffer->getHeight());
38 const ::basegfx::B2ISize aPageSize(
mpPageManager->getPageSize());
39 const sal_Int32 aPageSizeX(aPageSize.getWidth());
40 const sal_Int32 aPageSizeY(aPageSize.getHeight());
41 const sal_Int32 aImageSizeX(aImageSize.getWidth());
42 const sal_Int32 aImageSizeY(aImageSize.getHeight());
54 size_t dwNumSurfaces(0);
55 for(sal_Int32
y=0;
y<aImageSizeY;
y+=aPageSizeY)
56 for(sal_Int32
x=0;
x<aImageSizeX;
x+=aPageSizeX)
60 for(sal_Int32
y=0;
y<aImageSizeY;
y+=aPageSizeY)
62 for(sal_Int32
x=0;
x<aImageSizeX;
x+=aPageSizeX)
68 aPageSize.getWidth() ),
69 std::min( aImageSize.getHeight()-
y,
70 aPageSize.getHeight() ) );
73 std::make_shared<Surface>(
85 rSurfacePtr->setColorBufferDirty();
89 const ::basegfx::B2DPoint& rPos,
90 const ::basegfx::B2DHomMatrix& rTransform )
93 rSurfacePtr->draw( fAlpha, rPos, rTransform );
99 const ::basegfx::B2DPoint& rPos,
100 const ::basegfx::B2DRange& rArea,
101 const ::basegfx::B2DHomMatrix& rTransform )
104 rSurfacePtr->drawRectangularArea( fAlpha, rPos, rArea, rTransform );
110 const ::basegfx::B2DPoint& rPos,
111 const ::basegfx::B2DPolyPolygon& rClipPoly,
112 const ::basegfx::B2DHomMatrix& rTransform )
114 const ::basegfx::triangulator::B2DTriangleVector& rTriangulatedVector(
115 ::basegfx::triangulator::triangulate(rClipPoly));
121 aTriangulatedPolygon.
reserve(rTriangulatedVector.size() * 3);
123 for(
const auto& rCandidate : rTriangulatedVector)
125 aTriangulatedPolygon.
append(rCandidate.getA());
126 aTriangulatedPolygon.
append(rCandidate.getB());
127 aTriangulatedPolygon.
append(rCandidate.getC());
135 rSurfacePtr->drawWithClip( fAlpha, rPos, aTriangulatedPolygon, rTransform );
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void reserve(sal_uInt32 nCount)
SurfaceProxy(std::shared_ptr< canvas::IColorBuffer > xBuffer, PageManagerSharedPtr xPageManager)
virtual void setColorBufferDirty() override
Notify the proxy that the color buffer has changed.
std::shared_ptr< canvas::IColorBuffer > mpBuffer
virtual bool draw(double fAlpha, const ::basegfx::B2DPoint &rPos, const ::basegfx::B2DHomMatrix &rTransform) override
Render the surface content to screen.
PageManagerSharedPtr mpPageManager
std::vector< SurfaceSharedPtr > maSurfaceList
#define SAL_INFO(area, stream)
OUString exportToSvgD(const B2DPolyPolygon &rPolyPoly, bool bUseRelativeCoordinates, bool bDetectQuadraticBeziers, bool bHandleRelativeNextPointCompatible, bool bOOXMLMotionPath=false)
std::shared_ptr< PageManager > PageManagerSharedPtr
PageManagerSharedPtr mpPageManager