libgpac
Documentation of the core library of GPAC
scenegraph_svg.h File Reference

Scenegraph for SVG files. More...

#include <gpac/scenegraph.h>
#include <gpac/svg_types.h>
+ Include dependency graph for scenegraph_svg.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  GF_DOMAttribute
 
struct  GF_DOMFullAttribute
 
struct  GF_DOMNode
 
struct  GF_DOMFullNode
 
struct  GF_DOMText
 
struct  GF_DOMUpdates
 
struct  GF_DOMEventTarget
 
struct  GF_DOMMediaEvent
 
struct  GF_DOM_Event
 
struct  GF_DOMHandler
 
struct  SVGPropertiesPointers
 

Macros

#define GF_DOM_BASE_ATTRIBUTE
 
#define GF_DOM_FULL_ATTRIBUTE    GF_DOM_ATTRIBUTE \
 
#define GF_DOM_BASE_NODE
 
#define GF_DOM_BASE_LISTENER
 

Typedefs

typedef struct _smil_timing_rti SMIL_Timing_RTI
 
typedef void gf_sg_smil_evaluate(struct _smil_timing_rti *rti, Fixed normalized_simple_time, GF_SGSMILTimingEvalState state)
 
typedef struct __dom_base_attribute SVGAttribute
 
typedef struct __dom_full_attribute SVGExtendedAttribute
 
typedef struct __dom_base_node SVG_Element
 
typedef struct __xml_ev_handler SVG_handlerElement
 
typedef struct _all_atts SVGAllAttributes
 

Enumerations

enum  {
  TAG_DOM_ATTRIBUTE_NULL , TAG_DOM_ATT_any , TAG_XML_ATT_RANGE_FIRST , TAG_XML_ATT_id = TAG_XML_ATT_RANGE_FIRST ,
  TAG_XML_ATT_base , TAG_XML_ATT_lang , TAG_XML_ATT_space , TAG_XML_ATT_RANGE_LAST ,
  TAG_XLINK_ATT_RANGE_FIRST , TAG_XLINK_ATT_type = TAG_XLINK_ATT_RANGE_FIRST , TAG_XLINK_ATT_role , TAG_XLINK_ATT_arcrole ,
  TAG_XLINK_ATT_title , TAG_XLINK_ATT_href , TAG_XLINK_ATT_show , TAG_XLINK_ATT_actuate ,
  TAG_XLINK_ATT_RANGE_LAST , TAG_XMLEV_ATT_RANGE_FIRST , TAG_XMLEV_ATT_event , TAG_XMLEV_ATT_phase ,
  TAG_XMLEV_ATT_propagate , TAG_XMLEV_ATT_defaultAction , TAG_XMLEV_ATT_observer , TAG_XMLEV_ATT_target ,
  TAG_XMLEV_ATT_handler , TAG_XMLEV_ATT_RANGE_LAST , TAG_LSR_ATT_RANGE_FIRST , TAG_LSR_ATT_enabled ,
  TAG_LSR_ATT_RANGE_LAST , TAG_LSR_ATT_children , TAG_LSR_ATT_overflow , TAG_LSR_ATT_rotation ,
  TAG_LSR_ATT_scale , TAG_LSR_ATT_translation , TAG_LSR_ATT_svg_width , TAG_LSR_ATT_svg_height ,
  TAG_LSR_ATT_textContent , TAG_LSR_ATT_text_display , TAG_SVG_ATT_RANGE_FIRST , TAG_SVG_ATT_id = TAG_SVG_ATT_RANGE_FIRST ,
  TAG_SVG_ATT__class , TAG_SVG_ATT_requiredFeatures , TAG_SVG_ATT_requiredExtensions , TAG_SVG_ATT_requiredFormats ,
  TAG_SVG_ATT_requiredFonts , TAG_SVG_ATT_systemLanguage , TAG_SVG_ATT_display , TAG_SVG_ATT_visibility ,
  TAG_SVG_ATT_image_rendering , TAG_SVG_ATT_pointer_events , TAG_SVG_ATT_shape_rendering , TAG_SVG_ATT_text_rendering ,
  TAG_SVG_ATT_audio_level , TAG_SVG_ATT_viewport_fill , TAG_SVG_ATT_viewport_fill_opacity , TAG_SVG_ATT_overflow ,
  TAG_SVG_ATT_fill_opacity , TAG_SVG_ATT_stroke_opacity , TAG_SVG_ATT_fill , TAG_SVG_ATT_fill_rule ,
  TAG_SVG_ATT_filter , TAG_SVG_ATT_stroke , TAG_SVG_ATT_stroke_dasharray , TAG_SVG_ATT_stroke_dashoffset ,
  TAG_SVG_ATT_stroke_linecap , TAG_SVG_ATT_stroke_linejoin , TAG_SVG_ATT_stroke_miterlimit , TAG_SVG_ATT_stroke_width ,
  TAG_SVG_ATT_color , TAG_SVG_ATT_color_rendering , TAG_SVG_ATT_vector_effect , TAG_SVG_ATT_solid_color ,
  TAG_SVG_ATT_solid_opacity , TAG_SVG_ATT_display_align , TAG_SVG_ATT_line_increment , TAG_SVG_ATT_stop_color ,
  TAG_SVG_ATT_stop_opacity , TAG_SVG_ATT_font_family , TAG_SVG_ATT_font_size , TAG_SVG_ATT_font_style ,
  TAG_SVG_ATT_font_variant , TAG_SVG_ATT_font_weight , TAG_SVG_ATT_text_anchor , TAG_SVG_ATT_text_align ,
  TAG_SVG_ATT_text_decoration , TAG_SVG_ATT_focusHighlight , TAG_SVG_ATT_externalResourcesRequired , TAG_SVG_ATT_focusable ,
  TAG_SVG_ATT_nav_next , TAG_SVG_ATT_nav_prev , TAG_SVG_ATT_nav_up , TAG_SVG_ATT_nav_up_right ,
  TAG_SVG_ATT_nav_right , TAG_SVG_ATT_nav_down_right , TAG_SVG_ATT_nav_down , TAG_SVG_ATT_nav_down_left ,
  TAG_SVG_ATT_nav_left , TAG_SVG_ATT_nav_up_left , TAG_SVG_ATT_transform , TAG_SVG_ATT_target ,
  TAG_SVG_ATT_attributeName , TAG_SVG_ATT_attributeType , TAG_SVG_ATT_begin , TAG_SVG_ATT_dur ,
  TAG_SVG_ATT_end , TAG_SVG_ATT_repeatCount , TAG_SVG_ATT_repeatDur , TAG_SVG_ATT_restart ,
  TAG_SVG_ATT_smil_fill , TAG_SVG_ATT_min , TAG_SVG_ATT_max , TAG_SVG_ATT_to ,
  TAG_SVG_ATT_calcMode , TAG_SVG_ATT_values , TAG_SVG_ATT_keyTimes , TAG_SVG_ATT_keySplines ,
  TAG_SVG_ATT_from , TAG_SVG_ATT_by , TAG_SVG_ATT_additive , TAG_SVG_ATT_accumulate ,
  TAG_SVG_ATT_path , TAG_SVG_ATT_keyPoints , TAG_SVG_ATT_rotate , TAG_SVG_ATT_origin ,
  TAG_SVG_ATT_transform_type , TAG_SVG_ATT_clipBegin , TAG_SVG_ATT_clipEnd , TAG_SVG_ATT_syncBehavior ,
  TAG_SVG_ATT_syncTolerance , TAG_SVG_ATT_syncMaster , TAG_SVG_ATT_syncReference , TAG_SVG_ATT_x ,
  TAG_SVG_ATT_y , TAG_SVG_ATT_width , TAG_SVG_ATT_height , TAG_SVG_ATT_preserveAspectRatio ,
  TAG_SVG_ATT_initialVisibility , TAG_SVG_ATT_type , TAG_SVG_ATT_cx , TAG_SVG_ATT_cy ,
  TAG_SVG_ATT_r , TAG_SVG_ATT_cursorManager_x , TAG_SVG_ATT_cursorManager_y , TAG_SVG_ATT_rx ,
  TAG_SVG_ATT_ry , TAG_SVG_ATT_horiz_adv_x , TAG_SVG_ATT_horiz_origin_x , TAG_SVG_ATT_font_stretch ,
  TAG_SVG_ATT_unicode_range , TAG_SVG_ATT_panose_1 , TAG_SVG_ATT_widths , TAG_SVG_ATT_bbox ,
  TAG_SVG_ATT_units_per_em , TAG_SVG_ATT_stemv , TAG_SVG_ATT_stemh , TAG_SVG_ATT_slope ,
  TAG_SVG_ATT_cap_height , TAG_SVG_ATT_x_height , TAG_SVG_ATT_accent_height , TAG_SVG_ATT_ascent ,
  TAG_SVG_ATT_descent , TAG_SVG_ATT_ideographic , TAG_SVG_ATT_alphabetic , TAG_SVG_ATT_mathematical ,
  TAG_SVG_ATT_hanging , TAG_SVG_ATT_underline_position , TAG_SVG_ATT_underline_thickness , TAG_SVG_ATT_strikethrough_position ,
  TAG_SVG_ATT_strikethrough_thickness , TAG_SVG_ATT_overline_position , TAG_SVG_ATT_overline_thickness , TAG_SVG_ATT_d ,
  TAG_SVG_ATT_unicode , TAG_SVG_ATT_glyph_name , TAG_SVG_ATT_arabic_form , TAG_SVG_ATT_lang ,
  TAG_SVG_ATT_u1 , TAG_SVG_ATT_g1 , TAG_SVG_ATT_u2 , TAG_SVG_ATT_g2 ,
  TAG_SVG_ATT_k , TAG_SVG_ATT_opacity , TAG_SVG_ATT_x1 , TAG_SVG_ATT_y1 ,
  TAG_SVG_ATT_x2 , TAG_SVG_ATT_y2 , TAG_SVG_ATT_filterUnits , TAG_SVG_ATT_gradientUnits ,
  TAG_SVG_ATT_spreadMethod , TAG_SVG_ATT_gradientTransform , TAG_SVG_ATT_pathLength , TAG_SVG_ATT_points ,
  TAG_SVG_ATT_mediaSize , TAG_SVG_ATT_mediaTime , TAG_SVG_ATT_mediaCharacterEncoding , TAG_SVG_ATT_mediaContentEncodings ,
  TAG_SVG_ATT_bandwidth , TAG_SVG_ATT_fx , TAG_SVG_ATT_fy , TAG_SVG_ATT_size ,
  TAG_SVG_ATT_choice , TAG_SVG_ATT_delta , TAG_SVG_ATT_offset , TAG_SVG_ATT_syncBehaviorDefault ,
  TAG_SVG_ATT_syncToleranceDefault , TAG_SVG_ATT_viewBox , TAG_SVG_ATT_zoomAndPan , TAG_SVG_ATT_version ,
  TAG_SVG_ATT_baseProfile , TAG_SVG_ATT_contentScriptType , TAG_SVG_ATT_snapshotTime , TAG_SVG_ATT_timelineBegin ,
  TAG_SVG_ATT_playbackOrder , TAG_SVG_ATT_editable , TAG_SVG_ATT_text_x , TAG_SVG_ATT_text_y ,
  TAG_SVG_ATT_text_rotate , TAG_SVG_ATT_transformBehavior , TAG_SVG_ATT_overlay , TAG_SVG_ATT_fullscreen ,
  TAG_SVG_ATT_motionTransform , TAG_SVG_ATT_clip_path , TAG_SVG_ATT_filter_transfer_type , TAG_SVG_ATT_filter_table_values ,
  TAG_SVG_ATT_filter_intercept , TAG_SVG_ATT_filter_amplitude , TAG_SVG_ATT_filter_exponent , TAG_GSVG_ATT_useAsPrimary ,
  TAG_GSVG_ATT_depthOffset , TAG_GSVG_ATT_depthGain
}
 
