diff options
Diffstat (limited to 'canvas/source/directx/dx_bitmap.cxx')
-rw-r--r-- | canvas/source/directx/dx_bitmap.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/canvas/source/directx/dx_bitmap.cxx b/canvas/source/directx/dx_bitmap.cxx index 524e3a6fdd2d..9e5f2348fa4f 100644 --- a/canvas/source/directx/dx_bitmap.cxx +++ b/canvas/source/directx/dx_bitmap.cxx @@ -23,7 +23,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2irange.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include "dx_bitmap.hxx" #include "dx_graphicsprovider.hxx" @@ -47,8 +47,8 @@ namespace dxcanvas { } - DXBitmap::DXBitmap( const ::basegfx::B2IVector& rSize, - bool bWithAlpha ) : + DXBitmap::DXBitmap( const ::basegfx::B2ISize& rSize, + bool bWithAlpha ) : mpGdiPlusUser( GDIPlusUser::createInstance() ), maSize(rSize), mpBitmap(), @@ -59,19 +59,19 @@ namespace dxcanvas if(mbAlpha) { mpBitmap = std::make_shared<Gdiplus::Bitmap>( - maSize.getX(), - maSize.getY(), + maSize.getWidth(), + maSize.getHeight(), PixelFormat32bppARGB); } else { mpBitmap = std::make_shared<Gdiplus::Bitmap>( - maSize.getX(), - maSize.getY(), + maSize.getWidth(), + maSize.getHeight(), PixelFormat24bppRGB); } - mpGraphics.reset( tools::createGraphicsFromBitmap(mpBitmap) ); + mpGraphics = tools::createGraphicsFromBitmap(mpBitmap); } BitmapSharedPtr DXBitmap::getBitmap() const @@ -84,7 +84,7 @@ namespace dxcanvas return mpGraphics; } - ::basegfx::B2IVector DXBitmap::getSize() const + ::basegfx::B2ISize DXBitmap::getSize() const { return maSize; } @@ -154,7 +154,7 @@ namespace dxcanvas // getMemoryLayout &aBmpData ) ) { - throw uno::RuntimeException(); + throw uno::RuntimeException("Internal error while writing BitmapData into Bitmap"); } // commit data to bitmap @@ -165,7 +165,7 @@ namespace dxcanvas const rendering::IntegerBitmapLayout& /*bitmapLayout*/, const geometry::IntegerPoint2D& pos ) { - const geometry::IntegerSize2D aSize( maSize.getX(),maSize.getY() ); + const geometry::IntegerSize2D aSize( maSize.getWidth(),maSize.getHeight() ); ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aSize.Width, "CanvasHelper::setPixel: X coordinate out of bounds" ); @@ -177,14 +177,14 @@ namespace dxcanvas if( Gdiplus::Ok != mpBitmap->SetPixel( pos.X, pos.Y, Gdiplus::Color( tools::sequenceToArgb( color )))) { - throw uno::RuntimeException(); + throw uno::RuntimeException("SetPixel called with invalid x,y points or color"); } } uno::Sequence< sal_Int8 > DXBitmap::getPixel( rendering::IntegerBitmapLayout& /*bitmapLayout*/, const geometry::IntegerPoint2D& pos ) { - const geometry::IntegerSize2D aSize( maSize.getX(),maSize.getY() ); + const geometry::IntegerSize2D aSize( maSize.getWidth(),maSize.getHeight() ); ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aSize.Width, "CanvasHelper::getPixel: X coordinate out of bounds" ); |