how to draw this in .net.android

mc 5,186 Reputation points
2025-03-12T14:29:45.3+00:00

there is two points to one circle how to draw it?

I am using canvas in OnDraw

points:(p0x,p0y)and (p1x,p1y) and the center of the circle is (x,y)

how to draw the line and the circle?
I know how to draw circle but I do not want to draw the rest of the circle.

User's image

you can see it .point to circle's tagent and the circle.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,072 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 74,536 Reputation points
    2025-04-13T16:22:13.0133333+00:00

    You would draw an arc. Simple geometry will give you the endpoint and the angle of the tangent to extend the lines:

    https://learn.microsoft.com/en-us/dotnet/maui/user-interface/graphics/draw?view=net-maui-9.0

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.