I am trying to draw a line two pixels wide. How can I do this?
Share
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.
There is no method to set the width of your line. You do have two options though:
1) If your line is horizontal/vertical, then you can use fillRect to draw your lines.
2) You can draw multiple lines offset by a pixel in the x or y direction to make the appearance of a thicker line.
They may not be ideal, but they get the job done.