|Compositing and blending|
This technical proposal discusses the addition of color compositing and color blending in GeoTools/GeoServer map rendering capabilities to get results similar to Mapnik own color compositing, in other words, to support the well known SVG color compositing and blending abilities. References:
We will use the SVG nomenclature to name the operations.
The compositing operations that will be supported are the following (within parenthesis, the equivalent Mapnik name):
All of the above operations are also known as Porter-Duff composites and are already available in Java2D by the AlphaComposite class, but they need to exposed in SLD and properly applied by the rendering engine.
None of the above operators is available in Java2D, so they need to be first implemented as new Java2D Composite objects, and then exposed in SLD and properly applied by the rendering engine. Since this implementations will be pure java it is expected to be slower than the color compositing operations.
Exposing blending and compositing in SLD
At the SLD level the compositing operation will be exposed either as a symbolizer level operation, or as a FeatureTypeStyle level operation, the first one will act only while painting specific symbolizers, the second one while merging inner featuer type styles with the already painted image.
At the single symbolizer level it is somehow tempting to play against the existing CSS properties and add a "fill-composite" or "stroke-composite", however, this would be limiting, as it could not apply to external graphics and rasters. Instead, we propose to add compositing/blending as a single vendor option:
For the sake of simplicity and to align to other software practictes, a single "composite" tag will be used for both compositing and blending.
In order to specify how to composite/blend full layers instead a new <VendorOption> tag at the end of the FeatureTypeStyle, with the same usage and semantic as the symbolizer specific one.
Exposing blending and compositing in CSS
The gt-css CSS syntax will be extended to support compositing at the symbolizer level by matching the corresponding symbolizer activation property (with the exception of the raster case):
Implementing the new blending Composite objects
This proposal is under construction.
Voting has not started yet:
- Andrea Aime
- Ben Caradoc-Davies
- Christian Mueller
- Ian Turton
- Justin Deoliveira
- Jody Garnett
- Simone Giannecchini
This section is used to make sure your proposal is complete (did you remember documentation?) and has enough paid or volunteer time lined up to be a success
- API changed based on BEFORE / AFTER
- Update default implementation
- Update wiki (both module matrix and upgrade to to 2.5 pages) |
- Remove deprecated code from GeoTools project
- Update the user guide
- Update or provided sample code in demo
- review user documentation
I cannot find documentation pages talking about styling? There is just a very basic tutorial