We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eg:
img = zeros(RGB, (200,200)); draw(img, Ellipse(100, 100, 100, 100; thickness=29, fill=false), RGB(1,1,0))
will not draw anything because the code is using a bogus normalized distance for the inner ellipse.
The text was updated successfully, but these errors were encountered:
Quick workaround for circles:
function circle!(image, x0, y0, rad, color; thickness=1) rad2 = rad^2 for d1 in -rad:rad d2 = trunc(Int, sqrt(rad2 - d1^2)) ImageDraw.drawifinbounds!(image, CartesianIndex(x0 + d1, y0 + d2), color) ImageDraw.drawifinbounds!(image, CartesianIndex(x0 + d1, y0 - d2), color) ImageDraw.drawifinbounds!(image, CartesianIndex(x0 + d2, y0 + d1), color) ImageDraw.drawifinbounds!(image, CartesianIndex(x0 - d2, y0 + d1), color) end if thickness > 1 delta = trunc(Int, thickness / 2) drange = ((-delta + (thickness + 1) % 2):delta) for d in drange circle!(image, x0, y0, rad + d, color; thickness=1) end end image end
Sorry, something went wrong.
No branches or pull requests
eg:
will not draw anything because the code is using a bogus normalized distance for the inner ellipse.
The text was updated successfully, but these errors were encountered: