Commit Graph
966 Commits
Author SHA1 Message Date
Daniel b5ce576453 tdf#114441 Replace sal_uLong with sal_uInt64
GetOutputWidthPixel() and GetOutputHeightPixel() both return a value of
type tools::Long, representing an offset width and height in pixels.
Since aSquare and aCandidateSquare multiply these values, it seems
reasonable to use sal_uInt64 here just in case of larger displays.

Change-Id: Idacf8e7c43e884b72699ee1d521d1e0dbf4715a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194942
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-12-03 10:52:53 +01:00
Caolán McNamara 8e764204b4 tdf#158036 Incorrect positioning of rotated SVG text when padding is applied
this path is no longer the default for gtk3 where the SDPR renderer is
the default so there:

export DISABLE_SYSTEM_DEPENDENT_PRIMITIVE_RENDERER=1

is needed, though it is still the default for the gen backend, so that
can be used too

Change-Id: If64b7805ee4987ceab5af99decdf755280270e02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194079
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-11-18 12:16:40 +01:00
Noel Grandin 074bdd6962 tdf#168721 Fade in animation on grouped shapes not shown
There is definitely a better fix for this, we should not need two
different bitmaps and masking and stuff, but this will fix the problem for now.

Mostly revert the following commits:

commit 7278030b92
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Mon Sep 15 16:26:25 2025 +0200
remove unused DrawModeFlags

commit 581c52dad2
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Wed Sep 10 15:08:04 2025 +0200
BitmapAlphaClampFilter is dead since

commit e7b460f919
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Sat Aug 30 15:23:11 2025 +0200
BitmapEx->Bitmap in canvas

Change-Id: Ic5747ce6143a8320f977111c7635bf736a9996d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193873
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-13 06:57:13 +01:00
Christopher Sherlock e3ea978616 vcl: remove OutputDevice::DrawBitmapEx()
This also streamlines DrawBitmapWallpaper()

Change-Id: I694667147319ba9d235348068ed8fc811447fae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190898
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-11-11 07:16:00 +01:00
Armin Le Grand (allotropia) d2accdad4b reduce memory usage when rendering cairo-backed Bitmaps
Change-Id: I1353e8fb044203b377c2a1f17767f690a9796367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184301
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-10-25 09:30:35 +02:00
Noel Grandin 2fab731ec2 crashtesting fdo62899-1.svg
after
    commit 5707b5dce7
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Tue Oct 14 15:53:59 2025 +0200
    tdf#101083 speed up SVG rendering with pattern fill (2)

Apparently mpTargetOutputDevice is nullptr when run on the crashtesting machine, but I dont see that on my machine.

Change-Id: Ic281e2245524f330002f10d5271c3075fdfc1ab1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192908
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-23 18:47:00 +02:00
Christopher Sherlock 500442846f vcl: move PDFWriter into vcl::pdf namespace
Change-Id: If2ceabafc72ed1d719876778de3d48511203e045
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192287
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-10-23 06:53:27 +02:00
Noel Grandin 40e5bc6e68 lets have just one getB2DRange function/method
Change-Id: I5081abca177c6fb8bd21d971d93dc115d57de294
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192589
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-10-19 12:13:53 +02:00
Noel Grandin f5b8ec6b3f tdf#168730 impBufferDevice and caller should have the same mask rect
VclPixelProcessor2D::processPatternFillPrimitive2D and
impBufferDevice were independently calculating the mask rect in
different ways. So move the calculation to the callers.

This only fixed a tiny part of the problems in this bugreport,
it just helps with off-by-one at zoom levels.

Change-Id: I933f5271e31ba79794951a6b1f469fc28094d0a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192572
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-10-18 10:52:29 +02:00
Noel Grandin baee03e387 optimise processPatternFillPrimitive2D a little
we can skip the intermediate impBufferDevice if we are doing a flood fill

Change-Id: Ia37251d362ad6421ae0beb7ae1cf1f25d293b851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192431
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-10-15 18:47:51 +02:00
Noel Grandin 5707b5dce7 tdf#101083 speed up SVG rendering with pattern fill (2)
This is the same thing I did in

    commit 3cbe3a0259
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Mon Jun 14 15:05:59 2021 +0200
    tdf#101083 speed up SVG rendering with pattern fill

but cut and paste from the VclPixelProcessor2D to the CairoPixelProcessor2D code.

Which makes this SVG render in reasonable time when using the cairo backend.

We can probably do even better by cutting out the usage of VCL here, but this
is good enough for now.

Change-Id: I959539741eef627b25702c91cad3e5f8ee2b3176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-10-15 10:38:31 +02:00
Christopher Sherlock c4c93d1a3e vcl: pdfwriter_impl1.cxx and pdfwriter_impl2.cxx from gdi/ to pdf/ directory
Update clang plugin.

Change-Id: I0d862e8c08ef829d4f452108fec6176532af3ecb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190712
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-09-29 09:36:45 +02:00
Khaled Hosny 1bdf1e2d52 tdf#168371: Disable ligatures in Impress/Draw with character spacing
This is follow up to commit:

commit b9f0caad5d
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Tue Aug 23 04:13:28 2022 +0200

    tdf#66819: Disable ligatures with character spacing

Even though editengine was applying letter spacing, when drawing with
drawinglayer, letter spacing was not propagated which caused VCL to not
disable the ligature features.

Change-Id: Ia8bf2231478720262484a757e16fe5afec3cd28e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191512
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2025-09-25 18:52:49 +02:00
Noel Grandin e565a0d634 tdf#168392 Disappearing image fill at lower zoom
regression from
  commit cd93f83bbc
  Author: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
  Date:   Thu Aug 7 21:02:41 2025 +0200
  tdf#167831 avoid painting bitmap data with zero dimensions

we cannot skip these fills if the fill bitmap is too small,
we need to fill with something or the resulting picture
is very wrong

Change-Id: I194b59414db8f675df2415c3ee4fb9a0305611b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190981
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-19 16:56:24 +02:00
Gabor Kelemen cf1403343d tdf#146619 Run IWYU on drawinglayer/
Change-Id: I0cdefb89bedfbe4d733edb89c9ed2e7a9b37c947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190907
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-09-17 19:23:05 +02:00
Noel Grandin b3c7eaf9d3 removed unused DrawModeFlags
DrawModeFlags::BlackGradient is dead since
  commit e7b460f919
  Author: Noel Grandin <noel.grandin@collabora.co.uk>
  Date:   Sat Aug 30 15:23:11 2025 +0200
  BitmapEx->Bitmap in canvas

DrawModeFlags::WhiteText is dead since
  commit 81994cb2b8
  Author: Noel Grandin <noelgrandin@gmail.com>
  Date:   Fri Apr 16 20:33:10 2021 +0200
  Convert internal vcl bitmap formats transparency->alpha (II)

Change-Id: I3405962f1293f0f2ea9619e009bf048fc2c35c95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190999
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-16 08:05:28 +02:00
Noel Grandin 7278030b92 remove unused DrawModeFlags
DrawModeFlags::BlackBitmap is dead since
  commit e7b460f919
  Author: Noel Grandin <noel.grandin@collabora.co.uk>
  Date:   Sat Aug 30 15:23:11 2025 +0200
  BitmapEx->Bitmap in canvas

DrawModeFlags::WhiteBitmap is dead since
  commit 81994cb2b8
  Author: Noel Grandin <noelgrandin@gmail.com>
  Date:   Fri Apr 16 20:33:10 2021 +0200
  Convert internal vcl bitmap formats transparency->alpha (II)

Change-Id: I933d5416300850e624c3b438d00d986c787e0a05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190977
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-15 21:48:14 +02:00
Noel Grandin f109008fea tdf#149592 Importing SVG with too small scaling causes bad performance
decomposing pattern-fill primitives is very bad for performance

Change-Id: Id754e55350b6a75e4f585db890397e6bb7380867
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190707
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-09 15:40:32 +02:00
Noel Grandin 6d0e5ddede remove BitmapEx
all use-sites have been converted to Bitmap

Change-Id: I1a8842217a266eef100bd387ab013b004e532256
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190618
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-05 19:45:45 +02:00
Noel Grandin a59ef851c3 BitmapEx->Bitmap in impBufferDevice
now that Bitmap supports transparency

Change-Id: I265d356e13c6cd8c1a34835e53b2386548cffb98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190596
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-04 20:20:13 +02:00
Noel Grandin aba63efcdb converting the SalGraphics backend from BitmapEx->Bitmap (3)
pass a single SalBitmap in drawTransformedBitmap

Change-Id: Iacb67804e47867f4ab85b394b14f052807925b75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-04 17:06:46 +02:00
Noel Grandin 7f35303c31 remove setters from MetaAction classes
to make it obvious these are constructed once and then (mostly) not changed

Change-Id: Iebba987736755bdb0974c9adf9cd333ac004c574
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190584
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-04 17:06:26 +02:00
Noel Grandin 2c179e7225 BitmapEx->Bitmap in some of the OutputDevice::Draw methods
now that most of the client code is using Bitmap

Change-Id: I9370f388afba5d3ad1628d42309fa70ab44f7812
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-03 12:36:43 +02:00
Noel Grandin 7c0163e0cb BitmapEx->Bitmap in some comments
leftover from earlier conversion

Change-Id: I8d2f5a79709ef0975c444697f67e762a4cc9b28d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190484
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-01 22:26:49 +02:00
Noel Grandin faf25383bb BitmapEx->Bitmap in directx pixel processor
now that Bitmap supports transparency

Change-Id: I51e9bd182b38905e3e8626ec5a2c8ee3d37fdd05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190479
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-01 18:22:41 +02:00
Noel Grandin c0afb3514f add new Bitmap constructors
to move the logic of constructing a new Bitmap from an existing Bitmap and an AlphaMask,
into vcl, where it can later be optimised

Change-Id: I2af1c6d1a35d968abdd07546448f7e211772e70b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190366
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-29 17:53:22 +02:00
Noel Grandin ee98538e8e crashtesting ooo57177-1.doc
regression from
    commit c2fedef548
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Wed Aug 6 20:35:05 2025 +0200
    BitmapEx->Bitmap in Graphic

the problem here, is that we are now allocating a single 32-bit bitmap instead
of a 24-bit bitmap and an 8-bit bitmap.

The crashtesting file has an image of size 17000 x 17000, which hits the

     size > SAL_MAX_INT32/2

check in ImplCreateDIB the svp backend.

Change-Id: Ic76eb03adeedcfbb7d60e78405641035e3eb7087
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190323
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-28 15:11:42 +02:00
Noel Grandin 4c85558251 BitmapEx->Bitmap in drawinglayer
now that Bitmap supports transparency

Change-Id: I1894a0187d6f661ad10aa631c55fc3ea66ff1d3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190224
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-26 17:33:59 +02:00
Caolán McNamara 3fba303985 cid#1665114 Variable copied when it could be moved
and

cid#1665115 Variable copied when it could be moved

Change-Id: I7ebc4baeae449f969e58fbd167149d010e0f043a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190025
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-21 21:51:10 +02:00
Noel Grandin 66b0aab258 use Graphic::GetBitmap instead of Graphic::GetBitmapEx
in places where we want a Bitmap

Change-Id: I70acdfde07df5bda84aa21143b2a0aca98023fe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189675
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-21 20:54:31 +02:00
Caolán McNamara dc584b4dd8 always pass fCandidateLength in at the boundary
Change-Id: Idcddf4e576bb74f241c532fbf66b8772f3cd1c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189932
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-20 09:25:44 +02:00
Noel Grandin 2ed3f9e32c BitmapEx->Bitmap in VclProcessor2D
now that Bitmap can handle transparency.
This points out a bug in Bitmap::Modify

Change-Id: I4774727d235493fdaad054cf36f2d2a36b1db32d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189936
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-20 08:59:15 +02:00
Noel Grandin 15abc0aa75 BitmapEx->Bitmap in drawinglayer
now that Bitmap supports transparency

Change-Id: I37d358db5b68cd500349f1084eb3a65cfd83aa4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189898
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-20 08:59:03 +02:00
Mike Kaganski 9cb2014718 Use OutputDevice::ScopedPush in drawinglayer
Change-Id: I4d8ce3ffe50eb572da6582a9939d0c658cf93131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189797
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-16 22:36:58 +02:00
Caolán McNamara 84e9f30fef cid#1660340 silence Division or modulo by float zero
and

cid#1660450 silence Division or modulo by float zero

we're guarded against this already

Change-Id: I4ef9a8febccfc34b7be8514e4c0720307960dcb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189726
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-16 15:13:09 +02:00
Mike Kaganski 07d80edb0b Fix relative position to pixel index calculation
After commit 7caf45bc06 (BitmapEx->Bitmap
in HitTestProcessor2D, 2025-08-15), I saw a crash when hovering mouse
over a bitmap on a slide:

  vcllo.dll!BitmapReadAccess::GetScanline(__int64 nY) Line 50
  vcllo.dll!BitmapReadAccess::GetColor(__int64 nY, __int64 nX) Line 100
  vcllo.dll!Bitmap::GetPixelColor(long nX, long nY) Line 1894
  drawinglayerlo.dll!drawinglayer::processor2d::HitTestProcessor2D::checkBitmapHit(basegfx::B2DRange aRange, const Bitmap & rBitmap, const basegfx::B2DHomMatrix & rTransform) Line 174
  drawinglayerlo.dll!drawinglayer::processor2d::HitTestProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 478
  drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::visit(const rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> & rCandidate) Line 50
  drawinglayercorelo.dll!drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor, const drawinglayer::geometry::ViewInformation2D & rViewInformation) Line 81
  drawinglayerlo.dll!drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor, const drawinglayer::geometry::ViewInformation2D & rViewInformation) Line 46
  drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::process(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 43
  drawinglayerlo.dll!drawinglayer::processor2d::HitTestProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D & rCandidate) Line 553
  drawinglayerlo.dll!drawinglayer::processor2d::BaseProcessor2D::process(const drawinglayer::primitive2d::Primitive2DContainer & rSource) Line 67
  svxcorelo.dll!sdr::overlay::OverlayObjectList::isHitLogic(const basegfx::B2DPoint & rLogicPosition, double fLogicTolerance) Line 94
  svxcorelo.dll!SdrHdl::IsHdlHit(const Point & rPnt) Line 948
  svxcorelo.dll!SdrHdlList::IsHdlListHit(const Point & rPnt) Line 2306
  svxcorelo.dll!SdrMarkView::PickHandle(const Point & rPnt) Line 2117
  svxcorelo.dll!SdrMarkView::MouseMove(const MouseEvent & rMEvt, OutputDevice * pWin) Line 1849
  svxcorelo.dll!SdrObjEditView::MouseMove(const MouseEvent & rMEvt, OutputDevice * pWin) Line 2210
  svxcorelo.dll!SdrCreateView::MouseMove(const MouseEvent & rMEvt, OutputDevice * pWin) Line 314
  svxcorelo.dll!SdrView::MouseMove(const MouseEvent & rMEvt, OutputDevice * pWin) Line 223
  sdlo.dll!sd::FuDraw::MouseMove(const MouseEvent & rMEvt) Line 260
  sdlo.dll!sd::FuSelection::MouseMove(const MouseEvent & rMEvt) Line 611
  sdlo.dll!sd::ViewShell::MouseMove(const MouseEvent & rMEvt, sd::Window * pWin) Line 689
  sdlo.dll!sd::DrawViewShell::MouseMove(const MouseEvent & rMEvt, sd::Window * pWin) Line 405
  sdlo.dll!sd::Window::MouseMove(const MouseEvent & rMEvt) Line 248

The problem was pre-existing miscalculation of the pixel indices, which
were hidden previously by BitmapEx::GetAlpha sanitizing the input.

The calculation must not round, but truncate: we are on the first pixel,
until we cross the "1/aSizePixel.Width()" boundary. Also, we must handle
1.0 separately in aRelativePoint, because that special case produces bad
result: we must either treat it as "outside" (treat aUnitRange as half-
open interval), or as "over the last pixel" (implemented here now).

Change-Id: Id39dbd889e8d6f3e063962b2a621d0c438a1f90a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189670
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-08-15 14:05:49 +02:00
Caolán McNamara 6d1841c1e6 cid#1664055 Variable copied when it could be moved
Change-Id: I6dcdb52011ad3461cb34209ae1429d35c5450866
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189661
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-15 11:25:05 +02:00
Noel Grandin 7caf45bc06 BitmapEx->Bitmap in HitTestProcessor2D
now that Bitmap supports transparency

Change-Id: Iae2f30e9acdbbf1ed7d7ca700f8c75810f8849f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189616
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-15 07:21:49 +02:00
Noel Grandin 50ec3c43d6 use Bitmap in createTileImage
now that Bitmap supports transparency

Change-Id: I751c3a1ae79eb448f7668a76353483cd55db365f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-15 07:21:39 +02:00
Noel Grandin f3522ba36c use Bitmap in extractBitmapFromBaseProcessor2D
now that Bitmap supports transparency

Change-Id: Ia4e15cfee6b4d223d3fd4324c6c8f7a9186cd4ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189597
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-14 18:06:26 +02:00
Noel Grandin cbd59a9897 use Bitmap in drawinglayer::convertToBitmap
now that Bitmap supports transparency

Change-Id: Ib35d91c1742c2126bef878251eb0ea4de87d425d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189596
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-14 18:06:16 +02:00
Noel Grandin 6b61142487 new methods on Bitmap to avoid going via BitmapEx
have new methods for extracting a color bitmap
and an alpha mask from Bitmap. Avoids going via
BitmapEx.

Change-Id: I8c613008cfb8ecc0a57d1d983b6961798db52632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189470
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-13 11:49:33 +02:00
Noel Grandin 873a848cad BitmapEx->Bitmap in BitmapAlphaPrimitive2D
now that Bitmap supports transparency

