summaryrefslogtreecommitdiff
path: root/vcl/headless/SvpGraphicsBackend.cxx
AgeCommit message (Collapse)Author
2022-05-14tdf#133716: Fix edge gradient when upscaling imagedldld
When an image is getting upscaled with cario as engine it got blured borders. The issue that was worked on showed, in the PresenterConsole, that the borders of the previews and control area had an unnecessary gradient in it. As these borders are build from images which are getting upscaled, either in width or height a graident ocurred. This was because the cairo rending didn't had the correct pattern extention set: CAIRO_EXTEND_PAD. Nearly same issue also occured when adding an image to a presentation and upscaling it, the borders got blured. For images with either height or width equal to one this was a while back fixed: tdf#114117, but not for the general case. Using another extend mode fixes this, because the PAD extend mode doesn't blur the borders. CAIRO_EXTEND_PAD: pixels outside of the pattern copy the closest pixel from the source Change-Id: I39f8a14a69f035a43a93afb303f0a2e7ec8699c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-08ofz#46607 Integer-overflowCaolán McNamara
Change-Id: Id759423176b2e47fc00b8e7babd936b480956617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134025 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-12don't bother trying to draw stuff which is effectively invisibleNoel Grandin
speeds up rendering of complex drawings with fine lines Change-Id: I62924c5ddb6293f993eef9ca200a43cba753d53e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-05vcl: move getBitmap to SvpGraphicsBackendTomaž Vajngerl
Change-Id: Ic72e1fdd3994a5bffef40bb70b713f10c1112903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127982 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-05vcl: move drawAlphaBitmap to SvpGraphicsBackendTomaž Vajngerl
Change-Id: I182d775318a9b43a5955a5868e78a4b09c4a74c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127981 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-05vcl: move drawBitmap, drawMask functions to SvpGraphicsBackendTomaž Vajngerl
Also fix the QTSvpGraphics that uses a special drawBitmap (renamed to drawBitmapBuffer) call and moved in also to SvpGraphicsBackend. Change-Id: Ic50630ba23e35a62ea3d5aaa0955a7666f2bca68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127980 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-04vcl: drawAlphaRect to SvpGraphicsBackendTomaž Vajngerl
Change-Id: I44f388b6578d4f9e7d0e5b75e17fab534574da1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127844 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-04vcl: copyArea and copyBits to SvpGraphicsBackendTomaž Vajngerl
Also move the used (sub)functions to the CarioCommon: copyBitsCairo, copySource, copyWithOperator, renderSource and renderWithOperator. Also use these functions in some calls needed by drawBitmap & co. Change-Id: I51395953545827951b6f255a9833e828aec7ea60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127842 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-03vcl: move invert to SvpGraphicsBackend and CairoCommonTomaž Vajngerl
Common invert to CairoCommon, 2 invert members on the interface to SvpGraphicsBackend calling the common invert call. Change-Id: I2fada75cc0d730f0708ae7ca934a51e1d17cef1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127826 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-03vcl: move getPixel to SvpGraphicsBackendTomaž Vajngerl
Change-Id: I409581a2bdc9e18420bb159ce349fb5a5b86c463 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127825 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-01vcl: move drawGradient to SvpGraphicsBackendTomaž Vajngerl
Change-Id: Ifc3d0b0a693113b0cfbd763bf6ac0bd34eb6c872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127824 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-01vcl: move (legacy) drawPolygon(.., Point*) to SvpGraphicsBackendTomaž Vajngerl
Change-Id: I5b3b915712921fbbdaa0b0d7ad9b9c39291e00f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127823 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-01vcl: move drawPolyLine (+legacy) to SvpGraphicsBackendTomaž Vajngerl
Also moves drawPolyLine with cairo context param. to CairoCommon as it is also needed in X11SalGraphics::drawPolyLine. Change-Id: I49b24bc31ecf3f6ab3cebca4eaab351c91564db5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127740 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-01vcl: move drawPolyPolygon(..., Point**) to SvpGraphicsBackendTomaž Vajngerl
This moves the legacy drawPolyPolygon, which takes a 2D array of points as the input. The implementation just converts it to a B2dPolyPolygon and calls the regular drawPolyPolygon. Change-Id: I5be8b818bcdf58a15e575b904ed20bb8f97bcffc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127738 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-01vcl: move drawRect and drawPolyPolygon to SvpGraphicsBackendTomaž Vajngerl
Also move add_polygon_path and SystemDependentData_CairoPath class to CairoCommon. SystemDependentData_CairoPath is temporary made public until other dependencies are moved too. Change-Id: I381407fc7c168c8982fcfd8c886cf622f95591fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127711 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-30vcl: move drawLine to SvpGraphicsBackendTomaž Vajngerl
Also move getClippedStrokeDamage, AddPolygonToPath, impPixelSnap to CairoCommon, as it is needed by the move. Change-Id: I002f0094935e5f5d4836bb973f7cf7bea0218ff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127710 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-30vcl: move drawPixel to SvpGraphicsBackendTomaž Vajngerl
Includes moving getClippedFillDamage and dependent functions to CairoCommon. Change-Id: Iea7c39377816c3639de1b97cea47efa71ca47315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127709 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-30vcl: move lineColor, fillColor and paintMode to SvpGraphicBackendTomaž Vajngerl
The member variables are moved to CairoCommon. Change-Id: Ia03f613c7ad02ec2e7d70705c7666ec25d63f003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127706 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-30vcl: move set and reset clip region tothe SvpGraphicBackendTomaž Vajngerl
The clip region variable now needs to be in CairoCommon and used in SvpSalGraphic and SvpGraphicBackend. Change-Id: I577ad2c3b6531a26089019ccbdc5e07398f70378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127705 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-30vcl: pass CairoCommon to SvpGraphicBackend, move over some methodsTomaž Vajngerl
SvpGraphicBackend now accepts CairoCommon on construction, as we need it to move over methods. This moves over GetBitCount and GetGraphicsWidth, which also needs the frame size, that is added to CairoCommon. Change-Id: I362c9bed3ef0d85fc51f90a192cc20e06d7a45c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127704 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-30vcl: Introduce SvpGraphicsBackendTomaž Vajngerl
SvpGraphicsBackend contains the implementation of the graphic drawing backend, which uses cairo for drawing. Currently the cairo based graphic drawing implementation is on SvpSalGraphics, but will be steb-by-step moved into SvpGraphicsBackend, just like with other vcl plugins. Change-Id: I70c94f08c5bd1d705f2faeacb66373ddf12f494a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127702 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>