Forum Cross Platform with Xamarin

How to draw line, circle shape like paint on capture image?

How to draw line, circle shape like paint on capture image?

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    There is a new feature called Xamarin.Forms Shapes:
    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/shapes/
    You could use this to display shapes as you want.
    SkiaSharp is another option if you want to draw something in Forms:
    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/graphics/skiasharp/

  • varshavarsha Member ✭✭

    In above link shapes not created dynamically..how can we draw dynamically..like when we select line button and draw lines as per our requirement..

  • varshavarsha Member ✭✭

    I need to take image either from camera or gallery and after that we need perform drawing functionality on it.
    If I select circle button and then click on Image then circle will draw that exact position with dynamic radius as per requirement..

  • LandLuLandLu Member, Xamarin Team Xamurai

    Firstly, get the touch position on each platform as Xamarin TapGestureRecognizer doesn't expose such api.
    And then add shapes on the corresponding position dynamically.
    We could use RelativeLayout to locate shapes in a certain position.

Sign In or Register to comment.