1*9f62ea84SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*9f62ea84SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9f62ea84SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9f62ea84SAndrew Rist * distributed with this work for additional information 6*9f62ea84SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9f62ea84SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9f62ea84SAndrew Rist * "License"); you may not use this file except in compliance 9*9f62ea84SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*9f62ea84SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*9f62ea84SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9f62ea84SAndrew Rist * software distributed under the License is distributed on an 15*9f62ea84SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9f62ea84SAndrew Rist * KIND, either express or implied. See the License for the 17*9f62ea84SAndrew Rist * specific language governing permissions and limitations 18*9f62ea84SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*9f62ea84SAndrew Rist *************************************************************/ 21*9f62ea84SAndrew Rist 22*9f62ea84SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_vcl.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir // bootstrap stuff 28cdf0e10cSrcweir #include <rtl/bootstrap.hxx> 29cdf0e10cSrcweir #include <comphelper/processfactory.hxx> 30cdf0e10cSrcweir #include <comphelper/regpathhelper.hxx> 31cdf0e10cSrcweir #include <cppuhelper/servicefactory.hxx> 32cdf0e10cSrcweir #include <cppuhelper/bootstrap.hxx> 33cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 34cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp> 35cdf0e10cSrcweir #include <com/sun/star/registry/XSimpleRegistry.hpp> 36cdf0e10cSrcweir 37cdf0e10cSrcweir #include <ucbhelper/contentbroker.hxx> 38cdf0e10cSrcweir #include <ucbhelper/configurationkeys.hxx> 39cdf0e10cSrcweir 40cdf0e10cSrcweir #include <vcl/svapp.hxx> 41cdf0e10cSrcweir #include <vcl/dialog.hxx> 42cdf0e10cSrcweir #include <vcl/outdev.hxx> 43cdf0e10cSrcweir #include <vcl/virdev.hxx> 44cdf0e10cSrcweir #include <vcl/hatch.hxx> 45cdf0e10cSrcweir #include <vcl/bitmap.hxx> 46cdf0e10cSrcweir #include <vcl/wall.hxx> 47cdf0e10cSrcweir #include <vcl/image.hxx> 48cdf0e10cSrcweir #include <vcl/gdimtf.hxx> 49cdf0e10cSrcweir #include <vcl/metaact.hxx> 50cdf0e10cSrcweir #include <vcl/bitmapex.hxx> 51cdf0e10cSrcweir #include <vcl/gradient.hxx> 52cdf0e10cSrcweir #include <vcl/lineinfo.hxx> 53cdf0e10cSrcweir #include <tools/string.hxx> 54cdf0e10cSrcweir 55cdf0e10cSrcweir #include <osl/time.h> 56cdf0e10cSrcweir 57cdf0e10cSrcweir #include <boost/function.hpp> 58cdf0e10cSrcweir #include <boost/bind.hpp> 59cdf0e10cSrcweir 60cdf0e10cSrcweir #include <stdio.h> 61cdf0e10cSrcweir #include <unistd.h> 62cdf0e10cSrcweir 63cdf0e10cSrcweir using namespace ::com::sun::star; 64cdf0e10cSrcweir 65cdf0e10cSrcweir 66cdf0e10cSrcweir namespace 67cdf0e10cSrcweir { 68cdf0e10cSrcweir 69cdf0e10cSrcweir class GrindApp : public Application 70cdf0e10cSrcweir { 71cdf0e10cSrcweir public: 72cdf0e10cSrcweir virtual void Main(); 73cdf0e10cSrcweir virtual sal_uInt16 Exception( sal_uInt16 nError ); 74cdf0e10cSrcweir }; 75cdf0e10cSrcweir 76cdf0e10cSrcweir class TestWindow : public Dialog 77cdf0e10cSrcweir { 78cdf0e10cSrcweir public: 79cdf0e10cSrcweir TestWindow() : Dialog( (Window *) NULL ) 80cdf0e10cSrcweir { 81cdf0e10cSrcweir SetText( rtl::OUString::createFromAscii( "OutDev grinding" ) ); 82cdf0e10cSrcweir SetSizePixel( Size( 1024, 1024 ) ); 83cdf0e10cSrcweir EnablePaint( true ); 84cdf0e10cSrcweir Show(); 85cdf0e10cSrcweir } 86cdf0e10cSrcweir 87cdf0e10cSrcweir virtual ~TestWindow() {} 88cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 89cdf0e10cSrcweir }; 90cdf0e10cSrcweir 91cdf0e10cSrcweir //---------------------------------------------------------------------------------- 92cdf0e10cSrcweir 93cdf0e10cSrcweir typedef boost::function1<void, OutputDevice*> functor_type; 94cdf0e10cSrcweir typedef std::vector< std::pair<const char*, 95cdf0e10cSrcweir functor_type> > functor_vector_type; 96cdf0e10cSrcweir 97cdf0e10cSrcweir template< typename Functor > void add( functor_vector_type& res, 98cdf0e10cSrcweir const char* pStr, 99cdf0e10cSrcweir const Functor& func ) 100cdf0e10cSrcweir { 101cdf0e10cSrcweir res.push_back( std::make_pair(pStr,functor_type(func)) ); 102cdf0e10cSrcweir } 103cdf0e10cSrcweir 104cdf0e10cSrcweir void setupMethodStubs( functor_vector_type& res ) 105cdf0e10cSrcweir { 106cdf0e10cSrcweir const Color aWhiteColor( COL_WHITE ); 107cdf0e10cSrcweir const Color aBlackColor( COL_BLACK ); 108cdf0e10cSrcweir 109cdf0e10cSrcweir const Point aPt1(10,10); 110cdf0e10cSrcweir const Point aPt2(500,500); 111cdf0e10cSrcweir const Point aPt3(0,0); 112cdf0e10cSrcweir const Point aPt4(450,450); 113cdf0e10cSrcweir 114cdf0e10cSrcweir const Rectangle aRect(aPt1,aPt2); 115cdf0e10cSrcweir const Rectangle aRect2(aPt3,aPt4); 116cdf0e10cSrcweir const Polygon aPoly(aRect); 117cdf0e10cSrcweir const Polygon aPoly2(aRect2); 118cdf0e10cSrcweir PolyPolygon aPolyPoly(aPoly); 119cdf0e10cSrcweir aPolyPoly.Insert( aPoly2 ); 120cdf0e10cSrcweir Polygon aPoly3(aPoly2); 121cdf0e10cSrcweir aPoly3.Rotate( aPoly3.GetBoundRect().Center(), 122cdf0e10cSrcweir 900 ); 123cdf0e10cSrcweir 124cdf0e10cSrcweir const String aString( ByteString("This is a test"), 125cdf0e10cSrcweir RTL_TEXTENCODING_ASCII_US ); 126cdf0e10cSrcweir const LineInfo aLineInfo(LINE_SOLID,5); 127cdf0e10cSrcweir 128cdf0e10cSrcweir // unfortunately, VDevs have inaccessible copy constructors 129cdf0e10cSrcweir static VirtualDevice aVDev; 130cdf0e10cSrcweir static VirtualDevice aVDevBW(1); 131cdf0e10cSrcweir 132cdf0e10cSrcweir const Size aVDevSize; 133cdf0e10cSrcweir aVDev.SetOutputSizePixel(aVDevSize); 134cdf0e10cSrcweir aVDevBW.SetOutputSizePixel(aVDevSize); 135cdf0e10cSrcweir 136cdf0e10cSrcweir const Bitmap aBitmap( aVDev.GetBitmap(aPt1,aVDevSize) ); 137cdf0e10cSrcweir const Bitmap aBitmapBW( aVDevBW.GetBitmap(aPt1,aVDevSize) ); 138cdf0e10cSrcweir const Bitmap aBitmapAlien( aVDevSize, 8 ); 139cdf0e10cSrcweir 140cdf0e10cSrcweir const BitmapEx aBitmapEx( aBitmap, aBitmapBW ); 141cdf0e10cSrcweir const BitmapEx aBitmapExBW( aBitmapBW, aBitmapBW ); 142cdf0e10cSrcweir const BitmapEx aBitmapExAlien( aBitmapAlien, aBitmapBW ); 143cdf0e10cSrcweir const BitmapEx aBitmapExAlpha( aBitmap, aBitmapAlien ); 144cdf0e10cSrcweir const BitmapEx aBitmapExAlphaAlien( aBitmapAlien, aBitmapAlien ); 145cdf0e10cSrcweir 146cdf0e10cSrcweir const Image aImage( aBitmapEx ); 147cdf0e10cSrcweir const Gradient aGradient(GRADIENT_ELLIPTICAL,aBlackColor,aWhiteColor); 148cdf0e10cSrcweir const Hatch aHatch(HatchStyle_TRIPLE,aBlackColor,4,450); 149cdf0e10cSrcweir const Wallpaper aWallpaper( aWhiteColor ); 150cdf0e10cSrcweir 151cdf0e10cSrcweir GDIMetaFile aMtf; 152cdf0e10cSrcweir aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),sal_True) ); 153cdf0e10cSrcweir aMtf.AddAction( new MetaRectAction(aRect) ); 154cdf0e10cSrcweir 155cdf0e10cSrcweir /* void DrawText( const Point& rStartPt, const XubString& rStr, 156cdf0e10cSrcweir xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, 157cdf0e10cSrcweir MetricVector* pVector = NULL, String* pDisplayText = NULL ); 158cdf0e10cSrcweir */ 159cdf0e10cSrcweir // add(res, 160cdf0e10cSrcweir // "DrawText", 161cdf0e10cSrcweir // boost::bind( 162cdf0e10cSrcweir // &OutputDevice::DrawText, 163cdf0e10cSrcweir // _1, 164cdf0e10cSrcweir // aPt1, aString, (sal_uInt16)0, aString.Len(), (MetricVector*)0, (String*)0, (vcl::ITextLayout*)0 )); 165cdf0e10cSrcweir 166cdf0e10cSrcweir /* void DrawTextArray( const Point& rStartPt, const XubString& rStr, 167cdf0e10cSrcweir const sal_Int32* pDXAry = NULL, 168cdf0e10cSrcweir xub_StrLen nIndex = 0, 169cdf0e10cSrcweir xub_StrLen nLen = STRING_LEN ); 170cdf0e10cSrcweir */ 171cdf0e10cSrcweir add(res, 172cdf0e10cSrcweir "DrawTextArray", 173cdf0e10cSrcweir boost::bind( 174cdf0e10cSrcweir &OutputDevice::DrawTextArray, 175cdf0e10cSrcweir _1, 176cdf0e10cSrcweir aPt1, aString, (const sal_Int32*)0, (sal_uInt16)0, aString.Len() )); 177cdf0e10cSrcweir 178cdf0e10cSrcweir /* void DrawPixel( const Point& rPt, const Color& rColor ); */ 179cdf0e10cSrcweir add(res, 180cdf0e10cSrcweir "DrawPixel", 181cdf0e10cSrcweir boost::bind( 182cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Color& ))( 183cdf0e10cSrcweir &OutputDevice::DrawPixel), 184cdf0e10cSrcweir _1, 185cdf0e10cSrcweir aPt1, aBlackColor )); 186cdf0e10cSrcweir 187cdf0e10cSrcweir /* void DrawLine( const Point& rStartPt, const Point& rEndPt ); */ 188cdf0e10cSrcweir add(res, 189cdf0e10cSrcweir "DrawLine", 190cdf0e10cSrcweir boost::bind( 191cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Point& ))( 192cdf0e10cSrcweir &OutputDevice::DrawLine), 193cdf0e10cSrcweir _1, 194cdf0e10cSrcweir aPt1, aPt2 )); 195cdf0e10cSrcweir 196cdf0e10cSrcweir /* void DrawLine( const Point& rStartPt, const Point& rEndPt, 197cdf0e10cSrcweir const LineInfo& rLineInfo ); 198cdf0e10cSrcweir */ 199cdf0e10cSrcweir add(res, 200cdf0e10cSrcweir "DrawLine(LineInfo)", 201cdf0e10cSrcweir boost::bind( 202cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Point&,const LineInfo& ))( 203cdf0e10cSrcweir &OutputDevice::DrawLine), 204cdf0e10cSrcweir _1, 205cdf0e10cSrcweir aPt1, aPt2, aLineInfo )); 206cdf0e10cSrcweir 207cdf0e10cSrcweir /* void DrawPolyLine( const Polygon& rPoly ); */ 208cdf0e10cSrcweir add(res, 209cdf0e10cSrcweir "DrawPolyLine", 210cdf0e10cSrcweir boost::bind( 211cdf0e10cSrcweir (void (OutputDevice::*)( const Polygon& ))( 212cdf0e10cSrcweir &OutputDevice::DrawPolyLine), 213cdf0e10cSrcweir _1, 214cdf0e10cSrcweir aPoly )); 215cdf0e10cSrcweir 216cdf0e10cSrcweir /* void DrawPolyLine( const Polygon& rPoly, 217cdf0e10cSrcweir const LineInfo& rLineInfo ); 218cdf0e10cSrcweir */ 219cdf0e10cSrcweir add(res, 220cdf0e10cSrcweir "DrawPolyLine(LineInfo)", 221cdf0e10cSrcweir boost::bind( 222cdf0e10cSrcweir (void (OutputDevice::*)( const Polygon&, const LineInfo& ))( 223cdf0e10cSrcweir &OutputDevice::DrawPolyLine), 224cdf0e10cSrcweir _1, 225cdf0e10cSrcweir aPoly, aLineInfo )); 226cdf0e10cSrcweir 227cdf0e10cSrcweir /* void DrawPolygon( const Polygon& rPoly ); */ 228cdf0e10cSrcweir add(res, 229cdf0e10cSrcweir "DrawPolygon", 230cdf0e10cSrcweir boost::bind( 231cdf0e10cSrcweir (void (OutputDevice::*)( const Polygon& )) 232cdf0e10cSrcweir &OutputDevice::DrawPolygon, 233cdf0e10cSrcweir _1, 234cdf0e10cSrcweir aPoly )); 235cdf0e10cSrcweir 236cdf0e10cSrcweir /* void DrawPolyPolygon( const PolyPolygon& rPolyPoly ); */ 237cdf0e10cSrcweir add(res, 238cdf0e10cSrcweir "DrawPolyPolygon", 239cdf0e10cSrcweir boost::bind( 240cdf0e10cSrcweir (void (OutputDevice::*)( const PolyPolygon& )) 241cdf0e10cSrcweir &OutputDevice::DrawPolyPolygon, 242cdf0e10cSrcweir _1, 243cdf0e10cSrcweir aPolyPoly )); 244cdf0e10cSrcweir 245cdf0e10cSrcweir /* void DrawRect( const Rectangle& rRect ); */ 246cdf0e10cSrcweir add(res, 247cdf0e10cSrcweir "DrawRect", 248cdf0e10cSrcweir boost::bind( 249cdf0e10cSrcweir (void (OutputDevice::*)( const Rectangle& ))( 250cdf0e10cSrcweir &OutputDevice::DrawRect), 251cdf0e10cSrcweir _1, 252cdf0e10cSrcweir aRect )); 253cdf0e10cSrcweir 254cdf0e10cSrcweir /* void DrawRect( const Rectangle& rRect, 255cdf0e10cSrcweir sal_uLong nHorzRount, sal_uLong nVertRound ); 256cdf0e10cSrcweir */ 257cdf0e10cSrcweir add(res, 258cdf0e10cSrcweir "DrawRect(round corners)", 259cdf0e10cSrcweir boost::bind( 260cdf0e10cSrcweir (void (OutputDevice::*)( const Rectangle&, sal_uLong nHorzRount, sal_uLong nVertRound ))( 261cdf0e10cSrcweir &OutputDevice::DrawRect), 262cdf0e10cSrcweir _1, 263cdf0e10cSrcweir aRect2, 264cdf0e10cSrcweir 4,4)); 265cdf0e10cSrcweir 266cdf0e10cSrcweir /* void DrawEllipse( const Rectangle& rRect ); */ 267cdf0e10cSrcweir add(res, 268cdf0e10cSrcweir "DrawEllipse", 269cdf0e10cSrcweir boost::bind( 270cdf0e10cSrcweir &OutputDevice::DrawEllipse, 271cdf0e10cSrcweir _1, 272cdf0e10cSrcweir aRect )); 273cdf0e10cSrcweir 274cdf0e10cSrcweir /* void DrawArc( const Rectangle& rRect, 275cdf0e10cSrcweir const Point& rStartPt, const Point& rEndPt ); 276cdf0e10cSrcweir */ 277cdf0e10cSrcweir add(res, 278cdf0e10cSrcweir "DrawArc", 279cdf0e10cSrcweir boost::bind( 280cdf0e10cSrcweir &OutputDevice::DrawArc, 281cdf0e10cSrcweir _1, 282cdf0e10cSrcweir aRect,aPt1,aPt2 )); 283cdf0e10cSrcweir 284cdf0e10cSrcweir /* void DrawPie( const Rectangle& rRect, 285cdf0e10cSrcweir const Point& rStartPt, const Point& rEndPt ); 286cdf0e10cSrcweir */ 287cdf0e10cSrcweir add(res, 288cdf0e10cSrcweir "DrawPie", 289cdf0e10cSrcweir boost::bind( 290cdf0e10cSrcweir &OutputDevice::DrawPie, 291cdf0e10cSrcweir _1, 292cdf0e10cSrcweir aRect2,aPt3,aPt4 )); 293cdf0e10cSrcweir 294cdf0e10cSrcweir /* void DrawChord( const Rectangle& rRect, 295cdf0e10cSrcweir const Point& rStartPt, const Point& rEndPt ); 296cdf0e10cSrcweir */ 297cdf0e10cSrcweir add(res, 298cdf0e10cSrcweir "DrawChord", 299cdf0e10cSrcweir boost::bind( 300cdf0e10cSrcweir &OutputDevice::DrawChord, 301cdf0e10cSrcweir _1, 302cdf0e10cSrcweir aRect2,aPt3,aPt4 )); 303cdf0e10cSrcweir 304cdf0e10cSrcweir /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, 305cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize ); 306cdf0e10cSrcweir */ 307cdf0e10cSrcweir add(res, 308cdf0e10cSrcweir "DrawOutDev", 309cdf0e10cSrcweir boost::bind( 310cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Size&, 311cdf0e10cSrcweir const Point&, const Size& ))( 312cdf0e10cSrcweir &OutputDevice::DrawOutDev), 313cdf0e10cSrcweir _1, 314cdf0e10cSrcweir aRect2.TopLeft(), aRect2.GetSize(), 315cdf0e10cSrcweir aRect.TopLeft(), aRect.GetSize())); 316cdf0e10cSrcweir 317cdf0e10cSrcweir /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, 318cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize, 319cdf0e10cSrcweir const OutputDevice& rOutDev ); 320cdf0e10cSrcweir */ 321cdf0e10cSrcweir add(res, 322cdf0e10cSrcweir "DrawOutDev(foreign source)", 323cdf0e10cSrcweir boost::bind( 324cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Size&, 325cdf0e10cSrcweir const Point&, const Size&, 326cdf0e10cSrcweir const OutputDevice& ))( 327cdf0e10cSrcweir &OutputDevice::DrawOutDev), 328cdf0e10cSrcweir _1, 329cdf0e10cSrcweir aRect2.TopLeft(), aRect2.GetSize(), 330cdf0e10cSrcweir aRect.TopLeft(), aRect.GetSize(), 331cdf0e10cSrcweir boost::cref(aVDevBW) )); 332cdf0e10cSrcweir 333cdf0e10cSrcweir /* void DrawOutDev( const Point& rDestPt, const Size& rDestSize, 334cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize, 335cdf0e10cSrcweir const OutputDevice& rOutDev ); 336cdf0e10cSrcweir */ 337cdf0e10cSrcweir add(res, 338cdf0e10cSrcweir "DrawOutDev(foreign source, scaled)", 339cdf0e10cSrcweir boost::bind( 340cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, const Size&, 341cdf0e10cSrcweir const Point&, const Size&, 342cdf0e10cSrcweir const OutputDevice& ))( 343cdf0e10cSrcweir &OutputDevice::DrawOutDev), 344cdf0e10cSrcweir _1, 345cdf0e10cSrcweir aRect2.TopLeft(), aRect2.GetSize(), 346cdf0e10cSrcweir aRect.TopLeft(), aRect.GetSize(), 347cdf0e10cSrcweir boost::cref(aVDev) )); 348cdf0e10cSrcweir 349cdf0e10cSrcweir /* void CopyArea( const Point& rDestPt, 350cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSize, 351cdf0e10cSrcweir sal_uInt16 nFlags = 0 ); 352cdf0e10cSrcweir */ 353cdf0e10cSrcweir add(res, 354cdf0e10cSrcweir "CopyArea", 355cdf0e10cSrcweir boost::bind( 356cdf0e10cSrcweir &OutputDevice::CopyArea, 357cdf0e10cSrcweir _1, 358cdf0e10cSrcweir aPt1,aPt3,aRect2.GetSize(),(sal_uInt16)0 )); 359cdf0e10cSrcweir 360cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, 361cdf0e10cSrcweir const Bitmap& rBitmap ); 362cdf0e10cSrcweir */ 363cdf0e10cSrcweir add(res, 364cdf0e10cSrcweir "DrawBitmap(alien source)", 365cdf0e10cSrcweir boost::bind( 366cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 367cdf0e10cSrcweir const Bitmap& ))( 368cdf0e10cSrcweir &OutputDevice::DrawBitmap), 369cdf0e10cSrcweir _1, 370cdf0e10cSrcweir aPt1,aBitmapAlien )); 371cdf0e10cSrcweir 372cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, 373cdf0e10cSrcweir const Bitmap& rBitmap ); 374cdf0e10cSrcweir */ 375cdf0e10cSrcweir add(res, 376cdf0e10cSrcweir "DrawBitmap", 377cdf0e10cSrcweir boost::bind( 378cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 379cdf0e10cSrcweir const Bitmap& ))( 380cdf0e10cSrcweir &OutputDevice::DrawBitmap), 381cdf0e10cSrcweir _1, 382cdf0e10cSrcweir aPt1,aBitmap )); 383cdf0e10cSrcweir 384cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 385cdf0e10cSrcweir const Bitmap& rBitmap ); 386cdf0e10cSrcweir */ 387cdf0e10cSrcweir add(res, 388cdf0e10cSrcweir "DrawBitmap(scaled,alien source)", 389cdf0e10cSrcweir boost::bind( 390cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 391cdf0e10cSrcweir const Size&, 392cdf0e10cSrcweir const Bitmap& ))( 393cdf0e10cSrcweir &OutputDevice::DrawBitmap), 394cdf0e10cSrcweir _1, 395cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapAlien )); 396cdf0e10cSrcweir 397cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 398cdf0e10cSrcweir const Bitmap& rBitmap ); 399cdf0e10cSrcweir */ 400cdf0e10cSrcweir add(res, 401cdf0e10cSrcweir "DrawBitmap(scaled)", 402cdf0e10cSrcweir boost::bind( 403cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 404cdf0e10cSrcweir const Size&, 405cdf0e10cSrcweir const Bitmap& ))( 406cdf0e10cSrcweir &OutputDevice::DrawBitmap), 407cdf0e10cSrcweir _1, 408cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmap )); 409cdf0e10cSrcweir 410cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 411cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 412cdf0e10cSrcweir const Bitmap& rBitmap ); 413cdf0e10cSrcweir */ 414cdf0e10cSrcweir add(res, 415cdf0e10cSrcweir "DrawBitmap(scaled subset,alien source)", 416cdf0e10cSrcweir boost::bind( 417cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 418cdf0e10cSrcweir const Size&, 419cdf0e10cSrcweir const Point&, 420cdf0e10cSrcweir const Size&, 421cdf0e10cSrcweir const Bitmap& ))( 422cdf0e10cSrcweir &OutputDevice::DrawBitmap), 423cdf0e10cSrcweir _1, 424cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapAlien )); 425cdf0e10cSrcweir 426cdf0e10cSrcweir /* void DrawBitmap( const Point& rDestPt, const Size& rDestSize, 427cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 428cdf0e10cSrcweir const Bitmap& rBitmap ); 429cdf0e10cSrcweir */ 430cdf0e10cSrcweir add(res, 431cdf0e10cSrcweir "DrawBitmap(scaled subset)", 432cdf0e10cSrcweir boost::bind( 433cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 434cdf0e10cSrcweir const Size&, 435cdf0e10cSrcweir const Point&, 436cdf0e10cSrcweir const Size&, 437cdf0e10cSrcweir const Bitmap& ))( 438cdf0e10cSrcweir &OutputDevice::DrawBitmap), 439cdf0e10cSrcweir _1, 440cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmap )); 441cdf0e10cSrcweir 442cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 443cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 444cdf0e10cSrcweir */ 445cdf0e10cSrcweir add(res, 446cdf0e10cSrcweir "DrawBitmapEx(alien source)", 447cdf0e10cSrcweir boost::bind( 448cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 449cdf0e10cSrcweir const BitmapEx& ))( 450cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 451cdf0e10cSrcweir _1, 452cdf0e10cSrcweir aPt1,aBitmapExAlien )); 453cdf0e10cSrcweir 454cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 455cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 456cdf0e10cSrcweir */ 457cdf0e10cSrcweir add(res, 458cdf0e10cSrcweir "DrawBitmapEx", 459cdf0e10cSrcweir boost::bind( 460cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 461cdf0e10cSrcweir const BitmapEx& ))( 462cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 463cdf0e10cSrcweir _1, 464cdf0e10cSrcweir aPt1,aBitmapEx )); 465cdf0e10cSrcweir 466cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 467cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 468cdf0e10cSrcweir */ 469cdf0e10cSrcweir add(res, 470cdf0e10cSrcweir "DrawBitmapEx(alpha)", 471cdf0e10cSrcweir boost::bind( 472cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 473cdf0e10cSrcweir const BitmapEx& ))( 474cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 475cdf0e10cSrcweir _1, 476cdf0e10cSrcweir aPt1,aBitmapExAlpha )); 477cdf0e10cSrcweir 478cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, 479cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 480cdf0e10cSrcweir */ 481cdf0e10cSrcweir add(res, 482cdf0e10cSrcweir "DrawBitmapEx(alpha, alien source)", 483cdf0e10cSrcweir boost::bind( 484cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 485cdf0e10cSrcweir const BitmapEx& ))( 486cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 487cdf0e10cSrcweir _1, 488cdf0e10cSrcweir aPt1,aBitmapExAlphaAlien )); 489cdf0e10cSrcweir 490cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 491cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 492cdf0e10cSrcweir */ 493cdf0e10cSrcweir add(res, 494cdf0e10cSrcweir "DrawBitmapEx(scaled,alien source)", 495cdf0e10cSrcweir boost::bind( 496cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 497cdf0e10cSrcweir const Size&, 498cdf0e10cSrcweir const BitmapEx& ))( 499cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 500cdf0e10cSrcweir _1, 501cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapExAlien )); 502cdf0e10cSrcweir 503cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 504cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 505cdf0e10cSrcweir */ 506cdf0e10cSrcweir add(res, 507cdf0e10cSrcweir "DrawBitmapEx(scaled)", 508cdf0e10cSrcweir boost::bind( 509cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 510cdf0e10cSrcweir const Size&, 511cdf0e10cSrcweir const BitmapEx& ))( 512cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 513cdf0e10cSrcweir _1, 514cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapEx )); 515cdf0e10cSrcweir 516cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 517cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 518cdf0e10cSrcweir */ 519cdf0e10cSrcweir add(res, 520cdf0e10cSrcweir "DrawBitmapEx(scaled alpha)", 521cdf0e10cSrcweir boost::bind( 522cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 523cdf0e10cSrcweir const Size&, 524cdf0e10cSrcweir const BitmapEx& ))( 525cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 526cdf0e10cSrcweir _1, 527cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapExAlpha )); 528cdf0e10cSrcweir 529cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 530cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 531cdf0e10cSrcweir */ 532cdf0e10cSrcweir add(res, 533cdf0e10cSrcweir "DrawBitmapEx(scaled alpha, alien source)", 534cdf0e10cSrcweir boost::bind( 535cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 536cdf0e10cSrcweir const Size&, 537cdf0e10cSrcweir const BitmapEx& ))( 538cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 539cdf0e10cSrcweir _1, 540cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapExAlphaAlien )); 541cdf0e10cSrcweir 542cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 543cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 544cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 545cdf0e10cSrcweir */ 546cdf0e10cSrcweir add(res, 547cdf0e10cSrcweir "DrawBitmapEx(scaled subset,alien source)", 548cdf0e10cSrcweir boost::bind( 549cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 550cdf0e10cSrcweir const Size&, 551cdf0e10cSrcweir const Point&, 552cdf0e10cSrcweir const Size&, 553cdf0e10cSrcweir const BitmapEx& ))( 554cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 555cdf0e10cSrcweir _1, 556cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapExAlien )); 557cdf0e10cSrcweir 558cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 559cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 560cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 561cdf0e10cSrcweir */ 562cdf0e10cSrcweir add(res, 563cdf0e10cSrcweir "DrawBitmapEx(scaled subset)", 564cdf0e10cSrcweir boost::bind( 565cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 566cdf0e10cSrcweir const Size&, 567cdf0e10cSrcweir const Point&, 568cdf0e10cSrcweir const Size&, 569cdf0e10cSrcweir const BitmapEx& ))( 570cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 571cdf0e10cSrcweir _1, 572cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapEx )); 573cdf0e10cSrcweir 574cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 575cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 576cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 577cdf0e10cSrcweir */ 578cdf0e10cSrcweir add(res, 579cdf0e10cSrcweir "DrawBitmapEx(scaled subset, alpha)", 580cdf0e10cSrcweir boost::bind( 581cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 582cdf0e10cSrcweir const Size&, 583cdf0e10cSrcweir const Point&, 584cdf0e10cSrcweir const Size&, 585cdf0e10cSrcweir const BitmapEx& ))( 586cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 587cdf0e10cSrcweir _1, 588cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapExAlpha )); 589cdf0e10cSrcweir 590cdf0e10cSrcweir /* void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, 591cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 592cdf0e10cSrcweir const BitmapEx& rBitmapEx ); 593cdf0e10cSrcweir */ 594cdf0e10cSrcweir add(res, 595cdf0e10cSrcweir "DrawBitmapEx(scaled subset, alpha alien source)", 596cdf0e10cSrcweir boost::bind( 597cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 598cdf0e10cSrcweir const Size&, 599cdf0e10cSrcweir const Point&, 600cdf0e10cSrcweir const Size&, 601cdf0e10cSrcweir const BitmapEx& ))( 602cdf0e10cSrcweir &OutputDevice::DrawBitmapEx), 603cdf0e10cSrcweir _1, 604cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapExAlphaAlien )); 605cdf0e10cSrcweir 606cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, 607cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 608cdf0e10cSrcweir */ 609cdf0e10cSrcweir add(res, 610cdf0e10cSrcweir "DrawMask(alien source)", 611cdf0e10cSrcweir boost::bind( 612cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 613cdf0e10cSrcweir const Bitmap&, 614cdf0e10cSrcweir const Color& ))( 615cdf0e10cSrcweir &OutputDevice::DrawMask), 616cdf0e10cSrcweir _1, 617cdf0e10cSrcweir aPt1,aBitmapAlien,aBlackColor )); 618cdf0e10cSrcweir 619cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, 620cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 621cdf0e10cSrcweir */ 622cdf0e10cSrcweir add(res, 623cdf0e10cSrcweir "DrawMask", 624cdf0e10cSrcweir boost::bind( 625cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 626cdf0e10cSrcweir const Bitmap&, 627cdf0e10cSrcweir const Color& ))( 628cdf0e10cSrcweir &OutputDevice::DrawMask), 629cdf0e10cSrcweir _1, 630cdf0e10cSrcweir aPt1,aBitmap,aBlackColor )); 631cdf0e10cSrcweir 632cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 633cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 634cdf0e10cSrcweir */ 635cdf0e10cSrcweir add(res, 636cdf0e10cSrcweir "DrawMask(scaled,alien source)", 637cdf0e10cSrcweir boost::bind( 638cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 639cdf0e10cSrcweir const Size&, 640cdf0e10cSrcweir const Bitmap&, 641cdf0e10cSrcweir const Color& ))( 642cdf0e10cSrcweir &OutputDevice::DrawMask), 643cdf0e10cSrcweir _1, 644cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmapAlien, aBlackColor )); 645cdf0e10cSrcweir 646cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 647cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 648cdf0e10cSrcweir */ 649cdf0e10cSrcweir add(res, 650cdf0e10cSrcweir "DrawMask(scaled)", 651cdf0e10cSrcweir boost::bind( 652cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 653cdf0e10cSrcweir const Size&, 654cdf0e10cSrcweir const Bitmap&, 655cdf0e10cSrcweir const Color& ))( 656cdf0e10cSrcweir &OutputDevice::DrawMask), 657cdf0e10cSrcweir _1, 658cdf0e10cSrcweir aPt1,aRect.GetSize(),aBitmap,aBlackColor )); 659cdf0e10cSrcweir 660cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 661cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 662cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 663cdf0e10cSrcweir */ 664cdf0e10cSrcweir add(res, 665cdf0e10cSrcweir "DrawMask(scaled subset,alien source)", 666cdf0e10cSrcweir boost::bind( 667cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 668cdf0e10cSrcweir const Size&, 669cdf0e10cSrcweir const Point&, 670cdf0e10cSrcweir const Size&, 671cdf0e10cSrcweir const Bitmap&, 672cdf0e10cSrcweir const Color& ))( 673cdf0e10cSrcweir &OutputDevice::DrawMask), 674cdf0e10cSrcweir _1, 675cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmapAlien,aBlackColor )); 676cdf0e10cSrcweir 677cdf0e10cSrcweir /* void DrawMask( const Point& rDestPt, const Size& rDestSize, 678cdf0e10cSrcweir const Point& rSrcPtPixel, const Size& rSrcSizePixel, 679cdf0e10cSrcweir const Bitmap& rBitmap, const Color& rMaskColor ); 680cdf0e10cSrcweir */ 681cdf0e10cSrcweir add(res, 682cdf0e10cSrcweir "DrawMask(scaled subset)", 683cdf0e10cSrcweir boost::bind( 684cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 685cdf0e10cSrcweir const Size&, 686cdf0e10cSrcweir const Point&, 687cdf0e10cSrcweir const Size&, 688cdf0e10cSrcweir const Bitmap&, 689cdf0e10cSrcweir const Color& ))( 690cdf0e10cSrcweir &OutputDevice::DrawMask), 691cdf0e10cSrcweir _1, 692cdf0e10cSrcweir aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmap,aBlackColor )); 693cdf0e10cSrcweir 694cdf0e10cSrcweir /* void DrawImage( const Point& rPos, 695cdf0e10cSrcweir const Image& rImage, sal_uInt16 nStyle = 0 ); 696cdf0e10cSrcweir */ 697cdf0e10cSrcweir add(res, 698cdf0e10cSrcweir "DrawImage", 699cdf0e10cSrcweir boost::bind( 700cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 701cdf0e10cSrcweir const Image&, 702cdf0e10cSrcweir sal_uInt16 nStyle ))( 703cdf0e10cSrcweir &OutputDevice::DrawImage), 704cdf0e10cSrcweir _1, 705cdf0e10cSrcweir aPt1,aImage,(sal_uInt16)0 )); 706cdf0e10cSrcweir 707cdf0e10cSrcweir /* void DrawImage( const Point& rPos, const Size& rSize, 708cdf0e10cSrcweir const Image& rImage, sal_uInt16 nStyle = 0 ); 709cdf0e10cSrcweir */ 710cdf0e10cSrcweir add(res, 711cdf0e10cSrcweir "DrawImage(scaled)", 712cdf0e10cSrcweir boost::bind( 713cdf0e10cSrcweir (void (OutputDevice::*)( const Point&, 714cdf0e10cSrcweir const Size&, 715cdf0e10cSrcweir const Image&, 716cdf0e10cSrcweir sal_uInt16 nStyle ))( 717cdf0e10cSrcweir &OutputDevice::DrawImage), 718cdf0e10cSrcweir _1, 719cdf0e10cSrcweir aPt1,aRect.GetSize(),aImage,(sal_uInt16)0 )); 720cdf0e10cSrcweir 721cdf0e10cSrcweir /* void DrawGradient( const Rectangle& rRect, const Gradient& rGradient ); */ 722cdf0e10cSrcweir add(res, 723cdf0e10cSrcweir "DrawGradient", 724cdf0e10cSrcweir boost::bind( 725cdf0e10cSrcweir (void (OutputDevice::*)( const Rectangle&, const Gradient& ))( 726cdf0e10cSrcweir &OutputDevice::DrawGradient), 727cdf0e10cSrcweir _1, 728cdf0e10cSrcweir aRect,aGradient )); 729cdf0e10cSrcweir 730cdf0e10cSrcweir /* void DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient ); */ 731cdf0e10cSrcweir add(res, 732cdf0e10cSrcweir "DrawGradient(polygon)", 733cdf0e10cSrcweir boost::bind( 734cdf0e10cSrcweir (void (OutputDevice::*)( const PolyPolygon&, const Gradient& ))( 735cdf0e10cSrcweir &OutputDevice::DrawGradient), 736cdf0e10cSrcweir _1, 737cdf0e10cSrcweir aPoly3,aGradient )); 738cdf0e10cSrcweir 739cdf0e10cSrcweir /* void DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch ); */ 740cdf0e10cSrcweir add(res, 741cdf0e10cSrcweir "DrawHatch", 742cdf0e10cSrcweir boost::bind( 743cdf0e10cSrcweir &OutputDevice::DrawHatch, 744cdf0e10cSrcweir _1, 745cdf0e10cSrcweir aPoly3,aHatch )); 746cdf0e10cSrcweir 747cdf0e10cSrcweir /* void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper ); */ 748cdf0e10cSrcweir add(res, 749cdf0e10cSrcweir "DrawWallpaper", 750cdf0e10cSrcweir boost::bind( 751cdf0e10cSrcweir &OutputDevice::DrawWallpaper, 752cdf0e10cSrcweir _1, 753cdf0e10cSrcweir aRect2,aWallpaper )); 754cdf0e10cSrcweir 755cdf0e10cSrcweir /* void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, sal_uInt16 nStyle ); */ 756cdf0e10cSrcweir add(res, 757cdf0e10cSrcweir "DrawWaveLine", 758cdf0e10cSrcweir boost::bind( 759cdf0e10cSrcweir &OutputDevice::DrawWaveLine, 760cdf0e10cSrcweir _1, 761cdf0e10cSrcweir aPt1,aPt2,(sal_uInt16)WAVE_NORMAL )); 762cdf0e10cSrcweir 763cdf0e10cSrcweir /* void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags ); */ 764cdf0e10cSrcweir add(res, 765cdf0e10cSrcweir "DrawGrid", 766cdf0e10cSrcweir boost::bind( 767cdf0e10cSrcweir &OutputDevice::DrawGrid, 768cdf0e10cSrcweir _1, 769cdf0e10cSrcweir aRect,Size(10,20),GRID_HORZLINES|GRID_VERTLINES )); 770cdf0e10cSrcweir 771cdf0e10cSrcweir /* void DrawTransparent( const PolyPolygon& rPolyPoly, 772cdf0e10cSrcweir sal_uInt16 nTransparencePercent ); 773cdf0e10cSrcweir */ 774cdf0e10cSrcweir add(res, 775cdf0e10cSrcweir "DrawTransparent", 776cdf0e10cSrcweir boost::bind( 777cdf0e10cSrcweir (void (OutputDevice::*)( const PolyPolygon&, sal_uInt16 ))( 778cdf0e10cSrcweir &OutputDevice::DrawTransparent), 779cdf0e10cSrcweir _1, 780cdf0e10cSrcweir aPoly3,(sal_uInt16)50 )); 781cdf0e10cSrcweir 782cdf0e10cSrcweir /* void DrawTransparent( const GDIMetaFile& rMtf, 783cdf0e10cSrcweir const Point& rPos, const Size& rSize, 784cdf0e10cSrcweir const Gradient& rTransparenceGradient ); 785cdf0e10cSrcweir */ 786cdf0e10cSrcweir add(res, 787cdf0e10cSrcweir "DrawTransparent(metafile)", 788cdf0e10cSrcweir boost::bind( 789cdf0e10cSrcweir (void (OutputDevice::*)( const GDIMetaFile&, 790cdf0e10cSrcweir const Point&, 791cdf0e10cSrcweir const Size&, 792cdf0e10cSrcweir const Gradient& ))( 793cdf0e10cSrcweir &OutputDevice::DrawTransparent), 794cdf0e10cSrcweir _1, 795cdf0e10cSrcweir aMtf,aPt1,aRect.GetSize(),aGradient )); 796cdf0e10cSrcweir 797cdf0e10cSrcweir /* void Erase(); */ 798cdf0e10cSrcweir add(res, 799cdf0e10cSrcweir "Erase", 800cdf0e10cSrcweir boost::bind( 801cdf0e10cSrcweir &OutputDevice::Erase, 802cdf0e10cSrcweir _1 )); 803cdf0e10cSrcweir 804cdf0e10cSrcweir } 805cdf0e10cSrcweir 806cdf0e10cSrcweir //---------------------------------------------------------------------------------- 807cdf0e10cSrcweir 808cdf0e10cSrcweir void grindFunc( OutputDevice& rTarget, 809cdf0e10cSrcweir functor_vector_type::const_iterator iter, 810cdf0e10cSrcweir sal_Int32 nTurns, 811cdf0e10cSrcweir const char* pMsg ) 812cdf0e10cSrcweir { 813cdf0e10cSrcweir const sal_uInt32 nStartTime( osl_getGlobalTimer() ); 814cdf0e10cSrcweir 815cdf0e10cSrcweir for( sal_Int32 i=0; i<nTurns; ++i ) 816cdf0e10cSrcweir iter->second(&rTarget); 817cdf0e10cSrcweir 818cdf0e10cSrcweir if( rTarget.GetOutDevType() == OUTDEV_WINDOW ) 819cdf0e10cSrcweir static_cast<Window&>(rTarget).Sync(); 820cdf0e10cSrcweir 821cdf0e10cSrcweir fprintf( stdout, 822cdf0e10cSrcweir "Duration: %d ms (%d repetitions)\tOperation: %s\tSetup: %s\n", 823cdf0e10cSrcweir (int)(osl_getGlobalTimer() - nStartTime), 824cdf0e10cSrcweir (int)(nTurns), 825cdf0e10cSrcweir iter->first, 826cdf0e10cSrcweir pMsg ); 827cdf0e10cSrcweir } 828cdf0e10cSrcweir 829cdf0e10cSrcweir //---------------------------------------------------------------------------------- 830cdf0e10cSrcweir 831cdf0e10cSrcweir /** Call OutputDevice render methods repeatedly, and output elapsed 832cdf0e10cSrcweir time to stdout 833cdf0e10cSrcweir */ 834cdf0e10cSrcweir void outDevGrind( OutputDevice& rTarget, sal_Int32 nTurns=100 ) 835cdf0e10cSrcweir { 836cdf0e10cSrcweir // TODO(F1): also profile pure complex clip setup times! 837cdf0e10cSrcweir 838cdf0e10cSrcweir // State: fill/line color, draw mode, w/o clip, rect clip, complex clip 839cdf0e10cSrcweir functor_vector_type aMethods; 840cdf0e10cSrcweir setupMethodStubs( aMethods ); 841cdf0e10cSrcweir 842cdf0e10cSrcweir const Rectangle aClipRect(10,10,1000,1000); 843cdf0e10cSrcweir const Polygon aPoly1( aClipRect ); 844cdf0e10cSrcweir Polygon aPoly2( aClipRect ); 845cdf0e10cSrcweir aPoly2.Rotate(aClipRect.Center(),450); 846cdf0e10cSrcweir PolyPolygon aClipPoly(aPoly1); 847cdf0e10cSrcweir aClipPoly.Insert(aPoly2); 848cdf0e10cSrcweir 849cdf0e10cSrcweir functor_vector_type::const_iterator iter = aMethods.begin(); 850cdf0e10cSrcweir const functor_vector_type::const_iterator end = aMethods.end(); 851cdf0e10cSrcweir while( iter != end ) 852cdf0e10cSrcweir { 853cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 854cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 855cdf0e10cSrcweir rTarget.SetRasterOp( ROP_OVERPAINT ); 856cdf0e10cSrcweir rTarget.SetClipRegion(); 857cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "w/o clip, w/o xor" ); 858cdf0e10cSrcweir 859cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 860cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 861cdf0e10cSrcweir rTarget.SetRasterOp( ROP_OVERPAINT ); 862cdf0e10cSrcweir rTarget.SetClipRegion( aClipRect ); 863cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with rect clip, w/o xor" ); 864cdf0e10cSrcweir 865cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 866cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 867cdf0e10cSrcweir rTarget.SetRasterOp( ROP_OVERPAINT ); 868cdf0e10cSrcweir rTarget.SetClipRegion( aClipPoly ); 869cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with complex clip, w/o xor" ); 870cdf0e10cSrcweir 871cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 872cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 873cdf0e10cSrcweir rTarget.SetRasterOp( ROP_XOR ); 874cdf0e10cSrcweir rTarget.SetClipRegion(); 875cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "w/o clip, with xor" ); 876cdf0e10cSrcweir 877cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 878cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 879cdf0e10cSrcweir rTarget.SetRasterOp( ROP_XOR ); 880cdf0e10cSrcweir rTarget.SetClipRegion( aClipRect ); 881cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with rect clip, with xor" ); 882cdf0e10cSrcweir 883cdf0e10cSrcweir rTarget.SetLineColor( Color(COL_BLACK) ); 884cdf0e10cSrcweir rTarget.SetFillColor( Color(COL_GREEN) ); 885cdf0e10cSrcweir rTarget.SetRasterOp( ROP_XOR ); 886cdf0e10cSrcweir rTarget.SetClipRegion( aClipPoly ); 887cdf0e10cSrcweir grindFunc( rTarget, iter, nTurns, "with complex clip, with xor" ); 888cdf0e10cSrcweir 889cdf0e10cSrcweir ++iter; 890cdf0e10cSrcweir } 891cdf0e10cSrcweir } 892cdf0e10cSrcweir 893cdf0e10cSrcweir //---------------------------------------------------------------------------------- 894cdf0e10cSrcweir 895cdf0e10cSrcweir void TestWindow::Paint( const Rectangle& ) 896cdf0e10cSrcweir { 897cdf0e10cSrcweir outDevGrind( *this ); 898cdf0e10cSrcweir fflush( stdout ); 899cdf0e10cSrcweir } 900cdf0e10cSrcweir 901cdf0e10cSrcweir sal_uInt16 GrindApp::Exception( sal_uInt16 nError ) 902cdf0e10cSrcweir { 903cdf0e10cSrcweir switch( nError & EXC_MAJORTYPE ) 904cdf0e10cSrcweir { 905cdf0e10cSrcweir case EXC_RSCNOTLOADED: 906cdf0e10cSrcweir Abort( String::CreateFromAscii( 907cdf0e10cSrcweir "Error: could not load language resources.\nPlease check your installation.\n" ) ); 908cdf0e10cSrcweir break; 909cdf0e10cSrcweir } 910cdf0e10cSrcweir return 0; 911cdf0e10cSrcweir } 912cdf0e10cSrcweir 913cdf0e10cSrcweir void GrindApp::Main() 914cdf0e10cSrcweir { 915cdf0e10cSrcweir bool bHelp = false; 916cdf0e10cSrcweir 917cdf0e10cSrcweir for( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ ) 918cdf0e10cSrcweir { 919cdf0e10cSrcweir ::rtl::OUString aParam = GetCommandLineParam( i ); 920cdf0e10cSrcweir 921cdf0e10cSrcweir if( aParam.equalsAscii( "--help" ) || 922cdf0e10cSrcweir aParam.equalsAscii( "-h" ) ) 923cdf0e10cSrcweir bHelp = true; 924cdf0e10cSrcweir } 925cdf0e10cSrcweir 926cdf0e10cSrcweir if( bHelp ) 927cdf0e10cSrcweir { 928cdf0e10cSrcweir printf( "outdevgrind - Profile OutputDevice\n" ); 929cdf0e10cSrcweir return; 930cdf0e10cSrcweir } 931cdf0e10cSrcweir 932cdf0e10cSrcweir //------------------------------------------------- 933cdf0e10cSrcweir // create the global service-manager 934cdf0e10cSrcweir //------------------------------------------------- 935cdf0e10cSrcweir uno::Reference< lang::XMultiServiceFactory > xFactory; 936cdf0e10cSrcweir try 937cdf0e10cSrcweir { 938cdf0e10cSrcweir uno::Reference< uno::XComponentContext > xCtx = ::cppu::defaultBootstrap_InitialComponentContext(); 939cdf0e10cSrcweir xFactory = uno::Reference< lang::XMultiServiceFactory >( xCtx->getServiceManager(), 940cdf0e10cSrcweir uno::UNO_QUERY ); 941cdf0e10cSrcweir if( xFactory.is() ) 942cdf0e10cSrcweir ::comphelper::setProcessServiceFactory( xFactory ); 943cdf0e10cSrcweir } 944cdf0e10cSrcweir catch( uno::Exception& ) 945cdf0e10cSrcweir { 946cdf0e10cSrcweir } 947cdf0e10cSrcweir 948cdf0e10cSrcweir if( !xFactory.is() ) 949cdf0e10cSrcweir { 950cdf0e10cSrcweir fprintf( stderr, 951cdf0e10cSrcweir "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" ); 952cdf0e10cSrcweir exit( 1 ); 953cdf0e10cSrcweir } 954cdf0e10cSrcweir 955cdf0e10cSrcweir // Create UCB. 956cdf0e10cSrcweir uno::Sequence< uno::Any > aArgs( 2 ); 957cdf0e10cSrcweir aArgs[ 0 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ); 958cdf0e10cSrcweir aArgs[ 1 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ); 959cdf0e10cSrcweir ::ucbhelper::ContentBroker::initialize( xFactory, aArgs ); 960cdf0e10cSrcweir 961cdf0e10cSrcweir TestWindow pWindow; 962cdf0e10cSrcweir pWindow.Execute(); 963cdf0e10cSrcweir 964cdf0e10cSrcweir // clean up UCB 965cdf0e10cSrcweir ::ucbhelper::ContentBroker::deinitialize(); 966cdf0e10cSrcweir } 967cdf0e10cSrcweir 968cdf0e10cSrcweir } // namespace 969cdf0e10cSrcweir 970cdf0e10cSrcweir GrindApp aGrindApp; 971