You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 26, 2025. It is now read-only.
//todo: fill is not optimal we can fill symmetrically
80
-
if(column-1>center.column){
82
+
// Filling the first line of the circle.
83
+
if(index===0){
81
84
newImage.drawLine(
82
85
{ row,column: column-1},
83
-
{ row,column: center.column},
86
+
{
87
+
row,
88
+
column: center.column-(column-center.column-1),
89
+
},
84
90
{strokeColor: fill,out: newImage},
85
91
);
86
-
}elseif(column+1<center.column){
92
+
}
93
+
// The bresenham algorithm is drawing the circle in 4 parts. We are filling the top and bottom part of the circle. Therefore we check whether the point belongs to top or bottom part through indexes. Index must be 1 or 3 to fill the circle.
0 commit comments