///|
pub struct SvgImportResult {
priv commands : Array[@core.DrawCommand]
priv diagnostics : Array[String]
} derive(Eq, Debug, ToJson)
///|
pub extend SvgImportResult with Debug::{to_repr}
///|
pub extend SvgImportResult with Eq::{not_equal, equal}
///|
pub extend SvgImportResult with ToJson::{to_json}
///|
pub fn SvgImportResult::commands(
self : SvgImportResult,
) -> Array[@core.DrawCommand] {
self.commands
}
///|
pub fn SvgImportResult::diagnostics(self : SvgImportResult) -> Array[String] {
self.diagnostics
}
///|
pub fn import_svg(svg : String) -> SvgImportResult {
let result = SvgImportResult::{ commands: [], diagnostics: [], }
if !svg.contains("