This commit adds support for splitting all types of file paths on
Linux and Windows. If applicable, paths are also normalized during
splitting. The implementation keeps string copying to a minimum for
improved performance. Tests are included for all the supported path
types.
The old file splitting functionality was limited, and made code
that depended on it fragile. The root cause of the problem was
that paths on Windows and Linux are incompatible. The old function
was simple and left most of this complexity to the caller. The new
implementation is more robust and supports both platforms properly.
* Reimplement ColorItem rendering using GSK.
* Introduce gradient-averager.cpp.
* Introduce snapshot-utils for working with GSK.
* Convert the "no-colour" icon from png to svg.
Fixes #5264
* Remove lpe update code from _selChanged. Changing the selection should
not trigger an LPE update.
* Originally, the removed code was added as part of undo fixes for LPE
code. But it ended up patching the problem instead of fixing it in a
semantically correct manner. The undo / redo issues are mostly related
to improper transactions to the document from the path effect class.
To address these issues, we should fix each live path effect
individually instead of patching commonly used workflows as it could
introduce performance regressions and unexpected updates to the
document.
Partially fixes: #1351
Poppler's getString() et al now return &std::string and not
*GooString. So functions that expected *Goostring have been
modified to accept std::string, with wrappers for backwards
compatibility
Fixes #6090
This looks like a copy&paste oversight. As a result, copying
to the clipboard sometimes randomly ran the odf export code for
the povray mime type, resulting in weird behaviour.
This allows the paint server code to be unit tested in later versions. There are some limitations
to this refactoring including use of virtual functions instead of casting so we can use templates
in renderers.
ll SPObjects must implement their virtual functions, so the base classes all return empty objects
where possible and this pushed the design in a certain direction for some calls.
* Move sp-gradient spread, units and vector to sp-paint-server-data.h
* Move mesh gradient patches data from display/drawing-paintserver to sp-paint-server-data
* Allow SPPaintServer to be used as a template class in a renderer by providing data from sp-paint-server-data in a consistant way from the base class using virtual functions.
* Add getPaintType and enum class to decide what type of paint server we have instead of cast
* Add SPGradient virtual for gathering geometric gradient data for Lienar and Radial gradients
* Add SPMeshGradient virtual for gathering mesh patches data for the Mesh gradient
* Pack gradient geometric data into SPGradientVector and return in getGradientVector
* Harmonize const and API between Mesh Gradients and Linear/Radial Gradients
* Move add create_drawing_paintserver calls to display/drawing-paintserver in a single call
* Remove `mg` MeshGradient pointer from MeshArray and remove back-linking. This indicates bad
API design for some of these calls as the functions used mg and had little to do with the MeshArray
but for now we just push the MeshGradient object back in as an argument.
* Change drawing-paintserver constructors to take paint-server-data objects instead of individual arguments.
Remove remaining uses of SCALE24_TO_FLOAT and FROM_FLOAT macros which were only
used for SPIFloat and can easily be folded into the object itself.
Harmonize the default data type use with SPIEnum, SPILength and SPIFontSize
this allows the rendering engine nr-style.cpp to use the right rendering value
which is always the computed value and not need to think about the internal
implementation of the style variable between `value`, `computed` and will allow
these variable to be made private in the future.
Mikekov: Add `as_double` and `as_enum` getter functions for the new explicit interface.
Provide the ability for users to click on shapes and lines with
the text tool and place text directly inside and on lines without
needing to use the text menu functions.
* New cursor icons inspired by the designs in Krita 6.0
* New pathways in text-tool decide if text should be added to curves or shapes
* Distil `create_text_in_shape` out of `create_text_with_rectangle`
* Add `create_text_at_position` into sp-text moved from text-tool.cpp
* Add `create_text_on_curve` in sp-tspan to manage creation of path text
Refactoring:
* Remove unused `create_text_with_inline_size` and fold into new function
* Remove unused variables in text-tool
* Removed include "desktop.h" in "sp-text.h" and fixed bad deps in ui
* Moved desktop/h include in tools to `tool-base.h` since every tool uses it
* Change creation methods to always use document units and not pass SPDesktop
* Remove `cursortolerance` pref dance in getItemsNearPoints
* Split SPText inclusion shape building and add get first line position
* Fix snap issues and add snapping to point outside of snappers
Other fixes:
* Fix scaling issues with font-size and making new text objects
* Fix scaling issue in knot handler for TextPath font-size