bevy_prototype_lyon icon indicating copy to clipboard operation
bevy_prototype_lyon copied to clipboard

Drawing a 1px wide line

Open darthdeus opened this issue 4 years ago • 1 comments

I'm not sure how to actually do this with Lyon, but it seems it should be possible looking at its output. What I'm doing at the moment is basically drawing a very thin rectangle, but there's a slight problem that if it becomes too thin it's actually invisible.

It would be great if there was an API to draw a line which just renders as thin as possible, but always visible.

darthdeus avatar Dec 30 '20 18:12 darthdeus

I can't verify at the moment, but if I recall correctly, with default 2D camera settings (i. e. not zooming in/out) the width of the line in pixels should be corresponding to the parameter. As far as I know, making shapes not being transformed by the 2D camera is to render it to the UI camera or another custom camera

Nilirad avatar Dec 31 '20 15:12 Nilirad