update dev300-m58
[ooovba.git] / canvas / source / tools / bitmap.cxx
blob1ca3b720248142477ddb4e0905b5023101fa16f5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: bitmap.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_canvas.hxx"
34 #include <canvas/debug.hxx>
35 #include <tools/diagnose_ex.h>
36 #include <canvas/rendering/bitmap.hxx>
37 #include <canvas/rendering/isurfaceproxy.hxx>
38 #include <basegfx/vector/b2isize.hxx>
39 #include "image.hxx"
40 #include <algorithm>
41 #include <iterator>
44 using namespace ::com::sun::star;
46 namespace canvas
48 class ImplBitmap
50 public:
51 ImplBitmap( const ::basegfx::B2IVector& rSize,
52 const ISurfaceProxyManagerSharedPtr& rMgr,
53 bool bWithAlpha ) :
54 mpImage(),
55 mpSurfaceProxy(),
56 mbIsSurfaceDirty( true )
58 ENSURE_OR_THROW( rMgr,
59 "Bitmap::Bitmap(): Invalid surface proxy manager" );
61 Image::Description desc;
63 desc.eFormat = bWithAlpha ? Image::FMT_A8R8G8B8 : Image::FMT_R8G8B8;
64 desc.nWidth = rSize.getX();
65 desc.nHeight = rSize.getY();
66 desc.nStride = 0;
67 desc.pBuffer = NULL;
69 mpImage.reset( new Image(desc) );
71 // clear the surface [fill with opaque black]
72 mpImage->clear(0,255,255,255);
74 // create a (possibly hardware accelerated) mirror surface.
75 mpSurfaceProxy = rMgr->createSurfaceProxy( mpImage );
78 bool hasAlpha() const
80 if( !mpImage )
81 return false;
83 return (mpImage->getDescription().eFormat == Image::FMT_A8R8G8B8);
86 ::basegfx::B2IVector getSize() const
88 return ::basegfx::B2IVector( mpImage->getWidth(),
89 mpImage->getHeight() );
92 ::com::sun::star::uno::Sequence< sal_Int8 > getData( ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
93 const ::com::sun::star::geometry::IntegerRectangle2D& rect )
95 const IColorBuffer::Format format = mpImage->getFormat();
96 const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
97 const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
99 if(!(dwNumBytesPerPixel))
100 return uno::Sequence< sal_Int8 >();
102 const sal_uInt32 dwWidth = rect.X2-rect.X1;
103 const sal_uInt32 dwHeight = rect.Y2-rect.Y1;
105 uno::Sequence< sal_Int8 > aRes(dwWidth*dwHeight*4);
106 sal_uInt8 *pDst = reinterpret_cast<sal_uInt8 *>(aRes.getArray());
108 const sal_uInt8 *pSrc = mpImage->lock()+(rect.Y1*dwPitch)+(rect.X1*dwNumBytesPerPixel);
109 const sal_uInt32 dwSpanSizeInBytes = dwNumBytesPerPixel*dwWidth;
110 for(sal_uInt32 y=0; y<dwHeight; ++y)
112 rtl_copyMemory(pDst,pSrc,dwSpanSizeInBytes);
113 pDst += dwSpanSizeInBytes;
114 pSrc += dwPitch;
116 mpImage->unlock();
118 return aRes;
121 void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
122 const ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
123 const ::com::sun::star::geometry::IntegerRectangle2D& rect )
125 const IColorBuffer::Format format = mpImage->getFormat();
126 const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
127 const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
129 if(!(dwNumBytesPerPixel))
130 return;
132 const sal_uInt32 dwWidth = rect.X2-rect.X1;
133 const sal_uInt32 dwHeight = rect.Y2-rect.Y1;
134 const sal_uInt8 *pSrc = reinterpret_cast<const sal_uInt8 *>(data.getConstArray());
136 sal_uInt8 *pDst = mpImage->lock()+(rect.Y1*dwPitch)+(rect.X1*dwNumBytesPerPixel);
137 const sal_uInt32 dwSpanSizeInBytes = dwNumBytesPerPixel*dwWidth;
138 for(sal_uInt32 y=0; y<dwHeight; ++y)
140 rtl_copyMemory(pDst,pSrc,dwSpanSizeInBytes);
141 pSrc += dwSpanSizeInBytes;
142 pDst += dwPitch;
144 mpImage->unlock();
147 void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
148 const ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
149 const ::com::sun::star::geometry::IntegerPoint2D& pos )
151 struct ARGBColor
153 sal_uInt8 a;
154 sal_uInt8 r;
155 sal_uInt8 g;
156 sal_uInt8 b;
159 union ARGB
161 ARGBColor Color;
162 sal_uInt32 color;
164 inline ARGB( sal_uInt32 _color ) : color(_color) {}
167 ARGB argb(0xFFFFFFFF);
169 if(color.getLength() > 2)
171 argb.Color.r = static_cast<sal_uInt8>(color[0]);
172 argb.Color.g = static_cast<sal_uInt8>(color[1]);
173 argb.Color.b = static_cast<sal_uInt8>(color[2]);
174 if(color.getLength() > 3)
175 argb.Color.a = static_cast<sal_uInt8>(255.0f*color[3]);
178 const IColorBuffer::Format format = mpImage->getFormat();
179 const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
180 const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
182 if(!(dwNumBytesPerPixel))
183 return;
185 sal_uInt8 *pDst = mpImage->lock()+(pos.Y*dwPitch)+(pos.X*dwNumBytesPerPixel);
187 switch(format)
189 case IColorBuffer::FMT_R8G8B8:
190 pDst[0] = argb.Color.r;
191 pDst[1] = argb.Color.g;
192 pDst[2] = argb.Color.b;
193 break;
194 case IColorBuffer::FMT_A8R8G8B8:
195 case IColorBuffer::FMT_X8R8G8B8:
196 pDst[0] = argb.Color.a;
197 pDst[1] = argb.Color.r;
198 pDst[2] = argb.Color.g;
199 pDst[3] = argb.Color.b;
200 break;
201 default:
202 break;
205 mpImage->unlock();
208 uno::Sequence< sal_Int8 > getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
209 const ::com::sun::star::geometry::IntegerPoint2D& pos )
211 const IColorBuffer::Format format = mpImage->getFormat();
212 const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
213 const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
215 if(!(dwNumBytesPerPixel))
216 return uno::Sequence< sal_Int8 >();
218 uno::Sequence< sal_Int8 > aRet(dwNumBytesPerPixel);
219 const sal_uInt8 *pSrc = mpImage->lock()+(pos.Y*dwPitch)+(pos.X*dwNumBytesPerPixel);
221 switch(format)
223 case IColorBuffer::FMT_R8G8B8:
224 aRet[0] = pSrc[0];
225 aRet[1] = pSrc[1];
226 aRet[2] = pSrc[2];
227 break;
228 case IColorBuffer::FMT_A8R8G8B8:
229 case IColorBuffer::FMT_X8R8G8B8:
230 aRet[0] = pSrc[1];
231 aRet[1] = pSrc[2];
232 aRet[2] = pSrc[3];
233 aRet[3] = pSrc[0];
234 break;
235 default:
236 break;
239 mpImage->unlock();
241 return aRet;
244 // the IColorBuffer interface
245 // ==========================
247 bool draw( double fAlpha,
248 const ::basegfx::B2DPoint& rPos,
249 const ::basegfx::B2DHomMatrix& rTransform )
251 if( mbIsSurfaceDirty )
253 mpSurfaceProxy->setColorBufferDirty();
254 mbIsSurfaceDirty = false;
257 return mpSurfaceProxy->draw( fAlpha, rPos, rTransform );
260 bool draw( double fAlpha,
261 const ::basegfx::B2DPoint& rPos,
262 const ::basegfx::B2DRange& rArea,
263 const ::basegfx::B2DHomMatrix& rTransform )
265 if( mbIsSurfaceDirty )
267 mpSurfaceProxy->setColorBufferDirty();
268 mbIsSurfaceDirty = false;
271 return mpSurfaceProxy->draw( fAlpha, rPos, rArea, rTransform );
275 bool draw( double fAlpha,
276 const ::basegfx::B2DPoint& rPos,
277 const ::basegfx::B2DPolyPolygon& rClipPoly,
278 const ::basegfx::B2DHomMatrix& rTransform )
280 if( mbIsSurfaceDirty )
282 mpSurfaceProxy->setColorBufferDirty();
283 mbIsSurfaceDirty = false;
286 return mpSurfaceProxy->draw( fAlpha, rPos, rClipPoly, rTransform );
289 void clear( const uno::Sequence< double >& color )
291 if(color.getLength() > 2)
293 mbIsSurfaceDirty = true;
295 if(color.getLength() > 3)
297 mpImage->clear( static_cast<sal_uInt8>(255.0f*color[0]),
298 static_cast<sal_uInt8>(255.0f*color[1]),
299 static_cast<sal_uInt8>(255.0f*color[2]),
300 static_cast<sal_uInt8>(255.0f*color[3]) );
302 else
304 mpImage->clear( static_cast<sal_uInt8>(255.0f*color[0]),
305 static_cast<sal_uInt8>(255.0f*color[1]),
306 static_cast<sal_uInt8>(255.0f*color[2]),
307 255 );
312 void fillB2DPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPolygon,
313 const rendering::ViewState& viewState,
314 const rendering::RenderState& renderState )
316 mbIsSurfaceDirty = true;
318 mpImage->fillB2DPolyPolygon( rPolyPolygon,
319 viewState,
320 renderState );
324 // the XCanvas-render interface
325 // ============================
327 void drawPoint( const geometry::RealPoint2D& aPoint,
328 const rendering::ViewState& viewState,
329 const rendering::RenderState& renderState )
331 mbIsSurfaceDirty = true;
333 mpImage->drawPoint( aPoint, viewState, renderState );
336 void drawLine( const geometry::RealPoint2D& aStartPoint,
337 const geometry::RealPoint2D& aEndPoint,
338 const rendering::ViewState& viewState,
339 const rendering::RenderState& renderState )
341 mbIsSurfaceDirty = true;
343 mpImage->drawLine( aStartPoint, aEndPoint, viewState, renderState );
346 void drawBezier( const geometry::RealBezierSegment2D& aBezierSegment,
347 const geometry::RealPoint2D& aEndPoint,
348 const rendering::ViewState& viewState,
349 const rendering::RenderState& renderState )
351 mbIsSurfaceDirty = true;
353 mpImage->drawBezier( aBezierSegment, aEndPoint, viewState, renderState );
356 ICachedPrimitiveSharedPtr drawPolyPolygon(
357 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
358 const rendering::ViewState& viewState,
359 const rendering::RenderState& renderState )
361 mbIsSurfaceDirty = true;
363 return setupCachedPrimitive(
364 mpImage->drawPolyPolygon( xPolyPolygon, viewState, renderState ) );
367 ICachedPrimitiveSharedPtr strokePolyPolygon(
368 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
369 const rendering::ViewState& viewState,
370 const rendering::RenderState& renderState,
371 const rendering::StrokeAttributes& strokeAttributes )
373 mbIsSurfaceDirty = true;
375 return setupCachedPrimitive(
376 mpImage->strokePolyPolygon( xPolyPolygon,
377 viewState,
378 renderState,
379 strokeAttributes ) );
382 ICachedPrimitiveSharedPtr strokeTexturedPolyPolygon(
383 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
384 const rendering::ViewState& viewState,
385 const rendering::RenderState& renderState,
386 const uno::Sequence< rendering::Texture >& textures,
387 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
388 const rendering::StrokeAttributes& strokeAttributes )
390 mbIsSurfaceDirty = true;
392 ::std::vector< ImageSharedPtr > aTextureAnnotations;
393 convertTextureAnnotations( aTextureAnnotations,
394 textureAnnotations );
396 return setupCachedPrimitive(
397 mpImage->strokeTexturedPolyPolygon( xPolyPolygon,
398 viewState,
399 renderState,
400 textures,
401 aTextureAnnotations,
402 strokeAttributes ) );
405 ICachedPrimitiveSharedPtr strokeTextureMappedPolyPolygon(
406 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
407 const rendering::ViewState& viewState,
408 const rendering::RenderState& renderState,
409 const uno::Sequence< rendering::Texture >& textures,
410 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
411 const uno::Reference< geometry::XMapping2D >& xMapping,
412 const rendering::StrokeAttributes& strokeAttributes )
414 mbIsSurfaceDirty = true;
416 ::std::vector< ImageSharedPtr > aTextureAnnotations;
417 convertTextureAnnotations( aTextureAnnotations,
418 textureAnnotations );
420 return setupCachedPrimitive(
421 mpImage->strokeTextureMappedPolyPolygon( xPolyPolygon,
422 viewState,
423 renderState,
424 textures,
425 aTextureAnnotations,
426 xMapping,
427 strokeAttributes ) );
431 ICachedPrimitiveSharedPtr fillPolyPolygon(
432 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
433 const rendering::ViewState& viewState,
434 const rendering::RenderState& renderState )
436 mbIsSurfaceDirty = true;
438 return setupCachedPrimitive(
439 mpImage->fillPolyPolygon( xPolyPolygon,
440 viewState,
441 renderState ) );
444 ICachedPrimitiveSharedPtr fillTexturedPolyPolygon(
445 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
446 const rendering::ViewState& viewState,
447 const rendering::RenderState& renderState,
448 const uno::Sequence< rendering::Texture >& textures,
449 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations )
451 mbIsSurfaceDirty = true;
453 ::std::vector< ImageSharedPtr > aTextureAnnotations;
454 convertTextureAnnotations( aTextureAnnotations,
455 textureAnnotations );
457 return setupCachedPrimitive(
458 mpImage->fillTexturedPolyPolygon( xPolyPolygon,
459 viewState,
460 renderState,
461 textures,
462 aTextureAnnotations ) );
466 ICachedPrimitiveSharedPtr fillTextureMappedPolyPolygon(
467 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
468 const rendering::ViewState& viewState,
469 const rendering::RenderState& renderState,
470 const uno::Sequence< rendering::Texture >& textures,
471 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
472 const uno::Reference< geometry::XMapping2D >& xMapping )
474 mbIsSurfaceDirty = true;
476 ::std::vector< ImageSharedPtr > aTextureAnnotations;
477 convertTextureAnnotations( aTextureAnnotations,
478 textureAnnotations );
480 return setupCachedPrimitive(
481 mpImage->fillTextureMappedPolyPolygon( xPolyPolygon,
482 viewState,
483 renderState,
484 textures,
485 aTextureAnnotations,
486 xMapping ) );
489 ICachedPrimitiveSharedPtr drawBitmap(
490 const uno::Reference< rendering::XBitmap >& xBitmap,
491 const rendering::ViewState& viewState,
492 const rendering::RenderState& renderState )
494 mbIsSurfaceDirty = true;
496 return setupCachedPrimitive(
497 mpImage->drawBitmap( xBitmap,
498 viewState,
499 renderState ) );
502 ICachedPrimitiveSharedPtr drawBitmap(
503 const ::boost::shared_ptr<Bitmap>& rImage,
504 const rendering::ViewState& viewState,
505 const rendering::RenderState& renderState )
507 mbIsSurfaceDirty = true;
509 return setupCachedPrimitive(
510 mpImage->drawBitmap( rImage->mpImpl->mpImage,
511 viewState,
512 renderState ) );
515 ICachedPrimitiveSharedPtr drawBitmapModulated(
516 const uno::Reference< rendering::XBitmap >& xBitmap,
517 const rendering::ViewState& viewState,
518 const rendering::RenderState& renderState )
520 mbIsSurfaceDirty = true;
522 return setupCachedPrimitive(
523 mpImage->drawBitmapModulated( xBitmap,
524 viewState,
525 renderState ) );
529 ICachedPrimitiveSharedPtr drawBitmapModulated(
530 const ::boost::shared_ptr<Bitmap>& rImage,
531 const rendering::ViewState& viewState,
532 const rendering::RenderState& renderState )
534 mbIsSurfaceDirty = true;
536 return setupCachedPrimitive(
537 mpImage->drawBitmapModulated( rImage->mpImpl->mpImage,
538 viewState,
539 renderState ) );
542 private:
543 ICachedPrimitiveSharedPtr setupCachedPrimitive(
544 const ImageCachedPrimitiveSharedPtr& rCachedPrimitive ) const
546 if( rCachedPrimitive )
547 rCachedPrimitive->setImage( mpImage );
549 return rCachedPrimitive;
552 void convertTextureAnnotations( ::std::vector< ImageSharedPtr >& o_rTextureAnnotations,
553 const ::std::vector< BitmapSharedPtr >& textureAnnotations )
555 ::std::vector< BitmapSharedPtr >::const_iterator aCurr( textureAnnotations.begin() );
556 const ::std::vector< BitmapSharedPtr >::const_iterator aEnd( textureAnnotations.end() );
557 while( aCurr != aEnd )
559 if( aCurr->get() != NULL )
560 o_rTextureAnnotations.push_back( (*aCurr)->mpImpl->mpImage );
561 else
562 o_rTextureAnnotations.push_back( ImageSharedPtr() );
564 ++aCurr;
568 sal_uInt32 getNumBytes( IColorBuffer::Format format )
570 switch(format)
572 case IColorBuffer::FMT_R8G8B8:
573 return 3;
574 case IColorBuffer::FMT_A8R8G8B8:
575 case IColorBuffer::FMT_X8R8G8B8:
576 return 4;
577 default:
578 return 0;
582 ImageSharedPtr mpImage;
583 ISurfaceProxySharedPtr mpSurfaceProxy;
584 bool mbIsSurfaceDirty;
588 /////////////////////////////////////////////////////////////////
589 // Actual Bitmap pimpl forwarding functions
590 /////////////////////////////////////////////////////////////////
592 Bitmap::Bitmap( const ::basegfx::B2IVector& rSize,
593 const ISurfaceProxyManagerSharedPtr& rMgr,
594 bool bWithAlpha ) :
595 mpImpl( new ImplBitmap( rSize,
596 rMgr,
597 bWithAlpha ) )
601 Bitmap::~Bitmap()
603 // outline destructor is _necessary_, because ImplBitmap is an
604 // incomplete type outside this file.
607 // forward all methods to ImplBitmap
608 // ==================================================
610 bool Bitmap::hasAlpha() const
612 return mpImpl->hasAlpha();
615 ::basegfx::B2IVector Bitmap::getSize() const
617 return mpImpl->getSize();
620 ::com::sun::star::uno::Sequence< sal_Int8 > Bitmap::getData(
621 ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
622 const ::com::sun::star::geometry::IntegerRectangle2D& rect )
624 return mpImpl->getData(bitmapLayout,rect);
627 void Bitmap::setData(
628 const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
629 const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
630 const ::com::sun::star::geometry::IntegerRectangle2D& rect )
632 mpImpl->setData(data,bitmapLayout,rect);
635 void Bitmap::setPixel(
636 const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
637 const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
638 const ::com::sun::star::geometry::IntegerPoint2D& pos )
640 mpImpl->setPixel(color,bitmapLayout,pos);
643 uno::Sequence< sal_Int8 > Bitmap::getPixel(
644 ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
645 const ::com::sun::star::geometry::IntegerPoint2D& pos )
647 return mpImpl->getPixel(bitmapLayout,pos);
650 bool Bitmap::draw( double fAlpha,
651 const ::basegfx::B2DPoint& rPos,
652 const ::basegfx::B2DHomMatrix& rTransform )
654 return mpImpl->draw( fAlpha, rPos, rTransform );
657 bool Bitmap::draw( double fAlpha,
658 const ::basegfx::B2DPoint& rPos,
659 const ::basegfx::B2DRange& rArea,
660 const ::basegfx::B2DHomMatrix& rTransform )
662 return mpImpl->draw( fAlpha, rPos, rArea, rTransform );
666 bool Bitmap::draw( double fAlpha,
667 const ::basegfx::B2DPoint& rPos,
668 const ::basegfx::B2DPolyPolygon& rClipPoly,
669 const ::basegfx::B2DHomMatrix& rTransform )
671 return mpImpl->draw( fAlpha, rPos, rClipPoly, rTransform );
674 void Bitmap::clear( const uno::Sequence< double >& color )
676 mpImpl->clear( color );
679 void Bitmap::fillB2DPolyPolygon(
680 const ::basegfx::B2DPolyPolygon& rPolyPolygon,
681 const rendering::ViewState& viewState,
682 const rendering::RenderState& renderState )
684 mpImpl->fillB2DPolyPolygon( rPolyPolygon, viewState, renderState );
687 void Bitmap::drawPoint( const geometry::RealPoint2D& aPoint,
688 const rendering::ViewState& viewState,
689 const rendering::RenderState& renderState )
691 return mpImpl->drawPoint( aPoint, viewState, renderState );
694 void Bitmap::drawLine( const geometry::RealPoint2D& aStartPoint,
695 const geometry::RealPoint2D& aEndPoint,
696 const rendering::ViewState& viewState,
697 const rendering::RenderState& renderState )
699 return mpImpl->drawLine( aStartPoint, aEndPoint, viewState, renderState );
702 void Bitmap::drawBezier( const geometry::RealBezierSegment2D& aBezierSegment,
703 const geometry::RealPoint2D& aEndPoint,
704 const rendering::ViewState& viewState,
705 const rendering::RenderState& renderState )
707 return mpImpl->drawBezier( aBezierSegment, aEndPoint, viewState, renderState );
710 ICachedPrimitiveSharedPtr Bitmap::drawPolyPolygon(
711 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
712 const rendering::ViewState& viewState,
713 const rendering::RenderState& renderState )
715 return mpImpl->drawPolyPolygon( xPolyPolygon, viewState, renderState );
718 ICachedPrimitiveSharedPtr Bitmap::strokePolyPolygon(
719 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
720 const rendering::ViewState& viewState,
721 const rendering::RenderState& renderState,
722 const rendering::StrokeAttributes& strokeAttributes )
724 return mpImpl->strokePolyPolygon( xPolyPolygon, viewState, renderState, strokeAttributes );
727 ICachedPrimitiveSharedPtr Bitmap::strokeTexturedPolyPolygon(
728 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
729 const rendering::ViewState& viewState,
730 const rendering::RenderState& renderState,
731 const uno::Sequence< rendering::Texture >& textures,
732 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
733 const rendering::StrokeAttributes& strokeAttributes )
735 return mpImpl->strokeTexturedPolyPolygon( xPolyPolygon,
736 viewState,
737 renderState,
738 textures,
739 textureAnnotations,
740 strokeAttributes );
743 ICachedPrimitiveSharedPtr Bitmap::strokeTextureMappedPolyPolygon(
744 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
745 const rendering::ViewState& viewState,
746 const rendering::RenderState& renderState,
747 const uno::Sequence< rendering::Texture >& textures,
748 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
749 const uno::Reference< geometry::XMapping2D >& xMapping,
750 const rendering::StrokeAttributes& strokeAttributes )
752 return mpImpl->strokeTextureMappedPolyPolygon( xPolyPolygon,
753 viewState,
754 renderState,
755 textures,
756 textureAnnotations,
757 xMapping,
758 strokeAttributes );
762 ICachedPrimitiveSharedPtr Bitmap::fillPolyPolygon(
763 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
764 const rendering::ViewState& viewState,
765 const rendering::RenderState& renderState )
767 return mpImpl->fillPolyPolygon( xPolyPolygon,
768 viewState,
769 renderState );
772 ICachedPrimitiveSharedPtr Bitmap::fillTexturedPolyPolygon(
773 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
774 const rendering::ViewState& viewState,
775 const rendering::RenderState& renderState,
776 const uno::Sequence< rendering::Texture >& textures,
777 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations )
779 return mpImpl->fillTexturedPolyPolygon( xPolyPolygon,
780 viewState,
781 renderState,
782 textures,
783 textureAnnotations );
786 ICachedPrimitiveSharedPtr Bitmap::fillTextureMappedPolyPolygon(
787 const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
788 const rendering::ViewState& viewState,
789 const rendering::RenderState& renderState,
790 const uno::Sequence< rendering::Texture >& textures,
791 const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
792 const uno::Reference< geometry::XMapping2D >& xMapping )
794 return mpImpl->fillTextureMappedPolyPolygon( xPolyPolygon,
795 viewState,
796 renderState,
797 textures,
798 textureAnnotations,
799 xMapping );
802 ICachedPrimitiveSharedPtr Bitmap::drawBitmap(
803 const uno::Reference< rendering::XBitmap >& xBitmap,
804 const rendering::ViewState& viewState,
805 const rendering::RenderState& renderState )
807 return mpImpl->drawBitmap( xBitmap,
808 viewState,
809 renderState );
812 ICachedPrimitiveSharedPtr Bitmap::drawBitmap(
813 const ::boost::shared_ptr<Bitmap>& rImage,
814 const rendering::ViewState& viewState,
815 const rendering::RenderState& renderState )
817 return mpImpl->drawBitmap( rImage,
818 viewState,
819 renderState );
822 ICachedPrimitiveSharedPtr Bitmap::drawBitmapModulated(
823 const uno::Reference< rendering::XBitmap >& xBitmap,
824 const rendering::ViewState& viewState,
825 const rendering::RenderState& renderState )
827 return mpImpl->drawBitmapModulated( xBitmap,
828 viewState,
829 renderState );
832 ICachedPrimitiveSharedPtr Bitmap::drawBitmapModulated(
833 const ::boost::shared_ptr<Bitmap>& rImage,
834 const rendering::ViewState& viewState,
835 const rendering::RenderState& renderState )
837 return mpImpl->drawBitmapModulated( rImage,
838 viewState,
839 renderState );