Module Svg_types

module Svg_types : sig..end

SVG types with variants. (See also Svg.​M)


This module defines basic data types for data, attributes and element occuring in SVG documents. It is based on the specification available at http://www.w3.org/TR/SVG/.

This module is experimental, it may lack of some attributes, and the interface is very low level and do not take deeply into account the needs of SVG elements.

Categories of elements and attributes

This part defines the categories of elements and attributes

Elements

type animation_element = 
  [ `Animate | `AnimateColor | `AnimateMotion | `AnimateTransform | `Set ]
type descriptive_element = [ `Desc | `Metadata | `Title ]
type basic_shape_element = [ `Circle | `Ellipse | `Line | `Polygon | `Polyline | `Rect ]
type container_element = 
  [ `A
  | `Defs
  | `G
  | `Glyph
  | `Marker
  | `Mask
  | `Missing_glyph
  | `Pattern
  | `Svg
  | `Switch
  | `Symbol ]
type filter_primitive_element = 
  [ `FeBlend
  | `FeColorMatrix
  | `FeComponentTransfer
  | `FeComposite
  | `FeConvolveMatrix
  | `FeDiffuseLighting
  | `FeDisplacementMap
  | `FeFlood
  | `FeGaussianBlur
  | `FeImage
  | `FeMerge
  | `FeMorphology
  | `FeOffset
  | `FeSpecularLighting
  | `FeTile
  | `FeTurbulence ]
type light_source_element = [ `FeDistantLight | `FePointLight | `FeSpotLight ]
type shape_element = 
  [ `Circle | `Ellipse | `Line | `Path | `Polygon | `Polyline | `Rect ]
type structural_element = [ `Defs | `G | `Svg | `Symbol | `Use ]
type text_content_element = [ `AltGlyph | `Text | `TextPath | `Tref | `Tspan ]
type text_content_child_element = [ `AltGlyph | `TextPath | `Tref | `Tspan ]
type gradient_element = [ `Lineargradient | `Radialgradient ]
type graphics_element = 
  [ `Circle
  | `Ellipse
  | `Image
  | `Line
  | `Path
  | `Polygon
  | `Polyline
  | `Rect
  | `Text
  | `Use ]
type graphics_ref_element = [ `Image | `Use ]

Attributes

type conditional_processing_attr = [ `RequiredExtensions | `RequiredFeatures | `SystemLanguage ]
type core_attr = [ `Id | `Xml_base | `Xml_lang | `Xml_space ]
type transfer_attr = 
  [ `Amplitude
  | `Exponent
  | `Intercept
  | `Offset_transfer
  | `Slope
  | `TableValues
  | `Type_transfert ]
type document_event_attr = 
  [ `OnAbort | `OnError | `OnResize | `OnScroll | `OnUnload | `OnZoom ]
type filter_primitive_attr = [ `Height | `Result | `Width | `X | `Y ]
type animation_event_attr = [ `OnBegin | `OnEnd | `OnLoad | `OnRepeat ]
type animation_attr_target_attr = [ `AttributeName | `AttributeType ]
type animation_timing_attr = 
  [ `Begin
  | `Dur
  | `End
  | `Fill_Animation
  | `Max
  | `Min
  | `RepeatCount
  | `RepeatDur
  | `Restart ]
type animation_value_attr = 
  [ `By | `CalcMode | `From | `KeySplines | `KeyTimes | `To | `Values ]
type animation_addition_attr = [ `Accumulate | `Additive ]
type presentation_attr = 
  [ `Alignement_Baseline
  | `Baseline_Shift
  | `Clip
  | `Clip_Path
  | `Clip_Rule
  | `Color
  | `Color_Interpolation