How do I draw shapes using JSON data that is formatted similar to this example?

Howdy!

I'm new to graphics and drawing on mobile, and I need a little push in the right direction.

I have implemented a 3rd party API into my Xamarin.Forms app, which supplies the app with "path" data that defines dynamic shapes that need to be drawn to the user's screen. Here is an example shape contained within the JSON response that I would like to draw:

{
"bBox": "2471.3636363636374 3088.2533981221372 15 15",
"path": "M100,43.56248903123867Q100,40.56248903123867,103,40.56248903123867L112,40.56248903123867Q115,40.56248903123867,115,43.56248903123867L115,52.56248903123867Q115,55.56248903123867,112,55.56248903123867L103,55.56248903123867Q100,55.56248903123867,100,52.56248903123867Z",
"numberX": "107.5",
"numberY": "48.06248903123867",
"numberDY": "2.5156140312386697"
}

Does this format look familiar to anyone? The research I've done looks like I'll end up using SkiaSharp, but I'm not sure where to go from there.

Best Answer

Answers

  • LanceKingLanceKing USMember ✭✭

    Update:

    Further investigation leads me to believe that the JSON data above is meant for use in an HTML SVG element.

    My question has now changed to:
    Does anyone know of a way to display (or process and display) shapes that are formatted like this?

  • LanceKingLanceKing USMember ✭✭

    @mattleibow any chance you have some insight for me? I started with SkiaSharp, but it seemed that the SVG resources had to be compiled.

    Beating my head against this tirelessly.

Sign In or Register to comment.