1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_rendering_XCanvas_idl__ 28#define __com_sun_star_rendering_XCanvas_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 34#include <com/sun/star/lang/IllegalArgumentException.idl> 35#endif 36#ifndef __com_sun_star_geometry_RealPoint2D_idl__ 37#include <com/sun/star/geometry/RealPoint2D.idl> 38#endif 39#ifndef __com_sun_star_geometry_RealBezierSegment2D_idl__ 40#include <com/sun/star/geometry/RealBezierSegment2D.idl> 41#endif 42#ifndef __com_sun_star_geometry_RealRectangle2D_idl__ 43#include <com/sun/star/geometry/RealRectangle2D.idl> 44#endif 45#ifndef __com_sun_star_geometry_Matrix2D_idl__ 46#include <com/sun/star/geometry/Matrix2D.idl> 47#endif 48#ifndef __com_sun_star_rendering_ViewState_idl__ 49#include <com/sun/star/rendering/ViewState.idl> 50#endif 51#ifndef __com_sun_star_rendering_RenderState_idl__ 52#include <com/sun/star/rendering/RenderState.idl> 53#endif 54#ifndef __com_sun_star_rendering_FontRequest_idl__ 55#include <com/sun/star/rendering/FontRequest.idl> 56#endif 57#ifndef __com_sun_star_rendering_FontInfo_idl__ 58#include <com/sun/star/rendering/FontInfo.idl> 59#endif 60#ifndef __com_sun_star_rendering_Texture_idl__ 61#include <com/sun/star/rendering/Texture.idl> 62#endif 63#ifndef __com_sun_star_rendering_StringContext_idl__ 64#include <com/sun/star/rendering/StringContext.idl> 65#endif 66#ifndef __com_sun_star_rendering_StrokeAttributes_idl__ 67#include <com/sun/star/rendering/StrokeAttributes.idl> 68#endif 69#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__ 70#include <com/sun/star/rendering/VolatileContentDestroyedException.idl> 71#endif 72 73#ifndef __com_sun_star_beans_PropertyValue_idl__ 74#include <com/sun/star/beans/PropertyValue.idl> 75#endif 76 77 78module com { module sun { module star { module geometry { 79 published interface XMapping2D; 80}; }; }; }; 81 82module com { module sun { module star { module rendering { 83 84published interface XCanvasFont; 85published interface XPolyPolygon2D; 86published interface XCachedPrimitive; 87published interface XBitmap; 88published interface XGraphicDevice; 89published interface XTextLayout; 90 91/** Central interface for rendering.<p> 92 93 This is the central interface for graphical output production, and 94 the place where all draw methods are located.<p> 95 96 Some notes are in order to explain the concepts used here. The 97 <type>XCanvas</type> interface is free of client-modifiable state, 98 i.e. it can be used safely and without external synchronization in 99 a multi-threaded environment. On the other hand, this implies that 100 for nearly every canvas operation, external state is 101 required. This is provided by <type>ViewState</type> and 102 <type>RenderState</type> in a unified fashion, supplemented by a 103 few extra state parameters for some methods (e.g. textured 104 polygons or text rendering).<p> 105 106 When used careless, this scheme can be inefficient to some extend, 107 because internally, view, render and other states have to be 108 combined before rendering. This is especially expensive for 109 complex clip polygons, i.e. when both <type>ViewState</type> and 110 <type>RenderState</type> have a complex clip polygon set, which 111 have to be intersected before rendering. It is therefore 112 recommended to combine <type>ViewState</type> and 113 <type>RenderState</type> already at the client side, when objects 114 are organized in a hierarchical way: the classic example are 115 grouped draw shapes, whose parent group object imposes a 116 common clipping and a common transformation on its siblings. The 117 group object would therefore merge the <type>ViewState</type> and 118 the <type>RenderState</type> it is called with into a new 119 <type>ViewState</type>, and call its siblings with a 120 <type>RenderState</type> containing only the local offset (and no 121 extra clipping).<p> 122 123 Furtheron, this stateless nature provides easy ways for 124 caching. Every non-trivial operation on <type>XCanvas</type> can 125 return a cache object, which, when called to redraw, renders the 126 primitive usually much more quickly than the original method. Note 127 that such caching is a lot more complicated, should the actual 128 rendering a method yields depend on internal state (which is the 129 case e.g. for the 130 <type 131 scope="::com::sun::star::drawing">::com::sun::star::drawing::XGraphics</type> 132 interface). Please note, though, that deciding whether to return 133 an <type>XCachedPrimitive</type> is completely up to the 134 implementation - don't rely on the methods returning something 135 (this is because there might be cases when returning such a cache 136 object will actually be a pessimization, since it involves memory 137 allocation and comparisons).<p> 138 139 Things that need more than a small, fixed amount of data are 140 encapsulated in own interfaces, e.g. polygons and bitmaps. You 141 can, in principle, roll your own implementations of these 142 interfaces, wrap it around your internal representation of 143 polygons and bitmaps, and render them. It might just not be overly 144 fast, because the <type>XCanvas</type> would need to convert for 145 each render call. It is therefore recommended to create such 146 objects via the <type>XGraphicDevice</type> factory (to be 147 retrieved from every canvas object via the 148 <member>getDevice()</member> call) - they will then internally 149 optimize to the underlying graphics subsystem.<p> 150 151 @since OOo 2.0 152 */ 153published interface XCanvas : ::com::sun::star::uno::XInterface 154{ 155 /** Clear the whole canvas area.<p> 156 157 This method clears the whole canvas area to the device default 158 color (e.g. white for a printer, transparent for an 159 <type>XCustomSprite</type>). 160 */ 161 void clear(); 162 163 /** Draw a point in device resolution on the device. 164 165 @param aPoint 166 The point to draw. 167 168 @param aViewState 169 The viewstate to be used when drawing this point. 170 171 @param aRenderState 172 The renderstate to be used when drawing this point. 173 174 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 175 if one of the view and renderstate parameters are outside the 176 specified range. 177 */ 178 void drawPoint( [in] ::com::sun::star::geometry::RealPoint2D aPoint, [in] ViewState aViewState, [in] RenderState aRenderState ) 179 raises (com::sun::star::lang::IllegalArgumentException); 180 181 //------------------------------------------------------------------------- 182 183 /** Draw a line in device resolution width (i.e. one device pixel 184 wide). 185 186 @param aStartPoint 187 The start point of the line to draw. 188 189 @param aEndPoint 190 The end point of the line to draw. 191 192 @param aViewState 193 The viewstate to be used when drawing this line. 194 195 @param aRenderState 196 The renderstate to be used when drawing this line. 197 198 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 199 if one of the view and renderstate parameters are outside the 200 specified range. 201 */ 202 void drawLine( [in] ::com::sun::star::geometry::RealPoint2D aStartPoint, [in] ::com::sun::star::geometry::RealPoint2D aEndPoint, [in] ViewState aViewState, [in] RenderState aRenderState ) 203 raises (com::sun::star::lang::IllegalArgumentException); 204 205 //------------------------------------------------------------------------- 206 207 /** Draw a cubic bezier curve in device resolution width (i.e. one 208 device pixel wide). 209 210 @param aBezierSegment 211 The start and the two control points of the bezier curve. 212 213 @param aEndPoint 214 The end point of the bezier curve. 215 216 @param aViewState 217 The viewstate to be used when drawing this curve. 218 219 @param aRenderState 220 The renderstate to be used when drawing this curve. 221 222 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 223 if one of the view and renderstate parameters are outside the 224 specified range. 225 */ 226 void drawBezier( [in] ::com::sun::star::geometry::RealBezierSegment2D aBezierSegment, [in] ::com::sun::star::geometry::RealPoint2D aEndPoint, [in] ViewState aViewState, [in] RenderState aRenderState ) 227 raises (com::sun::star::lang::IllegalArgumentException); 228 229 //------------------------------------------------------------------------- 230 231 /** Draw a poly-polygon in device resolution line width (i.e. the 232 lines are one device pixel wide). 233 234 @param xPolyPolygon 235 The poly-polygon to draw. 236 237 @param aViewState 238 The viewstate to be used when drawing this polygon. 239 240 @param aRenderState 241 The renderstate to be used when drawing this polygon. 242 243 @return a handle to the cached rendering output. 244 245 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 246 if one of the view and renderstate parameters are outside the 247 specified range. 248 */ 249 XCachedPrimitive drawPolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState ) 250 raises (com::sun::star::lang::IllegalArgumentException); 251 252 //------------------------------------------------------------------------- 253 254 /** Stroke each polygon of the provided poly-polygon with the 255 specified stroke attributes.<p> 256 257 This method considers the stroking of all polygons as an 258 atomic operation in relation to the <type>RenderState</type>'s 259 <type>CompositeOperationy</type> operation. That means, 260 overlapping strokes from distinct polygons will look exactly 261 as overlapping segments of the same polygon, even with 262 transparency.<p> 263 264 @param xPolyPolygon 265 The poly-polygon to render. 266 267 @param aViewState 268 The viewstate to be used when stroking this polygon. 269 270 @param aRenderState 271 The renderstate to be used when stroking this polygon. 272 273 @param aStrokeAttributes 274 Further attributes used to parameterize the stroking. 275 276 @return a handle to the cached rendering output. 277 278 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 279 if one of the view and renderstate parameters are outside the 280 specified range. 281 */ 282 XCachedPrimitive strokePolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] StrokeAttributes aStrokeAttributes ) 283 raises (com::sun::star::lang::IllegalArgumentException); 284 285 //------------------------------------------------------------------------- 286 287 /** Stroke each polygon of the provided poly-polygon with the 288 specified stroke attributes, fill the stroked outline 289 with the specified texture graphics.<p> 290 291 This method considers the stroking of all polygons as an 292 atomic operation in relation to the <type>RenderState</type>'s 293 <type>CompositeOp</type> operation. That means, overlapping 294 strokes from distinct polygons will look exactly as 295 overlapping segments of the same polygon, even with 296 transparency.<p> 297 298 @param xPolyPolygon 299 The poly-polygon to render. 300 301 @param aViewState 302 The viewstate to be used when strokes this polygon. 303 304 @param aRenderState 305 The renderstate to be used when stroking this polygon. 306 307 @param aTextures 308 A sequence of texture definitions, with which to fill the 309 stroked area. 310 311 @param aStrokeAttributes 312 Further attributes used to parameterize the stroking. 313 314 @return a handle to the cached rendering output. 315 316 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 317 if one of the view and renderstate parameters are outside the 318 specified range. 319 320 @throws <type>VolatileContentDestroyedException</type> 321 if a texture bitmap was volatile, and the content was 322 destroyed before the rendering could take place. 323 */ 324 XCachedPrimitive strokeTexturedPolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] sequence<Texture> aTextures, [in] StrokeAttributes aStrokeAttributes ) 325 raises (com::sun::star::lang::IllegalArgumentException, 326 VolatileContentDestroyedException); 327 328 //------------------------------------------------------------------------- 329 330 /** Stroke each polygon of the provided poly-polygon with the 331 specified stroke attributes, fill the stroked outline 332 with the specified texture graphics, map the texture to the 333 outline via the specified texture mapping.<p> 334 335 This method considers the stroking of all polygons as an 336 atomic operation in relation to the <type>RenderState</type>'s 337 <type>CompositeOp</type> operation. That means, overlapping 338 strokes from distinct polygons will look exactly as 339 overlapping segments of the same polygon, even with 340 transparency. 341 342 @param xPolyPolygon 343 The poly-polygon to render. 344 345 @param aViewState 346 The viewstate to be used when stroking this polygon. 347 348 @param aRenderState 349 The renderstate to be used when stroking this polygon. 350 351 @param aTextures 352 A sequence of texture definitions, with which to fill the 353 stroked area. 354 355 @param xMapping 356 A bilinear mapping function which defines the warping of the 357 textures on the output area. 358 359 @param aStrokeAttributes 360 Further attributes used to parameterize the stroking. 361 362 @return a handle to the cached rendering output. 363 364 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 365 if one of the view and renderstate parameters are outside the 366 specified range. 367 368 @throws <type>VolatileContentDestroyedException</type> 369 if a texture bitmap was volatile, and the content was 370 destroyed before the rendering could take place. 371 */ 372 XCachedPrimitive strokeTextureMappedPolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] sequence<Texture> aTextures, [in] ::com::sun::star::geometry::XMapping2D xMapping, [in] StrokeAttributes aStrokeAttributes ) 373 raises (com::sun::star::lang::IllegalArgumentException, 374 VolatileContentDestroyedException); 375 376 //------------------------------------------------------------------------- 377 378 // [TODO: Method misplaced at this interface?] 379 380 /** Query the polygonal representation of the stroke outlines, as 381 it would be generated by the strokePolyPolygon methods.<p> 382 383 This method can be used to e.g. set a clipping which covers the same 384 area as a stroke.<p> 385 386 @param xPolyPolygon 387 The poly-polygon to render. 388 389 @param aViewState 390 The viewstate to be used when generating the outline. 391 392 @param aRenderState 393 The renderstate to be used when generating the outline. 394 395 @param aStrokeAttributes 396 Further attributes used to parameterize the stroking. 397 398 @return a poly-polygon describing the outline of the stroked 399 area. 400 401 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 402 if one of the view and renderstate parameters are outside the 403 specified range. 404 */ 405 XPolyPolygon2D queryStrokeShapes( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] StrokeAttributes aStrokeAttributes ) 406 raises (com::sun::star::lang::IllegalArgumentException); 407 408 //------------------------------------------------------------------------- 409 410 /** Fill the given poly-polygon.<p> 411 412 This method fills the given poly-polygon according to the 413 <type>RenderState</type>'s color and the poly-polygon's fill 414 rule.<p> 415 416 @param xPolyPolygon 417 The poly-polygon to render. 418 419 @param aViewState 420 The viewstate to be used when filling this polygon. 421 422 @param aRenderState 423 The renderstate to be used when filling this polygon. 424 425 @return a handle to the cached rendering output. 426 427 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 428 if one of the view and renderstate parameters are outside the 429 specified range. 430 */ 431 XCachedPrimitive fillPolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState ) 432 raises (com::sun::star::lang::IllegalArgumentException); 433 434 //------------------------------------------------------------------------- 435 436 /** Fill the given poly-polygon with a texture.<p> 437 438 This method fills the given poly-polygon according to the 439 <type>RenderState</type>'s color, the given textures and 440 poly-polygon's fill rule.<p> 441 442 @param xPolyPolygon 443 The poly-polygon to render. 444 445 @param aViewState 446 The viewstate to be used when filling this polygon. 447 448 @param aRenderState 449 The renderstate to be used when filling this polygon. 450 451 @param aTextures 452 A sequence of texture definitions, with which to fill the 453 polygonal area. 454 455 @return a handle to the cached rendering output. 456 457 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 458 if one of the view and renderstate parameters are outside the 459 specified range. 460 461 @throws <type>VolatileContentDestroyedException</type> 462 if a texture bitmap was volatile, and the content was 463 destroyed before the rendering could take place. 464 */ 465 XCachedPrimitive fillTexturedPolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] sequence<Texture> xTextures ) 466 raises (com::sun::star::lang::IllegalArgumentException, 467 VolatileContentDestroyedException); 468 469 //------------------------------------------------------------------------- 470 471 /** Fill the given poly-polygon with a mapped texture.<p> 472 473 This method fills the given poly-polygon according to the 474 <type>RenderState</type>'s color, the given textures and 475 poly-polygon's fill rule. The texture is mapped to the 476 poly-polygon's interior via the given texture mapping.<p> 477 478 @param xPolyPolygon 479 The poly-polygon to render. 480 481 @param aViewState 482 The viewstate to be used when filling this polygon. 483 484 @param aRenderState 485 The renderstate to be used when filling this polygon. 486 487 @param aTextures 488 A sequence of texture definitions, with which to fill the 489 polygonal area. 490 491 @param xMapping 492 A bilinear mapping function which defines the warping of the 493 textures on the output area. 494 495 @return a handle to the cached rendering output. 496 497 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 498 if one of the view and renderstate parameters are outside the 499 specified range. 500 501 @throws <type>VolatileContentDestroyedException</type> 502 if a texture bitmap was volatile, and the content was 503 destroyed before the rendering could take place. 504 */ 505 XCachedPrimitive fillTextureMappedPolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState, [in] sequence<Texture> xTextures, [in] ::com::sun::star::geometry::XMapping2D xMapping ) 506 raises (com::sun::star::lang::IllegalArgumentException, 507 VolatileContentDestroyedException); 508 509 //------------------------------------------------------------------------- 510 511 /** Create a suitable font for the specified font description. 512 513 @param aFontRequest 514 515 @param aExtraFontProperties 516 Additional font properties to be applied when selecting this 517 font. Normally, you should not need this parameter. Currently, 518 the following properties are recognized: 519 <ul> 520 521 <il>Kerning: a <type>double</type> between 0 and 1, where 522 0 completely disables kerning. Whether kerning is on or 523 off by default is font-dependent.</il> 524 525 <il>IsEmphasisMarks: a <type>boolean</type>, where <TRUE/> 526 enables automatic placements of emphasis marks, e.g. for 527 Hebrew. The default value, if this property is not 528 specified, is <FALSE/>.</il> 529 530 <il>ExpandedSpacing: a <type>double</type> value which is added 531 between all cell distances for this font. The default value for 532 this property is zero. Use negative values for condensed output, 533 and positive values for expanded output.</il> 534 535 <il>OptionalLayoutFeatures: a sequence of <type 536 scope=::com::sun::star::beans>PropertyValue</type> listing 537 font-specific optional layout features, like glyph 538 variants.</il> 539 540 </ul> 541 542 @param aFontMatrix 543 Font-specific transformation matrix, which affects both the 544 glyphs as well as the advancement. 545 546 @returns the requested font, or an invalid reference, if the 547 request failed. 548 549 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 550 if one of the parameters is not within the allowed range. 551 */ 552 XCanvasFont createFont( [in] FontRequest aFontRequest, [in] sequence< ::com::sun::star::beans::PropertyValue > aExtraFontProperties, [in] ::com::sun::star::geometry::Matrix2D aFontMatrix ) 553 raises (com::sun::star::lang::IllegalArgumentException); 554 555 //------------------------------------------------------------------------- 556 557 /** Query font information, specific to this canvas.<p> 558 559 @param aFilter 560 Filter parameter to reduce the list of returned fonts. Every 561 member of <type>FontInfo</type> that is not the empty string 562 or the "don't care" value restricts the list of returned fonts 563 to contain only those that have the specified attribute. 564 565 @param xFontProperties 566 This interface can provide additional font properties to 567 filter the list of available fonts against. 568 569 @returns the list of fonts matching the filter set. 570 571 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 572 if one of the font properties are invalid or not recognized, 573 or if one of the <type>FontInfo</type> members is not within 574 the permitted range. 575 */ 576 sequence< FontInfo > queryAvailableFonts( [in] FontInfo aFilter, [in] sequence< ::com::sun::star::beans::PropertyValue > aFontProperties ) 577 raises (com::sun::star::lang::IllegalArgumentException); 578 579 //------------------------------------------------------------------------- 580 581 /** Draw the text given by the substring of the specified string 582 with the given font.<p> 583 584 The local origin of this output operation is either the left 585 end of the text baseline, for textDirection equal 586 LEFT_TO_RIGHT, or the right end of the baseline, for 587 textDirection equal to RIGHT_TO_LEFT, respectively.<p> 588 589 @param aText 590 The text to output. 591 592 @param xFont 593 The font retrieved from this canvas to be used when drawing 594 the text. 595 596 @param aViewState 597 The viewstate to be used when drawing this text. 598 599 @param aRenderState 600 The renderstate to be used when drawing this text. 601 602 @param nTextDirection 603 A value from the <type>TextDirection</type> collection, 604 denoting the main writing direction for this string. The main 605 writing direction determines the origin of the text output, 606 i.e. the left edge for left-to-right and the right edge for 607 right-to-left text. 608 609 @return a handle to the cached rendering output. 610 611 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 612 if one of the view and renderstate parameters are outside the 613 specified range. 614 */ 615 XCachedPrimitive drawText( [in] StringContext aText, [in] XCanvasFont xFont, [in] ViewState aViewState, [in] RenderState aRenderState, [in] byte nTextDirection ) 616 raises (com::sun::star::lang::IllegalArgumentException); 617 618 //------------------------------------------------------------------------- 619 620 /** Draw the formatted text given by the text layout.<p> 621 622 The glyphs as represented by the text layout are always output 623 with the reference position being the leftmost edge of the 624 layout object's baseline. If the layout contains more than one 625 baseline, the baseline of the first strong character in 626 logical order is used here (strong in this context means that 627 the character can be unambiguously assigned to a unicode 628 script).<p> 629 630 @param xLayoutetText 631 An interface to the readily layouted text, obtained from a 632 <type>XCanvasFont</type> created at this canvas. The text 633 layout already carries intrinsic font information. 634 635 @param aViewState 636 The viewstate to be used when drawing this text. 637 638 @param aRenderState 639 The renderstate to be used when drawing this text. 640 641 @return a handle to the cached rendering output. 642 643 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 644 if one of the view and renderstate parameters are outside the 645 specified range. 646 */ 647 XCachedPrimitive drawTextLayout( [in] XTextLayout xLayoutetText, [in] ViewState aViewState, [in] RenderState aRenderState ) 648 raises (com::sun::star::lang::IllegalArgumentException); 649 650 //------------------------------------------------------------------------- 651 652 /** Render the given bitmap.<p> 653 654 This method renders the bitmap, at a position and shape as 655 specified by the combined view and render transformations. For 656 fast render speed, the bitmap should be created by the 657 corresponding <type>XGraphicDevice</type>'s 658 <member>XGraphicDevice::createCompatibleBitmap()</member> 659 method.<p> 660 661 @param xBitmap 662 The bitmap to render. 663 664 @param aViewState 665 The viewstate to be used when drawing this text. 666 667 @param aRenderState 668 The renderstate to be used when drawing this text. 669 670 @return a handle to the cached rendering output. 671 672 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 673 if one of the view and renderstate parameters are outside the 674 specified range. 675 676 @throws <type>VolatileContentDestroyedException</type> 677 if a texture bitmap was volatile, and the content was 678 destroyed before the rendering could take place. 679 */ 680 XCachedPrimitive drawBitmap( [in] XBitmap xBitmap, [in] ViewState aViewState, [in] RenderState aRenderState ) 681 raises (com::sun::star::lang::IllegalArgumentException, 682 VolatileContentDestroyedException); 683 684 /** Render the given bitmap, with a global color modulation.<p> 685 686 This method renders the bitmap, at a position and shape as 687 specified by the combined view and render transformations. For 688 fast render speed, the bitmap should be created by the 689 corresponding <type>XGraphicDevice</type>'s 690 <member>XGraphicDevice::createCompatibleBitmap()</member> 691 method. The bitmap's color channel values are multiplied with 692 the device color values as specified in the render state.<p> 693 694 @param xBitmap 695 The bitmap to render. 696 697 @param aViewState 698 The viewstate to be used when drawing this text. 699 700 @param aRenderState 701 The renderstate to be used when drawing this text. The device 702 color entry in the renderstate is multiplied with every pixel 703 color value, and only the result is rendered into the 704 canvas. If, for example, the bitmap should be rendered with 705 increased global transparency, set all device color channels 706 to 1.0, except for the alpha channel, which should be set to 707 the desired transparency. 708 709 @return a handle to the cached rendering output. 710 711 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 712 if one of the view and renderstate parameters are outside the 713 specified range. 714 715 @throws <type>VolatileContentDestroyedException</type> 716 if a texture bitmap was volatile, and the content was 717 destroyed before the rendering could take place. 718 */ 719 XCachedPrimitive drawBitmapModulated( [in] XBitmap xBitmap, [in] ViewState aViewState, [in] RenderState aRenderState ) 720 raises (com::sun::star::lang::IllegalArgumentException, 721 VolatileContentDestroyedException); 722 723 //------------------------------------------------------------------------- 724 725 /** Request the associated graphic device for this canvas.<p> 726 727 A graphic device provides methods specific to the underlying 728 output device capabilities, which are common for all canvases 729 rendering to such a device. This includes device resolution, 730 color space, or bitmap formats. 731 732 @return the associated <type>XGraphicDevice</type>. 733 */ 734 XGraphicDevice getDevice(); 735}; 736 737//============================================================================= 738 739/// Service providing an <type>XCanvas</type> interface 740service Canvas: XCanvas; 741 742}; }; }; }; 743 744#endif 745