Overlapping Lines on WPF canvas blending colors - how to fix? -
if draw line (assume ls line segment coordinates) . . .
line line = new line(); string rgb = "#ff0000"; // red line.stroke = (solidcolorbrush)(new brushconverter().convertfrom(rgb)); ls = plylist[p].l3ds[seg]; line.x1 = ls.p0.x; line.y1 = ls.p0.y; line.x2 = ls.p1.x; line.y2 = ls.p1.y; geometrycnv.children.add(line);
... red line. if . . .
line line = new line(); string rgb = "#00ff00"; // green line.stroke = (solidcolorbrush)(new brushconverter().convertfrom(rgb)); ls = plylist[p].l3ds[seg]; line.x1 = ls.p0.x; line.y1 = ls.p0.y; line.x2 = ls.p1.x; line.y2 = ls.p1.y; geometrycnv.children.add(line);
... green line.
if both (using same coordinates), brownish-orange color though colors of 2 lines blended, though lines had sort of transparency. want happen recent line draw on previous 1 resulting color recent color - green in case.
what need achieve this?
try setting snapstodevicepixels
true on geometrycnv.
aliasing both lines leading effect you're seeing.
Comments
Post a Comment