office-gobmx/drawinglayer/CppunitTest_drawinglayer_border.mk
Miklos Vajna 422f10c5d7 tdf#99315 VclPixelProcessor2D: fix double border line width
Regression from commit 2c91cb08d6 (better
drawing support for borders of different width, fdo#33634, 2012-04-04),
the problem is that previously the width of inner/outer double border
lines got rounded to integer values quite early, but after the commit
they are kept at a double precision for much longer, which needs pixel
correction in VclPixelProcessor2D.

Example: if the border with is 1.47, and the line gets moved by 0.2
pixels, then the inner and outer edge of the line will be 0.2 and 1.67,
which gets rounded to 0 -> 2 in the pixel processor. Previously the
input was rounded to 1, so moving by 0.2 resulted in 0.2 -> 1.2, which
got rounded to 0 -> 1. The result is that sometimes the line width is 1
pixel wider than expected.

Fix the problem by allowing VclPixelProcessor2D to request pixel
correction from BorderLinePrimitive2D. It wouldn't be possible to do
pixel correction only in VclPixelProcessor2D, as it has no idea what to
correct: it only gets polygons, so it has no idea if e.g. the top of a
polygon is the outer edge of a top border line or an inner edge of a
bottom border line.

Change-Id: I1971f3a952fbcdc598ab46c659e12d976c13cbe6
Reviewed-on: https://gerrit.libreoffice.org/24221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-18 19:06:39 +00:00

52 lines
1.2 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,drawinglayer_border))
$(eval $(call gb_CppunitTest_use_api,drawinglayer_border,\
offapi \
udkapi \
))
$(eval $(call gb_CppunitTest_use_libraries,drawinglayer_border, \
basegfx \
cppu \
cppuhelper \
sal \
salhelper \
drawinglayer \
vcl \
test \
tl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_externals,drawinglayer_border,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_add_exception_objects,drawinglayer_border, \
drawinglayer/qa/unit/border \
))
$(eval $(call gb_CppunitTest_use_ure,drawinglayer_border))
$(eval $(call gb_CppunitTest_use_vcl,drawinglayer_border))
$(eval $(call gb_CppunitTest_use_components,drawinglayer_border,\
configmgr/source/configmgr \
i18npool/util/i18npool \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
))
$(eval $(call gb_CppunitTest_use_configuration,drawinglayer_border))
# vim: set noet sw=4 ts=4: