在image上画圆时边缘出现锯齿现象,如何把边缘变的圆滑.

解决方案 »

  1.   

    image.Canvas.Brush.Style:=bsSolid;
                      image.Canvas.Brush.Color:=clred;
                      image.Canvas.Pen.Color:=clred;
                      image.Canvas.Ellipse(50, 30, 100,
                      200);
    代码如上,你细看边缘会发现边缘有锯齿,请问如何解决它呢?
      

  2.   

    自己写个函数来画,不过它的反走样不好做.不是算法不好搞.是BMP.PIXEL[]方法操作很慢.效率是个大大的问题.bmp.ScanLine[]速度是快点。不过似乎对几个点用这个方法又不太合适.
      

  3.   

    Ellipse(50, 30, 100,200);这个当然就太粗糙了
      

  4.   

    image.Canvas.Brush.Style:=bsSolid;
                      image.Canvas.Brush.Color:=clred;
                      image.Canvas.Pen.Color:=clred;
                      image.Canvas.Ellipse(50, 30, 100,
                      200);

    image.Canvas.Ellipse(50, 30, 100,200);
    效果是一样的呀。
      

  5.   

    呵呵。原来没注意。这样的话,没什么好方法了。除非用shape控件代替。
      

  6.   

    Rough Around the Edges -- Antialiasing in Delphi by Rod Stephens, Delphi Informant, April 1998, pp. 60-64.
    www.informant.com/delphi, File Downloads, Delphi 3, DI9804RS.ZIP or
    www.informant.com/libs/delphi/3x/di9804rs.zip 
    SmoothLn. Antialiasing picture/image component.
    www.razorsedgesoft.com/delphi.htm Chris Hill's UseNet Post about Antialiased FontsHarman's UseNet Post showing Delphi code to rotate an image any angle, with edge wrapping, and anti-aliasing. Resamples a 24-bit bitmap to half its original size by averaging the RGB values of 4 pixels into one pixel (anti-aliasing).  http://norfolkgraphics.com/download/antialias.zip
      

  7.   

    这个
    http://www.g32.org/graphics32/index.html