You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the limited resolution of SVG of 0.01mm, rounding errors often cause "gaps". The gaps can occur everywhere, but are typically noticeable in continuous color keys, which are collections of small rectangles.
I also noticed that the SVG (SVGJS) backend did not show grid lines due to GiovineItalia/Compose.jl#386. The following explicit strokeopacity(1.0) is a workaround.
# color barcompose!(ctx,
(context(xoff, yoff + title_height,
1w, total_height, units=UnitBox()),
rectangle([0], [1cy - i * swatch_height for i in1:numgrads],
[swatch_width], [swatch_height]),
#grid lines
(context(),
line([[(0, 1- y), (swatch_width, 1- y)] for y invalues(colors)]),
linewidth(theme.grid_line_width),
stroke(colorant"white"), strokeopacity(1.0)),
fill([color_function((i -1) / (numgrads -1)) for i in1:numgrads]),
stroke(nothing), fillopacity(theme.alphas[1]),
svgattribute("shape-rendering", "crispEdges")))
The text was updated successfully, but these errors were encountered:
Afair SVG has no resolution limit. The gaps you see are impact of discretisation in the rendering process. In most cases this can be avoided by a small overlap of the rectangles
It seems my explanation was not clear enough. The SVG format has no resolution limit. I mean Compose.jl's SVG (SVGJS) backend.
As you know, the overlapping is helpful but not suitable for transparent color bars.
Of course, switching behaviors according to transparency is another option. For opaque color bars, stacking the swatches in a pyramidal manner will give good results even in non-vector formats such as PNG.
In any case, they are ad-hoc measure, so if the demand is low, I will close this issue.
Due to the limited resolution of SVG of 0.01mm, rounding errors often cause "gaps". The gaps can occur everywhere, but are typically noticeable in continuous color keys, which are collections of small rectangles.
So, what about the following "ugly" discretization? (cf. render_continuous_color_key in "src/guide.jl")
I also noticed that the SVG (SVGJS) backend did not show grid lines due to GiovineItalia/Compose.jl#386. The following explicit
strokeopacity(1.0)
is a workaround.The text was updated successfully, but these errors were encountered: