I am trying to use the image GD library to draw lines using an XOR filter. I have not been able to find an easy way to do this so a line being drawn “flips” white to black and vice-versus. Any solutions?
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.
I’m pretty sure that it’s not possible to draw the XOR line with built-in
imagelinePHP function. Though you can draw it yourself withimagesetpixeland custom line drawing algorithm. For example something like this can work (Bresenham Line Algorythm for PHP):Function perfectly works for images, created from files.