enum  GF_NamespaceType {
  GF_XMLNS_UNDEFINED = 0 , GF_XMLNS_XML , GF_XMLNS_XLINK , GF_XMLNS_XMLEV ,
  GF_XMLNS_LASER , GF_XMLNS_SVG , GF_XMLNS_XBL , GF_XMLNS_SVG_GPAC_EXTENSION
}
 
enum  { GF_DOM_TEXT_REGULAR = 0 , GF_DOM_TEXT_CDATA , GF_DOM_TEXT_INSERTED }
 
enum  GF_DOMEventPhase {
  GF_DOM_EVENT_PHASE_CAPTURE = 1 , GF_DOM_EVENT_PHASE_AT_TARGET = 2 , GF_DOM_EVENT_PHASE_BUBBLE = 3 , GF_DOM_EVENT_CANCEL_MASK = 0xE0 ,
  GF_DOM_EVENT_PHASE_CANCEL = 1<<5 , GF_DOM_EVENT_PHASE_CANCEL_ALL = 1<<6 , GF_DOM_EVENT_PHASE_PREVENT = 1<<7
}
 
enum  GF_DOMEventTargetType {
  GF_DOM_EVENT_TARGET_NODE , GF_DOM_EVENT_TARGET_DOCUMENT , GF_DOM_EVENT_TARGET_MSE_MEDIASOURCE , GF_DOM_EVENT_TARGET_MSE_SOURCEBUFFERLIST ,
  GF_DOM_EVENT_TARGET_MSE_SOURCEBUFFER , GF_DOM_EVENT_TARGET_XHR
}
 
