xref: /AOO41X/main/canvas/source/null/null_canvashelper.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_canvas.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <canvas/debug.hxx>
32*cdf0e10cSrcweir #include <tools/diagnose_ex.h>
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir #include <rtl/logfile.hxx>
35*cdf0e10cSrcweir #include <rtl/math.hxx>
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir #include <com/sun/star/util/Endianness.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/rendering/TexturingMode.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/rendering/CompositeOperation.hpp>
40*cdf0e10cSrcweir #include <com/sun/star/rendering/RepaintResult.hpp>
41*cdf0e10cSrcweir #include <com/sun/star/rendering/PathCapType.hpp>
42*cdf0e10cSrcweir #include <com/sun/star/rendering/PathJoinType.hpp>
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx>
45*cdf0e10cSrcweir #include <basegfx/point/b2dpoint.hxx>
46*cdf0e10cSrcweir #include <basegfx/tools/canvastools.hxx>
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir #include <comphelper/sequence.hxx>
49*cdf0e10cSrcweir #include <canvas/canvastools.hxx>
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir #include "null_spritecanvas.hxx"
52*cdf0e10cSrcweir #include "null_canvasfont.hxx"
53*cdf0e10cSrcweir #include "null_textlayout.hxx"
54*cdf0e10cSrcweir #include "null_canvashelper.hxx"
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir #include <algorithm>
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir using namespace ::com::sun::star;
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir namespace nullcanvas
62*cdf0e10cSrcweir {
63*cdf0e10cSrcweir     CanvasHelper::CanvasHelper() :
64*cdf0e10cSrcweir         mpDevice( NULL ),
65*cdf0e10cSrcweir         maSize(),
66*cdf0e10cSrcweir         mbHaveAlpha()
67*cdf0e10cSrcweir     {
68*cdf0e10cSrcweir     }
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir     void CanvasHelper::disposing()
71*cdf0e10cSrcweir     {
72*cdf0e10cSrcweir         mpDevice = NULL;
73*cdf0e10cSrcweir     }
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir     void CanvasHelper::init( const ::basegfx::B2ISize& rSize,
76*cdf0e10cSrcweir                              SpriteCanvas&             rDevice,
77*cdf0e10cSrcweir                              bool                      bHasAlpha )
78*cdf0e10cSrcweir     {
79*cdf0e10cSrcweir         mpDevice = &rDevice;
80*cdf0e10cSrcweir         maSize = rSize;
81*cdf0e10cSrcweir         mbHaveAlpha = bHasAlpha;
82*cdf0e10cSrcweir     }
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir     void CanvasHelper::clear()
85*cdf0e10cSrcweir     {
86*cdf0e10cSrcweir     }
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir     void CanvasHelper::drawPoint( const rendering::XCanvas* 	/*pCanvas*/,
89*cdf0e10cSrcweir                                   const geometry::RealPoint2D& 	/*aPoint*/,
90*cdf0e10cSrcweir                                   const rendering::ViewState& 	/*viewState*/,
91*cdf0e10cSrcweir                                   const rendering::RenderState&	/*renderState*/ )
92*cdf0e10cSrcweir     {
93*cdf0e10cSrcweir     }
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir     void CanvasHelper::drawLine( const rendering::XCanvas* 	    /*pCanvas*/,
96*cdf0e10cSrcweir                                  const geometry::RealPoint2D& 	/*aPoint1*/,
97*cdf0e10cSrcweir                                  const geometry::RealPoint2D& 	/*aPoint2*/,
98*cdf0e10cSrcweir                                  const rendering::ViewState& 	/*viewState*/,
99*cdf0e10cSrcweir                                  const rendering::RenderState&	/*renderState*/ )
100*cdf0e10cSrcweir     {
101*cdf0e10cSrcweir     }
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir     void CanvasHelper::drawBezier( const rendering::XCanvas* 			/*pCanvas*/,
104*cdf0e10cSrcweir                                    const geometry::RealBezierSegment2D&	/*aBezierSegment*/,
105*cdf0e10cSrcweir                                    const geometry::RealPoint2D& 		/*aEndPoint*/,
106*cdf0e10cSrcweir                                    const rendering::ViewState& 			/*viewState*/,
107*cdf0e10cSrcweir                                    const rendering::RenderState& 		/*renderState*/ )
108*cdf0e10cSrcweir     {
109*cdf0e10cSrcweir     }
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawPolyPolygon( const rendering::XCanvas* 							/*pCanvas*/,
112*cdf0e10cSrcweir                                                                                  const uno::Reference< rendering::XPolyPolygon2D >& /*xPolyPolygon*/,
113*cdf0e10cSrcweir                                                                                  const rendering::ViewState& 						/*viewState*/,
114*cdf0e10cSrcweir                                                                                  const rendering::RenderState& 						/*renderState*/ )
115*cdf0e10cSrcweir     {
116*cdf0e10cSrcweir         // TODO(P1): Provide caching here.
117*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
118*cdf0e10cSrcweir     }
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokePolyPolygon( const rendering::XCanvas* 							/*pCanvas*/,
121*cdf0e10cSrcweir                                                                                    const uno::Reference< rendering::XPolyPolygon2D >& 	/*xPolyPolygon*/,
122*cdf0e10cSrcweir                                                                                    const rendering::ViewState& 							/*viewState*/,
123*cdf0e10cSrcweir                                                                                    const rendering::RenderState& 						/*renderState*/,
124*cdf0e10cSrcweir                                                                                    const rendering::StrokeAttributes& 					/*strokeAttributes*/ )
125*cdf0e10cSrcweir     {
126*cdf0e10cSrcweir         // TODO(P1): Provide caching here.
127*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
128*cdf0e10cSrcweir     }
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokeTexturedPolyPolygon( const rendering::XCanvas* 							/*pCanvas*/,
131*cdf0e10cSrcweir                                                                                            const uno::Reference< rendering::XPolyPolygon2D >& 	/*xPolyPolygon*/,
132*cdf0e10cSrcweir                                                                                            const rendering::ViewState& 							/*viewState*/,
133*cdf0e10cSrcweir                                                                                            const rendering::RenderState& 						/*renderState*/,
134*cdf0e10cSrcweir                                                                                            const uno::Sequence< rendering::Texture >& 			/*textures*/,
135*cdf0e10cSrcweir                                                                                            const rendering::StrokeAttributes& 					/*strokeAttributes*/ )
136*cdf0e10cSrcweir     {
137*cdf0e10cSrcweir         // TODO
138*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
139*cdf0e10cSrcweir     }
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokeTextureMappedPolyPolygon( const rendering::XCanvas* 							/*pCanvas*/,
142*cdf0e10cSrcweir                                                                                                 const uno::Reference< rendering::XPolyPolygon2D >&	/*xPolyPolygon*/,
143*cdf0e10cSrcweir                                                                                                 const rendering::ViewState& 						/*viewState*/,
144*cdf0e10cSrcweir                                                                                                 const rendering::RenderState& 						/*renderState*/,
145*cdf0e10cSrcweir                                                                                                 const uno::Sequence< rendering::Texture >& 			/*textures*/,
146*cdf0e10cSrcweir                                                                                                 const uno::Reference< geometry::XMapping2D >& 		/*xMapping*/,
147*cdf0e10cSrcweir                                                                                                 const rendering::StrokeAttributes& 					/*strokeAttributes*/ )
148*cdf0e10cSrcweir     {
149*cdf0e10cSrcweir         // TODO
150*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
151*cdf0e10cSrcweir     }
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir     uno::Reference< rendering::XPolyPolygon2D >   CanvasHelper::queryStrokeShapes( const rendering::XCanvas* 							/*pCanvas*/,
154*cdf0e10cSrcweir                                                                                    const uno::Reference< rendering::XPolyPolygon2D >& 	/*xPolyPolygon*/,
155*cdf0e10cSrcweir                                                                                    const rendering::ViewState& 							/*viewState*/,
156*cdf0e10cSrcweir                                                                                    const rendering::RenderState& 						/*renderState*/,
157*cdf0e10cSrcweir                                                                                    const rendering::StrokeAttributes& 					/*strokeAttributes*/ )
158*cdf0e10cSrcweir     {
159*cdf0e10cSrcweir         // TODO
160*cdf0e10cSrcweir         return uno::Reference< rendering::XPolyPolygon2D >(NULL);
161*cdf0e10cSrcweir     }
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillPolyPolygon( const rendering::XCanvas* 							/*pCanvas*/,
164*cdf0e10cSrcweir                                                                                  const uno::Reference< rendering::XPolyPolygon2D >& /*xPolyPolygon*/,
165*cdf0e10cSrcweir                                                                                  const rendering::ViewState& 						/*viewState*/,
166*cdf0e10cSrcweir                                                                                  const rendering::RenderState& 						/*renderState*/ )
167*cdf0e10cSrcweir     {
168*cdf0e10cSrcweir         // TODO(P1): Provide caching here.
169*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
170*cdf0e10cSrcweir     }
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillTexturedPolyPolygon( const rendering::XCanvas* 							/*pCanvas*/,
173*cdf0e10cSrcweir                                                                                          const uno::Reference< rendering::XPolyPolygon2D >& /*xPolyPolygon*/,
174*cdf0e10cSrcweir                                                                                          const rendering::ViewState& 						/*viewState*/,
175*cdf0e10cSrcweir                                                                                          const rendering::RenderState& 						/*renderState*/,
176*cdf0e10cSrcweir                                                                                          const uno::Sequence< rendering::Texture >& 		/*textures*/ )
177*cdf0e10cSrcweir     {
178*cdf0e10cSrcweir         // TODO(P1): Provide caching here.
179*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
180*cdf0e10cSrcweir     }
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillTextureMappedPolyPolygon( const rendering::XCanvas* 							/*pCanvas*/,
183*cdf0e10cSrcweir                                                                                               const uno::Reference< rendering::XPolyPolygon2D >& 	/*xPolyPolygon*/,
184*cdf0e10cSrcweir                                                                                               const rendering::ViewState& 							/*viewState*/,
185*cdf0e10cSrcweir                                                                                               const rendering::RenderState& 						/*renderState*/,
186*cdf0e10cSrcweir                                                                                               const uno::Sequence< rendering::Texture >& 			/*textures*/,
187*cdf0e10cSrcweir                                                                                               const uno::Reference< geometry::XMapping2D >& 		/*xMapping*/ )
188*cdf0e10cSrcweir     {
189*cdf0e10cSrcweir         // TODO
190*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
191*cdf0e10cSrcweir     }
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir     uno::Reference< rendering::XCanvasFont > CanvasHelper::createFont( const rendering::XCanvas* 					/*pCanvas*/,
194*cdf0e10cSrcweir                                                                        const rendering::FontRequest& 				fontRequest,
195*cdf0e10cSrcweir                                                                        const uno::Sequence< beans::PropertyValue >& extraFontProperties,
196*cdf0e10cSrcweir                                                                        const geometry::Matrix2D& 					fontMatrix )
197*cdf0e10cSrcweir     {
198*cdf0e10cSrcweir         return uno::Reference< rendering::XCanvasFont >(
199*cdf0e10cSrcweir             new CanvasFont(fontRequest, extraFontProperties, fontMatrix ) );
200*cdf0e10cSrcweir     }
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir     uno::Sequence< rendering::FontInfo > CanvasHelper::queryAvailableFonts( const rendering::XCanvas* 						/*pCanvas*/,
203*cdf0e10cSrcweir                                                                             const rendering::FontInfo& 						/*aFilter*/,
204*cdf0e10cSrcweir                                                                             const uno::Sequence< beans::PropertyValue >& 	/*aFontProperties*/ )
205*cdf0e10cSrcweir     {
206*cdf0e10cSrcweir         // TODO
207*cdf0e10cSrcweir         return uno::Sequence< rendering::FontInfo >();
208*cdf0e10cSrcweir     }
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawText( const rendering::XCanvas* 						/*pCanvas*/,
211*cdf0e10cSrcweir                                                                           const rendering::StringContext& 					/*text*/,
212*cdf0e10cSrcweir                                                                           const uno::Reference< rendering::XCanvasFont >& 	/*xFont*/,
213*cdf0e10cSrcweir                                                                           const rendering::ViewState& 						/*viewState*/,
214*cdf0e10cSrcweir                                                                           const rendering::RenderState& 					/*renderState*/,
215*cdf0e10cSrcweir                                                                           sal_Int8				 							/*textDirection*/ )
216*cdf0e10cSrcweir     {
217*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
218*cdf0e10cSrcweir     }
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawTextLayout( const rendering::XCanvas* 						/*pCanvas*/,
221*cdf0e10cSrcweir                                                                                 const uno::Reference< rendering::XTextLayout >& xLayoutetText,
222*cdf0e10cSrcweir                                                                                 const rendering::ViewState& 					viewState,
223*cdf0e10cSrcweir                                                                                 const rendering::RenderState& 					renderState )
224*cdf0e10cSrcweir     {
225*cdf0e10cSrcweir         ENSURE_OR_THROW( xLayoutetText.is(),
226*cdf0e10cSrcweir                           "CanvasHelper::drawTextLayout: layout is NULL");
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir         TextLayout* pTextLayout =
229*cdf0e10cSrcweir             dynamic_cast< TextLayout* >( xLayoutetText.get() );
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir         ENSURE_OR_THROW( pTextLayout,
232*cdf0e10cSrcweir                           "CanvasHelper::drawTextLayout(): TextLayout not compatible with this canvas" );
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir         pTextLayout->draw( viewState,
235*cdf0e10cSrcweir                            renderState,
236*cdf0e10cSrcweir                            mpDevice );
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
239*cdf0e10cSrcweir     }
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawBitmap( const rendering::XCanvas* 					/*pCanvas*/,
242*cdf0e10cSrcweir                                                                             const uno::Reference< rendering::XBitmap >& /*xBitmap*/,
243*cdf0e10cSrcweir                                                                             const rendering::ViewState& 				/*viewState*/,
244*cdf0e10cSrcweir                                                                             const rendering::RenderState& 				/*renderState*/ )
245*cdf0e10cSrcweir     {
246*cdf0e10cSrcweir         // TODO(P1): Provide caching here.
247*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
248*cdf0e10cSrcweir     }
249*cdf0e10cSrcweir 
250*cdf0e10cSrcweir     uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawBitmapModulated( const rendering::XCanvas* 						/*pCanvas*/,
251*cdf0e10cSrcweir                                                                                      const uno::Reference< rendering::XBitmap >& 	/*xBitmap*/,
252*cdf0e10cSrcweir                                                                                      const rendering::ViewState& 					/*viewState*/,
253*cdf0e10cSrcweir                                                                                      const rendering::RenderState& 					/*renderState*/ )
254*cdf0e10cSrcweir     {
255*cdf0e10cSrcweir         // TODO(P1): Provide caching here.
256*cdf0e10cSrcweir         return uno::Reference< rendering::XCachedPrimitive >(NULL);
257*cdf0e10cSrcweir     }
258*cdf0e10cSrcweir 
259*cdf0e10cSrcweir     uno::Reference< rendering::XGraphicDevice > CanvasHelper::getDevice()
260*cdf0e10cSrcweir     {
261*cdf0e10cSrcweir         return uno::Reference< rendering::XGraphicDevice >(mpDevice);
262*cdf0e10cSrcweir     }
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir     void CanvasHelper::copyRect( const rendering::XCanvas* 							/*pCanvas*/,
265*cdf0e10cSrcweir                                  const uno::Reference< rendering::XBitmapCanvas >&	/*sourceCanvas*/,
266*cdf0e10cSrcweir                                  const geometry::RealRectangle2D& 					/*sourceRect*/,
267*cdf0e10cSrcweir                                  const rendering::ViewState& 						/*sourceViewState*/,
268*cdf0e10cSrcweir                                  const rendering::RenderState& 						/*sourceRenderState*/,
269*cdf0e10cSrcweir                                  const geometry::RealRectangle2D& 					/*destRect*/,
270*cdf0e10cSrcweir                                  const rendering::ViewState& 						/*destViewState*/,
271*cdf0e10cSrcweir                                  const rendering::RenderState& 						/*destRenderState*/ )
272*cdf0e10cSrcweir     {
273*cdf0e10cSrcweir         // TODO(F2): copyRect NYI
274*cdf0e10cSrcweir     }
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir     geometry::IntegerSize2D CanvasHelper::getSize()
277*cdf0e10cSrcweir     {
278*cdf0e10cSrcweir         if( !mpDevice )
279*cdf0e10cSrcweir             geometry::IntegerSize2D(1, 1); // we're disposed
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir         return ::basegfx::unotools::integerSize2DFromB2ISize( maSize );
282*cdf0e10cSrcweir     }
283*cdf0e10cSrcweir 
284*cdf0e10cSrcweir     uno::Reference< rendering::XBitmap > CanvasHelper::getScaledBitmap( const geometry::RealSize2D&	/*newSize*/,
285*cdf0e10cSrcweir                                                                         sal_Bool 					/*beFast*/ )
286*cdf0e10cSrcweir     {
287*cdf0e10cSrcweir         // TODO(F1):
288*cdf0e10cSrcweir         return uno::Reference< rendering::XBitmap >();
289*cdf0e10cSrcweir     }
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir     uno::Sequence< sal_Int8 > CanvasHelper::getData( rendering::IntegerBitmapLayout&     /*bitmapLayout*/,
292*cdf0e10cSrcweir                                                      const geometry::IntegerRectangle2D& /*rect*/ )
293*cdf0e10cSrcweir     {
294*cdf0e10cSrcweir         // TODO
295*cdf0e10cSrcweir         return uno::Sequence< sal_Int8 >();
296*cdf0e10cSrcweir     }
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir     void CanvasHelper::setData( const uno::Sequence< sal_Int8 >& 		/*data*/,
299*cdf0e10cSrcweir                                 const rendering::IntegerBitmapLayout&   /*bitmapLayout*/,
300*cdf0e10cSrcweir                                 const geometry::IntegerRectangle2D& 	/*rect*/ )
301*cdf0e10cSrcweir     {
302*cdf0e10cSrcweir     }
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir     void CanvasHelper::setPixel( const uno::Sequence< sal_Int8 >&       /*color*/,
305*cdf0e10cSrcweir                                  const rendering::IntegerBitmapLayout&  /*bitmapLayout*/,
306*cdf0e10cSrcweir                                  const geometry::IntegerPoint2D&        /*pos*/ )
307*cdf0e10cSrcweir     {
308*cdf0e10cSrcweir     }
309*cdf0e10cSrcweir 
310*cdf0e10cSrcweir     uno::Sequence< sal_Int8 > CanvasHelper::getPixel( rendering::IntegerBitmapLayout&   /*bitmapLayout*/,
311*cdf0e10cSrcweir                                                       const geometry::IntegerPoint2D&   /*pos*/ )
312*cdf0e10cSrcweir     {
313*cdf0e10cSrcweir         return uno::Sequence< sal_Int8 >();
314*cdf0e10cSrcweir     }
315*cdf0e10cSrcweir 
316*cdf0e10cSrcweir     uno::Reference< rendering::XBitmapPalette > CanvasHelper::getPalette()
317*cdf0e10cSrcweir     {
318*cdf0e10cSrcweir         // TODO(F1): Palette bitmaps NYI
319*cdf0e10cSrcweir         return uno::Reference< rendering::XBitmapPalette >();
320*cdf0e10cSrcweir     }
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir     rendering::IntegerBitmapLayout CanvasHelper::getMemoryLayout()
323*cdf0e10cSrcweir     {
324*cdf0e10cSrcweir         return ::canvas::tools::getStdMemoryLayout(getSize());
325*cdf0e10cSrcweir     }
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir     void CanvasHelper::flush() const
328*cdf0e10cSrcweir     {
329*cdf0e10cSrcweir     }
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir     bool CanvasHelper::hasAlpha() const
332*cdf0e10cSrcweir     {
333*cdf0e10cSrcweir         return mbHaveAlpha;
334*cdf0e10cSrcweir     }
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir }
337