diff options
Diffstat (limited to 'canvas/source/cairo')
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 1 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_textlayout.cxx | 4 | ||||
-rw-r--r-- | canvas/source/cairo/cairocanvas.component | 37 | ||||
-rw-r--r-- | canvas/source/cairo/exports.dxp | 1 | ||||
-rw-r--r-- | canvas/source/cairo/makefile.mk | 8 |
5 files changed, 48 insertions, 3 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index eec6a09fb215..60647d4f8224 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -1395,6 +1395,7 @@ namespace cairocanvas ::rtl::math::approxEqual( aMatrix.x0, 0 ) && ::rtl::math::approxEqual( aMatrix.y0, 0 ) ) cairo_set_operator( mpCairo.get(), CAIRO_OPERATOR_SOURCE ); + cairo_pattern_set_extend( cairo_get_source(mpCairo.get()), CAIRO_EXTEND_PAD ); cairo_rectangle( mpCairo.get(), 0, 0, aBitmapSize.Width, aBitmapSize.Height ); cairo_clip( mpCairo.get() ); diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index dfe2071c3726..d0873b63f5f0 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -521,8 +521,8 @@ namespace cairocanvas nWidth = aFont.GetHeight(); } else { // any scaling needs to be relative to the platform-dependent definition - // of width of the font - nWidth = aFont.GetHeight() * aFont.GetWidth() / aMetric.GetWidth(); + // of height of the font + nWidth = aFont.GetWidth() * aFont.GetHeight() / aMetric.GetHeight(); } cairo_matrix_init_identity(&m); diff --git a/canvas/source/cairo/cairocanvas.component b/canvas/source/cairo/cairocanvas.component new file mode 100644 index 000000000000..126ad2b44ee1 --- /dev/null +++ b/canvas/source/cairo/cairocanvas.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.rendering.Canvas.Cairo"> + <service name="com.sun.star.rendering.Canvas.Cairo"/> + </implementation> + <implementation name="com.sun.star.comp.rendering.SpriteCanvas.Cairo"> + <service name="com.sun.star.rendering.SpriteCanvas.Cairo"/> + </implementation> +</component> diff --git a/canvas/source/cairo/exports.dxp b/canvas/source/cairo/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/canvas/source/cairo/exports.dxp +++ b/canvas/source/cairo/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk index b0ff10fe96b0..040acd9ade8f 100644 --- a/canvas/source/cairo/makefile.mk +++ b/canvas/source/cairo/makefile.mk @@ -130,3 +130,11 @@ DEF1EXPORTFILE=exports.dxp # ========================================================================== .INCLUDE : target.mk + +ALLTAR : $(MISC)/cairocanvas.component + +$(MISC)/cairocanvas.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component |