11 Commits
Author SHA1 Message Date
iwritepoem 4abb556ae6 tdf#168520 Rename testTdf134053 to testTdf134053_dashed_line_round_cap
Change-Id: If267bc2ae1dfb3da2f586c28b3967909603cbca4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202700
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-03-30 17:49:58 +02:00
Noel Grandin e28b04775a BitmapEx->Bitmap in Graphic
now that Bitmap can handle transparency.

This just removes the Graphic(BitmapEx) constructor and pushes
the conversion from BitmapEx->Bitmap out to the call sites.

Change-Id: I5d8b9838365458524185d3cfffe4a8f05d40d0ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190324
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-28 15:08:06 +02:00
Noel Grandin e435c0749b drop OutputDevice::GetBitmapEx in favour of returning Bitmap
as part of the project of removing BitmapEx in favour of Bitmap, now that we can store RGBA data in Bitmap.

This mostly just moves the Bitmap->BitmapEx from inside OutputDevice to the various call sites,
from where I can make further improvements.

Change-Id: Id5366c1eb5ebca98fee7c974737552f4a09a5c2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188341
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-07-25 22:34:31 +02:00
Noel Grandin f840d3c939 loplugin:ostr in canvas
Change-Id: I6fe0ed24a42394936975e763aba9dc3625a373ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167205
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-06 21:31:14 +02:00
Noel Grandin a214ac6774 simplify and modernise ScopedBitmapAccess
(*) Make all of it use a "Scoped" paradigm
(*) pass by value, no need to allocate on heap
(*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods.
(*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places.

Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-07 09:32:14 +01:00
Noel Grandin 00659bcdbb improve readability of VirtualDevice constructor
(a) It is not obvious what DeviceFormat::DEFAULT means
(b) There are two parameters (each with two states), but only really 2
possible overall states

So
(1) use more useful names
(2) combine the two parameters into one enum

Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-07 10:19:32 +00:00
Gabor Kelemen 840b4eb2f3 Recheck modules [a-c]* with IWYU
See tdf#42949 for motivation

Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-13 08:26:15 +01:00
Julien Nabet 87e8d5ec6b Simplify Sequences initializations (canvas)
Change-Id: I651858d71e378341205d6a785bd97f294664a439
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116737
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-07 12:58:48 +02:00
Noel Grandin dbd4110cc3 fix leak in canvas test
Change-Id: I01d52e67711b0201bbabb8c36e990f494466ae55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-12 21:48:42 +02:00
Luboš Luňák 32f2d2f7f9 a unittest for my cairocanvas fix for tdf#134053
Note that even though the fix is for cairocanvas, the unittest
currently really checks only vclcanvas, because tests for cairocanvas
do not work.

Change-Id: I2c34822126c93460971c34932d5bdf3fe2d698b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115146
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-06 11:23:35 +02:00
Luboš Luňák 402acbcfad make it possible to write canvas unittests
One of the problems is that canvas apparently works only with windows,
but tests obviously need an offscreen surface. This patch moves
Window::GetCanvas() to OutputDevice, and makes vclcanvas capable
of working with OutputDevice classes that are not windows. Other
canvas implementations still don't work, but presumably at least
cairocanvas could be fixed too.

This commit adds a "simple" test that just draws a line and tries
to verify it's been drawn properly. Adding another test should
be a matter of basing it on this existing one, and then copy&pasting
the complicated UNO way of drawing using canvas from somewhere,
such as canvas/workben/canvasdemo.cxx.

Change-Id: I42db12b09433763cd31c3dd497c10157424b8598
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115117
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-06 11:22:47 +02:00