URIs and href

From Inkscape Wiki
Revision as of 14:51, 21 October 2019 by Tavmjong (talk | contribs) (Created page with " This page documents Inkscape's handling of URI's. There are two types of URI's: # In attributes: <use xlink:href="#MyObject"> # In properties: style="fill:#MyGradient...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page documents Inkscape's handling of URI's.

There are two types of URI's:

  1. In attributes: <use xlink:href="#MyObject">
  2. In properties: style="fill:#MyGradient"

Basic functionality is handled by the URIReference class which has many derived classes:

  • ItemReference (LPE)
  • PathReference (LPE)
  • LPEObjectReference
  • SPClipPathReference (created in SPItem::SPItem with object )
  • SPGradientReference (created in SPGradient::SPGradient)
  • SPMarkerReference (not used!)
  • SPPaintServerReference (created in SPIPaint::read with document)
  • SPHatchReference
  • SPPatternReference
  • Persp3DReference
  • SPUseReference (created in SPUse::SPUse with object)
  • SPFilterReference (created in SPIFilter::read with object)b
  • SPTagUseReference
  • SPMaskReference (created in SPItem::SPItem with item)
  • SPTRefReference

The derived classes generally only override:

  • The constructor
  • getObject() checking to make sure it's the right type of object
  • _acceptObject() checking to make sure it's the right type of object and checking for circular references

Currently only SPPaintServerReference and SPFilterReference are used by properties, although SPMaskReference and SPClipPathReference should be too as they correspond to CSS properties (but Inkscape doesn't support these properties yet).