enum  GF_DOMEventCategory {
  GF_DOM_EVENT_UNKNOWN_CATEGORY , GF_DOM_EVENT_DOM = 1 , GF_DOM_EVENT_MUTATION = 1<<1 , GF_DOM_EVENT_MOUSE = 1<<2 ,
  GF_DOM_EVENT_FOCUS = 1<<3 , GF_DOM_EVENT_KEY = 1<<4 , GF_DOM_EVENT_UI = 1<<5 , GF_DOM_EVENT_TEXT = 1<<6 ,
  GF_DOM_EVENT_SVG = 1<<7 , GF_DOM_EVENT_SMIL = 1<<8 , GF_DOM_EVENT_LASER = 1<<9 , GF_DOM_EVENT_MEDIA = 1<<10 ,
  GF_DOM_EVENT_MEDIASOURCE = 1<<11 , GF_DOM_EVENT_GPAC = 1<<30 , GF_DOM_EVENT_FAKE = 0x80000000
}
 
enum  GF_SGSMILTimingEvalState {
  SMIL_TIMING_EVAL_NONE = 0 , SMIL_TIMING_EVAL_UPDATE , SMIL_TIMING_EVAL_FREEZE , SMIL_TIMING_EVAL_REMOVE ,
  SMIL_TIMING_EVAL_REPEAT , SMIL_TIMING_EVAL_FRACTION , SMIL_TIMING_EVAL_DISCARD , SMIL_TIMING_EVAL_ACTIVATE ,
  SMIL_TIMING_EVAL_DEACTIVATE
}
 

Functions

GF_NamespaceType gf_xml_get_namespace_id (char *name)
 
GF_Err gf_sg_add_namespace (GF_SceneGraph *sg, char *name, char *qname)
 
GF_Err gf_sg_remove_namespace (GF_SceneGraph *sg, char *name, char *qname)
 
GF_NamespaceType gf_sg_get_namespace_code (GF_SceneGraph *sg, char *qname)
 
GF_NamespaceType gf_sg_get_namespace_code_from_name (GF_SceneGraph *sg, char *name)
 
const char * gf_sg_get_namespace_qname (GF_SceneGraph *sg, GF_NamespaceType xmlns_id)
 
const char * gf_sg_get_namespace (GF_SceneGraph *sg, GF_NamespaceType xmlns_id)
 
void gf_xml_push_namespaces (GF_DOMNode *elt)
 
void gf_xml_pop_namespaces (GF_DOMNode *elt)
 
GF_NamespaceType gf_xml_get_element_namespace (GF_Node *n)
 
GF_DOMTextgf_dom_add_text_node (GF_Node *parent, char *text_data)
 
void gf_dom_set_textContent (GF_Node *n, char *text)
 
char * gf_dom_flatten_textContent (GF_Node *n)
 
GF_DOMTextgf_dom_new_text_node (GF_SceneGraph *sg)
 
GF_DOMUpdatesgf_dom_add_updates_node (GF_Node *parent)
 
GF_DOMEventTargetgf_dom_event_target_new (GF_DOMEventTargetType type, void *obj)
 
GF_Err gf_sg_listener_associate (GF_Node *listener, GF_DOMEventTarget *evt_target)
 
Bool gf_dom_event_fire (GF_Node *node, GF_DOM_Event *event)
 
Bool gf_sg_fire_dom_event (GF_DOMEventTarget *et, GF_DOM_Event *event, GF_SceneGraph *sg, GF_Node *n)
 
Bool gf_dom_event_fire_ex (GF_Node *node, GF_DOM_Event *event, GF_List *use_stack)
 
GF_EventType gf_dom_event_type_by_name (const char *name)
 
const char * gf_dom_event_get_name (GF_EventType type)
 
const char * gf_dom_get_key_name (GF_KeyCode key_identifier)
 
GF_KeyCode gf_dom_get_key_type (char *key_name)
 
GF_DOMEventCategory gf_dom_event_get_category (GF_EventType type)
 
void gf_sg_register_event_type (GF_SceneGraph *sg, GF_DOMEventCategory category)
 
void gf_sg_unregister_event_type (GF_SceneGraph *sg, GF_DOMEventCategory category)
 
GF_Err gf_node_dom_listener_add (GF_Node *n, GF_Node *listener)
 
u32 gf_dom_listener_count (GF_Node *n)
 
GF_Nodegf_dom_listener_get (GF_Node *n, u32 idx)
 
