svgdata.cxx (ddde725d) | svgdata.cxx (2758680c) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 16 unchanged lines hidden (view full) --- 25#include <vcl/svgdata.hxx> 26#include <comphelper/processfactory.hxx> 27#include <com/sun/star/lang/XMultiServiceFactory.hpp> 28#include <com/sun/star/graphic/XSvgParser.hpp> 29#include <com/sun/star/graphic/XPrimitive2DRenderer.hpp> 30#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp> 31#include <vcl/canvastools.hxx> 32#include <comphelper/seqstream.hxx> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 16 unchanged lines hidden (view full) --- 25#include <vcl/svgdata.hxx> 26#include <comphelper/processfactory.hxx> 27#include <com/sun/star/lang/XMultiServiceFactory.hpp> 28#include <com/sun/star/graphic/XSvgParser.hpp> 29#include <com/sun/star/graphic/XPrimitive2DRenderer.hpp> 30#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp> 31#include <vcl/canvastools.hxx> 32#include <comphelper/seqstream.hxx> |
33#include <vcl/svapp.hxx> 34#include <vcl/outdev.hxx> |
|
33 34////////////////////////////////////////////////////////////////////////////// 35 36using namespace ::com::sun::star; 37 38////////////////////////////////////////////////////////////////////////////// 39 40void SvgData::ensureReplacement() --- 16 unchanged lines hidden (view full) --- 57 uno::Sequence< beans::PropertyValue > aViewParameters; 58 const basegfx::B2DRange& rRange(getRange()); 59 geometry::RealRectangle2D aRealRect; 60 61 aRealRect.X1 = rRange.getMinX(); 62 aRealRect.Y1 = rRange.getMinY(); 63 aRealRect.X2 = rRange.getMaxX(); 64 aRealRect.Y2 = rRange.getMaxY(); | 35 36////////////////////////////////////////////////////////////////////////////// 37 38using namespace ::com::sun::star; 39 40////////////////////////////////////////////////////////////////////////////// 41 42void SvgData::ensureReplacement() --- 16 unchanged lines hidden (view full) --- 59 uno::Sequence< beans::PropertyValue > aViewParameters; 60 const basegfx::B2DRange& rRange(getRange()); 61 geometry::RealRectangle2D aRealRect; 62 63 aRealRect.X1 = rRange.getMinX(); 64 aRealRect.Y1 = rRange.getMinY(); 65 aRealRect.X2 = rRange.getMaxX(); 66 aRealRect.Y2 = rRange.getMaxY(); |
65 | 67 68 // get system DPI 69 const Size aDPI(Application::GetDefaultDevice()->LogicToPixel(Size(1, 1), MAP_INCH)); 70 |
66 const uno::Reference< rendering::XBitmap > xBitmap( 67 xPrimitive2DRenderer->rasterize( 68 maSequence, 69 aViewParameters, | 71 const uno::Reference< rendering::XBitmap > xBitmap( 72 xPrimitive2DRenderer->rasterize( 73 maSequence, 74 aViewParameters, |
70 72, 71 72, | 75 aDPI.getWidth(), 76 aDPI.getHeight(), |
72 aRealRect, 73 500000)); 74 75 if(xBitmap.is()) 76 { 77 const uno::Reference< rendering::XIntegerReadOnlyBitmap> xIntBmp(xBitmap, uno::UNO_QUERY_THROW); 78 79 if(xIntBmp.is()) --- 115 unchanged lines hidden --- | 77 aRealRect, 78 500000)); 79 80 if(xBitmap.is()) 81 { 82 const uno::Reference< rendering::XIntegerReadOnlyBitmap> xIntBmp(xBitmap, uno::UNO_QUERY_THROW); 83 84 if(xIntBmp.is()) --- 115 unchanged lines hidden --- |