Re: Drawing Single Pixel Lines

Stefan Salewski <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Tue, 2015-12-29 at 15:25 -0700, Dan Raymond wrote:
> As I recall, integer coordinates will refer to positions between 
> pixels.  If you add 0.5 to your coordinates then you will draw the
> line 
> at the center of the pixel and it will be possible to have a single 
> pixel width line.

He already known that, see
 
> know that in the FAQ a line width of 2.0 is recommended : 
> http://cairographics.org/FAQ/#sharp_lines.


Christos,

your mentioned Suse version seems to be more than 6 years old -- why do
you care?

In the last 5 years cairo drawing has always worked fine for me, see 
http://ssalewski.de/PetEd.html.en. But there is some effort to get sharp
lines unfortunately.

What you may try is

http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-antialias

to set antialias to none. I tried that many years ago but was not happy
with the results, maybe now it works better.

Of course for thin lines color is important, when line color is very
similar to background color thin lines may become invisible.

Now in these days UHD (4k) displays are common, so I would really like a
fast drawing mode without antialias with good hardware support :-)
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.