SpeciesFileGroup / svg-detailer

A native javascript library for annotating images, with results exportable as SVG elements.
7 stars 0 forks source link

Add ability to scale line thickness based on canvas (window?) size #7

Closed mjy closed 4 years ago

jrflood commented 4 years ago

As defined, the stroke-width defaults to one pixel. However, the scale/zoom level of the image in the element will change the image-pixel width of the stroke such that it renders in the screen pixel space as one pixel width.

This means that the stroke-width attribute of the svg element created will likely be some non-integer number which is not 1. Experiments are ongoing to evaluate the use of an unscaled stroke-width attribute. In other words, not scaled by zoom at initialization.

jrflood commented 4 years ago

Attribute stroke-width is no longer recomputed by the initialization code. The default is 1. An API-ish function will be created to set an arbitrary value.

jrflood commented 4 years ago

API feature added. Stroke-width in image-space pixels zooms in browser pixel space per XLT element.