summaryrefslogtreecommitdiff
path: root/svtools/Library_svt.mk
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2022-11-06 13:57:11 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-11-08 11:16:30 +0100
commit444bf8710d5da7b584fbcb94693e4ed8d2e29297 (patch)
treeb785047790b44ae5b8ce4d3166d8edfe8f691568 /svtools/Library_svt.mk
parentb9eaed7a4c484dde0b5c61b34b4beb60a101f661 (diff)
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>
Diffstat (limited to 'svtools/Library_svt.mk')
-rw-r--r--svtools/Library_svt.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index a2bc1aad7ccf..ec2405d65636 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Library_use_libraries,svt,\
comphelper \
cppu \
cppuhelper \
+ drawinglayercore \
i18nlangtag \
i18nutil \
$(if $(ENABLE_JAVA), \