* Simplifies packaging on distros that don't provide capypdf, since we
no longer have to worry about where to install this vendored library.
Consequently, capypdf can now be enabled in PPA builds.
* Removes a Windows-specific workaround from the test suite (098a53bd).
This requires bumping capypdf to 0.21.0.
The method that applied the b-spline was doing it on the wrong
object because when bending, there's a different object that will
end up being the result object.
This method is a bit spaghetti, I didn't try a broader refactor.
Hopefully I made the method cleaner, not more confusing...
Fixes #6198
The perfect was the enemy of the good when the object properties panel
got redesigned. The Text panel had a whole lot of new properties added,
but they weren't all hooked up. So it was disabled.
But what had been completed was quite good, and better than 1.4
offered. So this commit brings the functional bits of the Text panel
back and removes the non-functional bits. Which can be revived in the
future, but we can have a decent panel in the meantime.
Fixes #6166
The marker does not follow the normal rules of inheritance that clones or
groups do. This is a departure from what PDF can support.
Added test to pdfoutput 06 markers.
Also fixed pdf version error, we now only support PDF 2.0 and not any version
lower than this. PDF changes very little and our output is actually PDF 1.4
because very little changed between 1.4 and 2.0 outside of the tightening for
archive standards. This is the policy of the PDF Ass. and CapyPDF.
Also remove polyfill from pdfoutput test fill.
- Open blank document and have fill/stroke panel open
- Open svg
- Select something
- You might see crash
The Fill and Stroke dialog wasn't responding to the documentReplaced
signal and swapping out its connections - so it was reacting to
color changed signals and acting on old disposed documents. Leading to
a crash.
Related to inbox#13064
Notably the Node tool, which has a lot of complicated tooltip
interactions. I did not try to solve it in the ideal way, because I
started going down that track but realized it would take a while.
So this commit just does the more targeted thing, which is update the
tooltips to be dynamic, but not entirely break us from the manual
combinating of modifier labels. Ideally it would all be handled for us
by some helper methods.
I broke a lot of keyboard shortcuts with a recent accidental confusion
between keyvals and modifier flags. This should get keyboard shortcuts
like "moving with arrows" (and others) working again.
Fixes #6226
It had an expander inside the popup, and when a popup wants to grow,
gtk4 will close it instead (popups shouldn't change size).
So instead, this commit drops the expander (it's just for one field)
and adjusts the spacing around the popup too for simplification.
Fixes #5820
For vector outputs, the following now work:
* --export-area
* --export-area-snap
For png outputs:
* --export-area-drawing will now be respected even if you pass in an
--export-id.
And now the vector, png, and other-raster code paths all use the same
function for export area and export ID handling.
This change does not make other-raster code paths support --export-area
yet, but it should get us closer.
Fixes #678
This commit moves up when we try to restore window size to "as early as
possible" so that attempts to show the window during initialization
(like can happen if dialogs try to be shown) don't cause the window to
store its in-progress size in prefences, which then get loaded.
Instead, we load it up front, and later attempts to show the window
are just fine.
This commit also makes two behavior changes, both of which I think are
desirable:
- Detaching a tab into a new window (either by right clicking on tab
name or dragging it out of the window) will now follow "new window
sizing rules".
- Opening a "new template" document will no longer attempt to resize
your current window to match the "new window sizing rules" -- it's
already an open window, we shouldn't resize it.
Fixes #6229
Introduces a new Advanced tab to the Fill and Stroke dialog, with options for changing Color Format, Interpolation Settings and Recolor Selection.
New Additions:
- UI layout for Color Format and Interpolation settings.
- Moved the Recolor selection tool into a expander in the tab.
And build it with CMake to dodge its unreasonably new meson requirement.
These two changes in combination allow building Inkscape with capypdf
support on Launchpad.
We look up and pass along the axis data and use the default when it is
not set in the SPStyle Axis data.
When upstream's support for named axis presets is present, this needs
to be updated to support it.
* PPA builds are failing due to test failures. Fix as many of them as
possible (all of them on amd64), then make them non-fatal anyway.
* Snap builds are failing due to copying non-existent libcapypdf.so.
Previous to this, SPText was described by font family and size, but this
doesn't align well with the capabilities of the object, which can
contain multiple spans with differing styles. Rather than a complex scan
of the element to possibly indicate multiple styles, match the behavior
of SPFlowText, which shows character count. (This has its own problems
with the difference between characters and glyphs, but it's easy and
consistent).
Some window managers (in this case, GNOME's mutter) struggle with
keeping a modal dialog above other non-modal dialogs and the crash
dialog can get lost or hard to interact with.
So let's treat it like any other panel dialog and make it transient,
but not modal.
Fixes #6208
To support more color channels, and greater flexibility in our rendering
engine, this new code impliments a new API for accessing pixel data in a
cairo surface and expands it's capabilities so that they can work with
floating point pixel data as well as CMYKA (5 channel) interpolations.
The new interface makes heavy use of compile time templating for channel count
and cairo surface formats.
The primary use of this API is for filters. Each filter which depends on
non-cairo functionality is recoded to use this new API and split out from
their svg filter primitive and display object files so they can be unit tested.
Threading and dispatch pool are held as light copies until the refactoring is
completed and we can copy them to a central utility instead.
Assistance from PBS (squashed):
* Use requires instead of run-time checks.
* Use more modern _v/_t instead of ::value/::type.
* Fix const T* memory() calling itself in infinite loop.
* Make some functions static (_primary_pos, _bilinear_interpolate).
* Make _transform std::optional.
* Convert G_BYTE_ORDER == G_LITTLE_ENDIAN to if constexpr, revealing
missing glib.h header.
* Use safemod for wrapping.
To contain the multiple cairo surfaces and integrate with the pixel access code
a new Surface class is made that stores references to cairo surfaces.
PixelAccess objects of the right format can be run with filters to control the
surface at a pixel by pixel level.
A host of new tests are adding for each of the filters to make sure PixelAccess
integration is correct for each one of them.
Other Changes
* Add forward declaration to colors API to smooth importing
We wrap the cairo context with our own multi-context engine
which keeps track of the color space, can paint multi-surface
CMYK rasters onto each other as well as translate between
Inkscape geom, path objects to cairo instructions.
Added many tests for each of the functionalities in cairo context
drawing.
Add README to explain the local code structures.
The stack mostly backs onto PixelFilters, but also onto the Surface
and Context where upstream functionality can provide the output.
The ColorSpace for the filter primitives are tied into the rendering
process so filters are rendered in the correct space.
Drawing options are refactored to be more concise for future use.
This copy from display allows the differences to be seen more easily.
display/drawing* -> renderer/drawing/drawing*
display/surface* -> renderer/drawing/drawing-area* (might not be needed)
display/tags* -> renderer/drawing/drawing-item-tags*
display/nr-style* -> renderer/drawing/drawing-style*
The process used for this refactoring was a light touch on the logic. But
the namespaces, and somme processes that were incompatible with the new
surface and pixel filters had to be changed.
The RenderContext was changed to DrawingOptions to better express what it is
and the various options from filters and other parts of the pipeline were
added so they aren't being passed around in addition.
Pull in all uses of SPStyle into the DrawingStyle parsing and remove DrawingItem
style variables to provide consistancy and remove duplication.
This tracks the traditional rendering display tree and prints out
new rendering engine c++ code which can be used as tests. Combined
with the make-test.sh command this can turn any svg file into a
rendering unit test.
Currently: Any PNG export will turn on logging. TODO: Make it a CLI option
Exported tests come from the pdfoutput test suite.