Is the SwiftUI Path object's string format a standard?

Viewed 96

I am exporting SwiftUI Path objects to strings using the description property, for storage in a database.

This is an example of the format that it produces:

0 0 m 1 0 l 1 2 l 0.25 2 l 0.25 0.25 l 0 0.25 l h

This can be used later to initialise a new Path object, recreating the path.

I'm not overly familiar with vector paths - is this a well defined format, perhaps a standard? Or is this something that is specific to SwiftUI?

I can't see a format mentioned in the linked documentation.

I ask as at some point I intend these formats to be cross platform, and would like to future proof it now by choosing a more agnostic format if necessary.

0 Answers
Related