Change-Id: Ia0ce9eff727a67326d218eb8f3dfd1e926db2c2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189137
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-11 21:36:17 +02:00
Noel Grandin 0655d5b6b5 BitmapEx->Bitmap in BitmapPrimitive2D
now that Bitmap supports transparency

Change-Id: If3646b64712836c09a274d6b1bcdd7367ce54a6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189136
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-11 21:17:56 +02:00
Armin Le Grand (collabora) cd93f83bbc tdf#167831 avoid painting bitmap data with zero dimensions
See task, there may be bitmap-filled objects in files that
have a logical size of (0, 0), despite the bitmap having
valid data. That leads to problems *inside* cairo paint,
so I have to test and avoid that.

Change-Id: I18db3b030fb5cdf77caa5afd1bf901095fa1c67b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189135
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2025-08-08 10:42:12 +02:00
Noel Grandin bacd1b5dc4 BitmapEx->Bitmap in FillGraphicPrimitive2D
now that Bitmap supports transparency

Change-Id: I9762dadae840e8eaec37526f82068183474c7962
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189069
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-07 22:04:36 +02:00
Noel Grandin a04bef2419 BitmapEx->Bitmap in MarkerArrayPrimitive2D
now that Bitmap supports transparency

Change-Id: I72f649ab39388281834682efe9325e0698734fee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189025
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-07 10:42:59 +02:00
Armin Le Grand (collabora) 83ffcdd964 StripPortions: Further simplify EditEngine
Since 6c8b802051 which is
'StripPortions: full Primitive usage for EditEngine Paint'
all DrawText_To* methods were already using a full
conversion to Primitives which then get painted directly,
see commit comment there.

Since then no complaints/errors came up I now continue
to move EditEngine to Primitive usage. Lots of code for
the still also existing DirectPaint gets removed.

I also drive forward changes to have less parameters
for the ImpEditEngine::StripAllPortions method. It is
already cleared by the former possible rotation, this
can (and is) replaced by embedding the result to a
transform primitive doing that rotation. I changed
two of three using methods to strip always to
position (0, 0) which can also be unified to embedding
to a transformation. The third one will need some more
work here due to doing wild things in Outliner mode in
Impress (callbacks & creating Primitives in fixed
positions for which an embedding translate would be
wrong).

When being able to strip without position and rotation
the result will be usable to be buffered, so the goal
is to re-use that, transformed as needed (translate,
scale, rotate, ...) as long as the text itself does
not change.

Change-Id: I52ab548ccbb1b5b3b16c50451a314bc7f3b39d93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188918
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2025-08-04 20:35:16 +02:00
Armin Le Grand (collabora) a841f2fd0d Added DrawModeFlags to ViewInformation2D
This allows setting/using DrawModeFlags system-independent
(or: renderer-independent). Changing and applying to a
PrmitiveRenderer will apply that (if needed) to the target
renderer.

Change-Id: Id95d018f95d1b2ff065da5e4d05ba385b22cdbb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188704
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2025-08-01 16:13:53 +02:00
Armin Le Grand (collabora) d569a6b335 tdf#167511 Added use of DrawModeFlags to CairoSDPR
Did the necessary now, despite it would be better to apply
that where the geometry gets created (primitives) or painted
(older direct-apints to OutputDevice).
Instead it's in Outputevice where care is taken to apply
changes based on DrawModeFlags. Remember that this is then
done in the renderer.
This will need to be done in every renderer in the future
then. It is traditionally done in OutputDevice, completely
missing in PresentationMode and added now to CairoSDPR.

Problem is that it is not defined how to apply that, e.g.
(even in OutDev) painting text may lead to decompose and
fill the resulting polygons, so the ::*Fill flags are
applied while I think the ::*Text ones should be used.

I looked a lot at OutDev and what it does and tried to
mimic it as good as possible, but cannot give guarantees,
as mentioned in the example above.

If we assume that (as usual) the definition of what should
happen is the existing stuff when using OutDev this might
cause some further errors/regressions in HighContrast
and Black/White/Gray/Settings stuff. Luckily most of that
seems to be used in UI/Button rendering when using
OutDev, so should not lead to big problems. OTOH if
we want to use SDPRs for that in the future we would need
that anyways...

One more note: the fixes already applied may be removed
again after this is applied.

Change-Id: Ie6eb1cd4ee51c62beb950030a0a5d00d3705be61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188527
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2025-07-31 16:51:35 +02:00