In my comments to the question, I explained that you have to make outside pixels transparent, and explained why everything else would be just absurd, or at least impractical. In the "impractical" case, the effect is the same as with transparent pixels, because there is no such notion as "no pixel".
This is how you can do it all:
WriteableBitmap Class (System.Windows.Media.Imaging)[
^].
All the usage is well explained in documentation. Note one key thing: you need to use
PixelFormat
which include
opacity for each pixels, which is the
alpha-channel. See also:
PixelFormat Structure (System.Windows.Media)[
^].
You have to set opacity (alpha value) of each outside pixels to zero, but I would advice some smooth transition around the circular line, to provide a kind of
anti-aliasing. This is not so trivial thing, but little experimenting will give you the reasonable rendering.
Do you also need help with drawing? This is a pretty simple topic. Overall, the whole problem is fairly simple, just needs some logic and understanding.
—SA