* Implement supersampling for CLI tests, allowing lower fuzz thresholds.
* Merge l2compare.sh into check_output.sh to reduce duplication.
* Always use L2 metric for fuzzy raster comparisons, not absolute error.
* Fix 09-text-layout.svg to add 'arabic' css class to some text that was
missing it, use 'Noto Sans Hebrew' for hebrew text, and re-show some
cut-off text. Update bundled Noto Sans fonts that it depends on.
* Fix test-store writing to source directory.
* Update reference images and adjust fuzz. Only significant reference
image change is the peppercarrot one, where some previously missing
text ("日本語") actually appears now.
Commits:
Preliminary non-vertical axis implementation
Add option to set vertical angle for axonometric grids
Fixed the math for calculating the y axis angle in the axonometric grid
Initial grid snapping with !angle_y_vertical implemented
Update comments to clarify axis behavior in axonometric grids
Change angle_y_vertical to use RegisteredCheckButton and update preferences initialization
Add button to swap axonometric grid axes in document properties dialog
Documented & moved derived_angle_y to mathfns.h and added update_derived_angle_y method for shared behavior
Renamed gridangleyvertical to angleyvertical
Comment: "[the prefix 'grid'] should never have been used for any of the attributes, but we should start by not adding new ones" - @doctormo
I forgot the pi/2 - angle when porting to derived_angle_y rad
When getting the average color of a cairo surface, if the alpha is
zero, we were getting a divide-by-zero error, because we were
dividing r, g, and b by the cumulutive alpha of the surface.
Instead, we should return black in that case.
Fixes #6098
Added isDirect to Colors::Space::* which tells us if a color space is
backed by a single icc profile, and no other processing steps with some
public method cleanups.
Removed Lab toXYZ and fromXYZ which were orphaned by previous commit.
Reformatted CairoTransform into generic SurfaceTransform so it can work
with any memory surface of pixels and in a greater number of data formats.
Split out CMS transform class from SurfaceTransforms and use a base class
Allowing for different assumptions with formatting and alpha premultiplication.
Add a forward.h header to make including color namespaces easier and cleaner.
Clean up generic testing utils for VectorIs Add colors and some better flexibility
for arrays and vectors in testing.
This color space allows surfaces to be converted to luminosity masks
and varius other useful alpha related filtering for the new rendering
engine.
We use lcms2 to hold the gray scale profile for quicker conversions.
The transform-cms is modified so it can cope with outputs which do
not have an allpha channel of their own. Tests for this are added.
Most color conversion will be done with std::vectors of doubles
but to speed up and provide compile time checks for color converting
on Surfaces we want the ability to take an array directly at some
but not all of the various levels.
Formalise the interface for ProfileSpace and the Convertable type
using a self-referential templating pattern.
Move most conversion code to static functions and make as agnostic
to the array type as possible, allowing for convertors to use them
directly without expensive vector types.
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.