Quantcast
Channel: How can I keep the edge pixels of lines from being semi-transparent? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How can I keep the edge pixels of lines from being semi-transparent?

$
0
0

I am working with an HTML canvas blown up 32x its pixel width and height. When I draw lines on it, however, I notice that the edge pixels of lines are drawn semi-transparently (exactly half transparent). Is there a way to stop this?

In this picture, the red line is a single line from one point to the other. I would like all of the blocks to be either black or #FF0000 red.

N.B. I am already using canvas.translate() to align pixels properly and am using the solution in this post to render the expanded pixels in discrete blocks.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images