I'm currently using WriteableBitmapEx in a project with pretty good success. I'm using it to drawing an array of simple charts very quickly and it seems to be working well. At this point, I'm trying to add some mouse interaction. I want to be able to drag a "selection rectangle" over the image in order to select certain charts. It seems that drawing a rectangle is not hard, but as I drag, I'd like to "erase" the previous rectange and then draw the new one. Back in the day, this would commonly be done by xor drawing the lines to make the rectangle appear, then xor drawing the same lines again would make the lines disappear and put back the original pixels that the lines were drawn over. It doesn't appear that the WriteableBitmapEx line drawing algorithms have an xor mode. So maybe there's a way to copy the bitmap (or portion of it that the rectangle occupies) to a buffer then refreshing it (to erase the previous rectangle) before drawing a new rectangle.
I'm looking for a good way to handle this.
Thanks for any advice.
I'm looking for a good way to handle this.
Thanks for any advice.