I'm 'drawing' on an image, like thus
Code: Select all
DrawSetStrokeColor($drawing,$pixel);
DrawSetStrokeWidth($drawing,$thickness);
DrawSetStrokeAlpha($drawing,$opacity);
DrawSetStrokeLineCap($drawing, MW_RoundCap);
DrawSetStrokeLineJoin($drawing, MW_RoundJoin);
DrawSetFillOpacity($drawing,1);
DrawLine($drawing, 0, 0, 200, 200);
MagickDrawImage($source,$drawing);
Code: Select all
DrawLine($drawing, 0, 0, 200, 200);
//set the stroke to transparent
DrawSetStrokeAlpha($drawing,0);
DrawLine($drawing, 0, 200, 200, 0);
I could create a new image with my 'erase' pen, and then apply that as a transparency mask, but i'm having some trouble finding out how to do that as well.