0
나는 계기를 그리기 위해 wx python을 사용하고 있습니다. 그리고 drawarc과 drawCircle을 사용합니다. 하지만 예상 한 결과가 아닙니다. 원호와 원은 정확하게 그려지지 않고 추한 것처럼 보입니다.wx python draw 원호와 원
pen = wx.Pen(wx.WHITE,2)
dc.SetPen(pen)
xFullCoordinate = (x + (OutsideRadius * math.cos((0.5 * math.pi) + (FullDeg * math.pi * newValue)/((MaxValue - MinValue) * 180))))
yFullCoordinate = (y + (OutsideRadius * math.sin((0.5 * math.pi) + (FullDeg * math.pi * newValue)/((MaxValue - MinValue) * 180))))
xStartCoodrinate = (x + (OutsideRadius * math.cos((0.5 * math.pi) + (StartDeg * math.pi)/180)))
yStartCoodrinate = (y + (OutsideRadius * math.sin((0.5 * math.pi) + (StartDeg * math.pi)/180)))
dc.DrawArc((xFullCoordinate,yFullCoordinate),(xStartCoodrinate,yStartCoodrinate),(x, y))
dc.SetBrush(wx.Brush((48,100,175)))
dc.DrawCircle(x, y, InsideRadius)
'wx.GCDC'는 그래픽 컨텍스트를 사용하도록 코드를 전환하는 좋은 방법입니다. 그것은'wx.GraphicsContext'의 상단에'wx.DC' API를 구현합니다. – RobinDunn
@RobinDunn : wxPython classic에서 기존 GCDC를 사용하는 데 어려움이 있었기 때문에 GCDC를 언급하지 않았지만 좋은 점! – nepix32