Last updated

API / geotoolkit / svg / SVGParser / SVGParser

Class: SVGParser

svg.SVGParser.SVGParser

A class that parses svg documents into carnac shapes

Table of contents

Constructors
Methods

Contents

Constructors

new SVGParser(xmlDocument, dpi)

new SVGParser(xmlDocument?, dpi?)

Create SVGParser

Parameters

Name Type Description
Optional xmlDocumentXmlDocumentInput SVG document to parse
Optional dpinumberScreen resolution
Methods

getClassName

getClassName(): string

Returns

string


getSvgMetaInfo

getSvgMetaInfo(doc?): EmptyRecord | MetaInfo

Returns information stored in svg tag of the document

Parameters

Name Type Description
Optional docstring | DocumentThe document to parse

Returns

EmptyRecord | MetaInfo

Object with meta information from the svg tag


parse

parse(shapesGroup, doc?): ParseResult

Parses the given XML document into given group

Parameters

Name Type Description
shapesGroupGroup<Node>A group to fill with parsed elements
Optional docstring | DocumentThe document to parse

Returns

ParseResult


scalablePatterns

scalablePatterns(): boolean

Returns pattern scalability flag

Returns

boolean


setScalablePatterns

setScalablePatterns(scale): SVGParser

Sets pattern scalability flag

Parameters

Name Type Description
scalebooleanPattern scalability flag

Returns

SVGParser


getClassName

Static getClassName(): string

Returns

string