[Cuis-dev] Best way to draw arcs

Hilaire Fernandes hfern at free.fr
Sat Mar 4 05:53:32 PST 2023


Jon,

Try these modifications:

     ratio := self angleToValueRatio.     aCanvas strokeWidth: 1 color: 
color fillColor: color do: [ *:engine*         | startAngle endAngle | 
         startAngle := (90 - (startSpeed * ratio)) degreesToRadians.    
      endAngle := (90 - (endSpeed * ratio)) degreesToRadians. *engine* 
             moveTo: (Point rho: 95 theta: startAngle);             
"lineTo: (Point rho: 95 theta: endAngle);"             arcTo: (Point 
rho: 95 theta: endAngle) radius: 95 angleOfXAxis: 0 largeFlag: false 
sweepFlag: true;             lineTo: (Point rho: 85 theta: endAngle);    
          "lineTo: (Point rho: 85 theta: startAngle)"             arcTo: 
(Point rho: 85 theta: startAngle) radius: 85 angleOfXAxis: 0 largeFlag: 
false sweepFlag: false].

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230304/dae18e15/attachment.htm>


More information about the Cuis-dev mailing list