office-gobmx/drawinglayer/Library_drawinglayercore.mk

55 lines
1.5 KiB
Makefile
Raw Normal View History

# -*- 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_Library_Library,drawinglayercore))
$(eval $(call gb_Library_set_include,drawinglayercore,\
$$(INCLUDE) \
-I$(SRCDIR)/drawinglayer/inc \
))
$(eval $(call gb_Library_add_defs,drawinglayercore,\
-DDRAWINGLAYERCORE_DLLIMPLEMENTATION \
))
$(eval $(call gb_Library_set_precompiled_header,drawinglayercore,drawinglayer/inc/pch/precompiled_drawinglayercore))
$(eval $(call gb_Library_use_sdk_api,drawinglayercore))
$(eval $(call gb_Library_use_externals,drawinglayercore,\
boost_headers \
))
$(eval $(call gb_Library_use_libraries,drawinglayercore,\
basegfx \
comphelper \
cppu \
cppuhelper \
i18nlangtag \
sal \
salhelper \
svl \
tl \
utl \
))
Update handling of AntiAliasing settings and processor2d Currently SvtOptionsDrawinglayer::IsAntiAliasing() is used in the constructor of the VCL based processor2Ds to decide if AA is to be used or not. Using this inside the constructors makes it currently impossible to use a primitive renderer independent from these settings, except when changing these settings temporarily what may influence other renderings and is a hack. The setting SvtOptionsDrawinglayer::IsAntiAliasing() is intended to decide if LO shall use AA mode from user's perspective, this means for the EditViews of the Apps and some other occasions (previews, exports, conversions to bitmap, ...). This works currently since all visualizations for these purposes use newly constructed primitive renderers. But there is no way to use primitive renderers independent from that setting. For future renderers which might be used for other purposes this is not sufficient, there has to be a method to create a renderer using e.g. AA independent of the global setting. To allow that, move the deciding flag to the already used geometry::ViewInformation2D. To not change anything initially, use the global flag for now to init that default value at ViewInformation2D. I took the opportunity to adapt ViewInformation2D to no longer being read-only and not changeable, it uses internally an impl class based on cow_wrapper already anyways. Extending this would lead to the constructors getting even bigger, when usually only 1-3 values need to be changed and many usages want to copy an existing instance and modify it. Adapted that usages to a much smaller footprint. Up to this point this does not change anything, but move the usage of the SvtOptionsDrawinglayer to the defaults (constructors) of the involved class ViewInformation2D. Using this then in the primitive rederers should be safe and will allow to use a primitive renderer with or without AntiAliasing independent of the user setting, so also for non- EditView usages. Also already added the PixelSnapHairline setting, this will also be needed independent of user settings to have full freedom of usage. Unfortunately I cannot use SvtOptionsDrawinglayer methods ::IsAntiAliasing() or ::IsSnapHorVerLinesToDiscrete inside ViewInformation2D where I would need it. It's now in drawinglayercore and thus not linked against svtools (svt) anymore. Thus I have to do some forwarding mechanisms to get the correct values available in ViewInformation2D. Not nice, caused by creating drawinglayercore... Change-Id: I9f572ce67e5d86a242188bdc6d4ba7c9a12f6a9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142393 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-11-06 06:57:11 -06:00
$(eval $(call gb_Library_use_custom_headers,drawinglayercore,\
officecfg/registry \
))
$(eval $(call gb_Library_add_exception_objects,drawinglayercore,\
drawinglayer/source/primitive2d/baseprimitive2d \
drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D \
drawinglayer/source/primitive2d/Primitive2DContainer \
drawinglayer/source/primitive2d/Tools \
drawinglayer/source/geometry/viewinformation2d \
))
# vim: set noet sw=4 ts=4: