gdi+ 只能是水平跟竖直的,我想实现一个 弧形的 色带 平滑过渡 如何实现呢

解决方案 »

  1.   

    只想到用蛮力算圆,HSV插值分色,平滑....不知道怎么做......
      

  2.   

    CDC::AngleArc 
     Draws a line segment and an arc, and moves the current position to the ending point of the arc. 
     
    CDC::Arc 
     Draws an elliptical arc. 
     
    CDC::ArcTo 
     Draws an elliptical arc. This function is similar to Arc, except that the current position is updated. 
     
    CDC::GetArcDirection 
     Returns the current arc direction for the device context. 
     
    CDC::GetCurrentPosition 
     Retrieves the current position of the pen (in logical coordinates). 
     
    CDC::LineTo 
     Draws a line from the current position up to, but not including, a point. 
     
    CDC::MoveTo 
     Moves the current position. 
     
    CDC::PolyBezier 
     Draws one or more Bzier splines. The current position is neither used nor updated. 
     
    CDC::PolyBezierTo 
     Draws one or more Bzier splines, and moves the current position to the ending point of the last Bzier spline. 
     
    CDC::PolyDraw 
     Draws a set of line segments and Bzier splines. This function updates the current position. 
     
    CDC::Polyline 
     Draws a set of line segments connecting the specified points. 
     
    CDC::PolylineTo 
     Draws one or more straight lines and moves the current position to the ending point of the last line. 
     
    CDC::PolyPolyline 
     Draws multiple series of connected line segments. The current position is neither used nor updated by this function. 
     
    CDC::SetArcDirection 
     Sets the drawing direction to be used for arc and rectangle functions. 
     
    画弧是没问题的
      

  3.   

    我在wince平台下,画过仪表  就是用渐变绘图,一点一点画,或者控制画笔的宽度和长度,来减少循环次数,效果还好,其他方法,目前我还没掌握
      

  4.   

    int iCount = 1;
    GraphicsPath Path;
    Path.AddEllipse(0,0,400,400);//画刷路径是一个椭圆
    PathGradientBrush pthGrBrash_(&Path);
    if (RectStyle.FillStyle.gradual_style==GRADUAL_CTOE)
    {
    pthGrBrash_.SetCenterColor( clB );
    Color cls[] = { clE };
    pthGrBrash_.SetSurroundColors( cls, &iCount );
    }
    else
    {
    pthGrBrash_.SetCenterColor( clE );
    Color cls[] = { clB };
    pthGrBrash_.SetSurroundColors( cls, &iCount );
    }
    graph.FillRectangle(&pthGrBrash_,100,100,150,200 );//填充路径是矩形