Hi,
Attached you will find two circles that I have generated. The blue circle was created using FillEllipse with anti-aliasing. The grating was drawn by clipping an elliptical region and then drawing a series of lines. Without the clipping, the image would be a rectangle. As you can see, the elliptical region look pretty bad around the edges. Is there any way to improve this??
Ive implemented the grating using a Region, because I couldnt find another way to do it. The grating was generated by a series of diagonal DrawLine commands at varying grayness levels. Is there a better way to do this?
The image must be circular, and the rugged edges are not acceptible. Thanks in advance for any suggestions!
Here is how I clipped the region (C++):
And this is the Anti-aliasing code I used for the blue circle, and left in there for the grating:
--
ThatFella
Attached you will find two circles that I have generated. The blue circle was created using FillEllipse with anti-aliasing. The grating was drawn by clipping an elliptical region and then drawing a series of lines. Without the clipping, the image would be a rectangle. As you can see, the elliptical region look pretty bad around the edges. Is there any way to improve this??
Ive implemented the grating using a Region, because I couldnt find another way to do it. The grating was generated by a series of diagonal DrawLine commands at varying grayness levels. Is there a better way to do this?
The image must be circular, and the rugged edges are not acceptible. Thanks in advance for any suggestions!
Here is how I clipped the region (C++):
Code:
GraphicsPath path;
path.AddEllipse(startX, startY, width, length);
Region region(&path);
graphics.SetClip(®ion);
And this is the Anti-aliasing code I used for the blue circle, and left in there for the grating:
Code:
graphics.SetSmoothingMode(SmoothingModeAntiAlias);
--
ThatFella