I’m playing around with the <canvas> element, drawing lines and such.
I’ve noticed that my diagonal lines are antialiased. I’d prefer the jaggy look for what I’m doing – is there any way of turning this feature off?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For images there’s now
context.imageSmoothingEnabled= false.However, there’s nothing that explicitly controls line drawing. You may need to draw your own lines (the hard way) using
getImageDataandputImageData.