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
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>
(*) 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>
(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>
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>
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>