GF_DOMHandlergf_dom_listener_build (GF_Node *observer, GF_EventType event_type, u32 event_param)
 
void gf_node_register_iri (GF_SceneGraph *sg, XMLRI *iri)
 
void gf_node_unregister_iri (GF_SceneGraph *sg, XMLRI *iri)
 
u32 gf_node_animation_count (GF_Node *n)
 
GF_Err gf_node_store_embedded_data (XMLRI *iri, const char *cache_dir, const char *base_filename)
 
void gf_svg_properties_init_pointers (SVGPropertiesPointers *svg_props)
 
void gf_svg_properties_reset_pointers (SVGPropertiesPointers *svg_props)
 
void gf_svg_apply_animations (GF_Node *n, SVGPropertiesPointers *render_svg_props)
 
Bool gf_svg_has_appearance_flag_dirty (u32 flags)
 
Bool gf_svg_is_element_transformable (u32 tag)
 
void * gf_svg_create_attribute_value (u32 attribute_type)
 
void gf_svg_delete_attribute_value (u32 attribute_type, void *value, GF_SceneGraph *sg)
 
Bool gf_svg_attributes_equal (GF_FieldInfo *a, GF_FieldInfo *b)
 
GF_Err gf_svg_attributes_copy (GF_FieldInfo *a, GF_FieldInfo *b, Bool clamp)
 
GF_Err gf_svg_attributes_add (GF_FieldInfo *a, GF_FieldInfo *b, GF_FieldInfo *c, Bool clamp)
 
Bool gf_svg_attribute_is_interpolatable (u32 type)
 
GF_Err gf_svg_attributes_interpolate (GF_FieldInfo *a, GF_FieldInfo *b, GF_FieldInfo *c, Fixed coef, Bool clamp)
 
GF_Err gf_svg_attributes_muladd (Fixed alpha, GF_FieldInfo *a, Fixed beta, GF_FieldInfo *b, GF_FieldInfo *c, Bool clamp)
 
GF_Err gf_node_get_attribute_by_tag (GF_Node *n, u32 attribute_tag, Bool create_if_not_found, Bool set_default, GF_FieldInfo *field)
 
const char * gf_svg_attribute_type_to_string (u32 att_type)
 
GF_Err gf_svg_parse_attribute (GF_Node *n, GF_FieldInfo *info, char *attribute_content, u8 anim_value_type)
 
void gf_svg_parse_style (GF_Node *n, char *style)
 
char * gf_svg_dump_attribute (GF_Node *n, GF_FieldInfo *info)
 
char * gf_svg_dump_attribute_indexed (GF_Node *n, GF_FieldInfo *info)
 
void gf_svg_path_build (GF_Path *path, GF_List *commands, GF_List *points)
 
GF_Err gf_svg_parse_element_id (GF_Node *n, const char *nodename, Bool warning_if_defined)
 
const char * gf_svg_get_system_paint_server_name (u32 paint_type)
 
u32 gf_svg_get_system_paint_server_type (const char *name)
 
Bool gf_smil_notify_timed_elements (GF_SceneGraph *sg)
 
void gf_smil_timing_insert_clock (GF_Node *n, Bool is_end, Double clock)
 
Bool gf_svg_parse_transformlist (GF_Matrix2D *mat, char *attribute_content)
 
void gf_smil_set_evaluation_callback (GF_Node *smil_time, gf_sg_smil_evaluate smil_evaluate)
 
void gf_smil_set_media_duration (SMIL_Timing_RTI *rti, Double media_duration)
 
Double gf_smil_get_media_duration (SMIL_Timing_RTI *rti)
 
GF_Nodegf_smil_get_element (SMIL_Timing_RTI *rti)
 
Bool gf_smil_timing_is_active (GF_Node *node)
 
void gf_smil_timing_modified (GF_Node *node, GF_FieldInfo *field)
 
void gf_svg_flatten_attributes (SVG_Element *n, SVGAllAttributes *all_atts)
 
const char * gf_svg_get_attribute_name (GF_Node *n, u32 tag)
 
u32 gf_svg_apply_inheritance (SVGAllAttributes *all_atts, SVGPropertiesPointers *render_svg_props)
 
GF_DOMAttributegf_xml_create_attribute (GF_Node *n, u32 tag)
 
u32 gf_xml_get_attribute_type (u32 tag)
 
u32 gf_xml_get_attribute_tag (GF_Node *n, char *attribute_name, GF_NamespaceType ns)
 
u32 gf_xml_get_element_tag (const char *node_name, u32 xmlns)
 

Detailed Description

>