INTEGRATION: CWS presfixes02 (1.3.2); FILE MERGED
2005/03/14 16:03:07 thb 1.3.2.1: #i35136# #i36914# #i41113# #i44100# Merge from presfixes01 patches
This commit is contained in:
parent
02e9b4c3a5
commit
290f4ff7c5
1 changed files with 154 additions and 101 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: canvashelper.hxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: vg $ $Date: 2005-03-10 11:59:10 $
|
||||
* last change: $Author: rt $ $Date: 2005-03-30 07:37:00 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -76,6 +76,7 @@
|
|||
#include <canvas/vclwrapper.hxx>
|
||||
|
||||
#include "outdevprovider.hxx"
|
||||
#include "cachedbitmap.hxx"
|
||||
#include "windowgraphicdevice.hxx"
|
||||
|
||||
|
||||
|
@ -114,127 +115,171 @@ namespace vclcanvas
|
|||
|
||||
// XCanvas (only providing, not implementing the
|
||||
// interface. Also note subtle method parameter differences)
|
||||
void SAL_CALL drawPoint( const ::com::sun::star::geometry::RealPoint2D& aPoint,
|
||||
void drawPoint( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::geometry::RealPoint2D& aPoint,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
void drawLine( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
|
||||
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
void drawBezier( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
|
||||
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
drawPolyPolygon( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
strokePolyPolygon( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
strokeTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::rendering::Texture >& textures,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
strokeTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::rendering::Texture >& textures,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::geometry::XMapping2D >& xMapping,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
|
||||
queryStrokeShapes( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
fillPolyPolygon( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
fillTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::rendering::Texture >& textures );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
fillTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::rendering::Texture >& textures,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::geometry::XMapping2D >& xMapping );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >
|
||||
createFont( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::rendering::FontRequest& fontRequest,
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::beans::PropertyValue >& extraFontProperties,
|
||||
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
|
||||
|
||||
::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo >
|
||||
queryAvailableFonts( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::rendering::FontInfo& aFilter,
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::beans::PropertyValue >& aFontProperties );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
drawText( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::rendering::StringContext& text,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XCanvasFont >& xFont,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
sal_Int8 textDirection );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
drawTextLayout( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XTextLayout >& layoutetText,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
drawBitmap( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XBitmap >& xBitmap,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
drawBitmapModulated( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XBitmap >& xBitmap,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
void SAL_CALL drawLine( const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
|
||||
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
void SAL_CALL drawBezier( const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
|
||||
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
drawPolyPolygon( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
strokePolyPolygon( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
strokeTexturedPolyPolygon( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::Texture >& textures,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
strokeTextureMappedPolyPolygon( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::Texture >& textures,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::geometry::XMapping2D >& xMapping,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL
|
||||
queryStrokeShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
fillPolyPolygon( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
fillTexturedPolyPolygon( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::Texture >& textures );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
fillTextureMappedPolyPolygon( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::Texture >& textures,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::geometry::XMapping2D >& xMapping );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL
|
||||
createFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
|
||||
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
|
||||
|
||||
::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo > SAL_CALL
|
||||
queryAvailableFonts( const ::com::sun::star::rendering::FontInfo& aFilter,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aFontProperties );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
drawText( const ::com::sun::star::rendering::StringContext& text,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >& xFont,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
sal_Int8 textDirection );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
drawTextLayout( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout >& layoutetText,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
drawBitmap( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >& xBitmap,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > SAL_CALL
|
||||
drawBitmapModulated( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >& xBitmap,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice > SAL_CALL
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >
|
||||
getDevice();
|
||||
|
||||
// BitmapCanvasHelper functionality
|
||||
// ================================
|
||||
|
||||
void SAL_CALL copyRect( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas >& sourceCanvas,
|
||||
const ::com::sun::star::geometry::RealRectangle2D& sourceRect,
|
||||
const ::com::sun::star::rendering::ViewState& sourceViewState,
|
||||
const ::com::sun::star::rendering::RenderState& sourceRenderState,
|
||||
const ::com::sun::star::geometry::RealRectangle2D& destRect,
|
||||
const ::com::sun::star::rendering::ViewState& destViewState,
|
||||
const ::com::sun::star::rendering::RenderState& destRenderState );
|
||||
void copyRect( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XBitmapCanvas >& sourceCanvas,
|
||||
const ::com::sun::star::geometry::RealRectangle2D& sourceRect,
|
||||
const ::com::sun::star::rendering::ViewState& sourceViewState,
|
||||
const ::com::sun::star::rendering::RenderState& sourceRenderState,
|
||||
const ::com::sun::star::geometry::RealRectangle2D& destRect,
|
||||
const ::com::sun::star::rendering::ViewState& destViewState,
|
||||
const ::com::sun::star::rendering::RenderState& destRenderState );
|
||||
|
||||
::com::sun::star::geometry::IntegerSize2D SAL_CALL getSize();
|
||||
::com::sun::star::geometry::IntegerSize2D getSize();
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > SAL_CALL queryBitmapCanvas();
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > queryBitmapCanvas();
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > SAL_CALL
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
|
||||
getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
|
||||
sal_Bool beFast );
|
||||
|
||||
::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
|
||||
::com::sun::star::uno::Sequence< sal_Int8 >
|
||||
getData( const ::com::sun::star::geometry::IntegerRectangle2D& rect );
|
||||
|
||||
void SAL_CALL setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
|
||||
void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
|
||||
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
|
||||
|
||||
void SAL_CALL setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
|
||||
void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
|
||||
const ::com::sun::star::geometry::IntegerPoint2D& pos );
|
||||
|
||||
::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
|
||||
::com::sun::star::uno::Sequence< sal_Int8 >
|
||||
getPixel( const ::com::sun::star::geometry::IntegerPoint2D& pos );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapPalette > SAL_CALL getPalette();
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapPalette > getPalette();
|
||||
|
||||
::com::sun::star::rendering::IntegerBitmapLayout SAL_CALL getMemoryLayout();
|
||||
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
|
||||
|
||||
/// Repaint a cached bitmap
|
||||
bool repaint( const GraphicObjectSharedPtr& rGrf,
|
||||
const ::Point& rPt,
|
||||
const ::Size& rSz,
|
||||
const GraphicAttr& rAttr ) const;
|
||||
|
||||
// Flush drawing queue to screen (only works for Window outdev)
|
||||
void flush() const;
|
||||
|
@ -247,7 +292,7 @@ namespace vclcanvas
|
|||
// returns transparency of color
|
||||
int setupOutDevState( const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
ColorType eColorType );
|
||||
ColorType eColorType );
|
||||
protected:
|
||||
/// Phyical output device
|
||||
WindowGraphicDevice::ImplRef mxDevice;
|
||||
|
@ -263,6 +308,14 @@ namespace vclcanvas
|
|||
CanvasHelper(const CanvasHelper&);
|
||||
CanvasHelper& operator=( const CanvasHelper& );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
|
||||
implDrawBitmap( const ::com::sun::star::rendering::XCanvas& rCanvas,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::rendering::XBitmap >& xBitmap,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
bool bModulateColors );
|
||||
|
||||
bool setupTextOutput( ::Point& o_rOutPos,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
const ::com::sun::star::rendering::RenderState& renderState,
|
||||
|
|
Loading…
Reference in a new issue