Detailed Description

A base class for all SVG tag types. This is used to distictively identify them.

Inheritance diagram for Svg.SVGElement:
Dom.Element Css.IRenderableNode Dom.Node Dom.EventTarget Dom.IParentNode Dom.IEventTarget Svg.SVGClipPathElement Svg.SVGDefsElement Svg.SVGDescElement Svg.SVGFilterElement Svg.SVGFilterPrimitiveStandardAttributes Svg.SVGFontElement Svg.SVGFontFaceElement Svg.SVGFontFaceSrcElement Svg.SVGFontFaceUriElement Svg.SVGForeignObjectElement Svg.SVGGElement Svg.SVGGlyphElement Svg.SVGGraphicsElement Svg.SVGKernElement Svg.SVGMaskElement Svg.SVGMetadataElement Svg.SVGStopElement Svg.SVGSVGElement Svg.SVGSwitchElement Svg.SVGSymbolElement Svg.SVGTitleElement Svg.SVGUseElement

Public Member Functions

 SVGElement ()
 
void WentOffScreen ()
 Called when this element goes offscreen. More...
 
void OnRender (Renderman renderer)
 Called during a global render event on all elements. This knows exactly where the element is on screen. More...
 
void GetWidthBounds (out float min, out float max)
 Part of shrink-to-fit. Computes the maximum and minimum possible width for an element. More...
 
Element querySelector (string selector)
 Gets the first element which matches the given selector. More...
 
HTMLCollection querySelectorAll (string selector)
 Gets all child elements with the given tag. More...
 
HTMLCollection querySelectorAll (string selector, bool one)
 Gets all child elements with the given tag. More...
 
void querySelectorAll (Selector[] selectors, INodeList results, CssEvent e, bool one)
 Gets all child elements with the given tag. More...
 
virtual void OnComputeBox (Renderman renderer, Css.LayoutBox box, ref bool widthUndefined, ref bool heightUndefined)
 Called during the box compute process. Useful if your element has clever dimensions, such as the img tag or words. More...
 
void FontLoaded (DynamicFont font)
 Called when a font-face is ready. More...
 
float GetFloatAttribute (string property, float dflt)
 Gets the value of the given property as a float. More...
 
SVGElement TryResolveHref ()
 Finds the element by ID stored in this elements href attribute. More...
 
virtual void BuildFilter (RenderContext ctx)
 
override bool OnAttributeChange (string property)
 Called on an instance of this handler when an attribute on the element it's attached to changes. It's also called when the tag is being loaded. More...
 
float GetDecimal (Css.CssProperty property)
 Resolves a float value. More...
 
int GetInt (Css.CssProperty property)
 Resolves an integer from the computed style. More...
 
virtual VectorPath GetPath (SVGElement context, RenderContext renderer)
 Gets the path this tag represents. Note that it can potentially be a clipping path. More...
 
- Public Member Functions inherited from Dom.Element
virtual void OnChildrenLoaded ()
 Called when this elements children are fully loaded. More...
 
virtual void OnTagLoaded ()
 Called when the tag is instanced and the element plus its attributes and kids have been fully parsed. More...
 
Element GetParentByTagName (string tag)
 Gets a parent element by tag name. More...
 
virtual bool OnDrag (PowerUI.DragEvent e)
 Called repeatedly when this element is being dragged. More...
 
virtual int SetLexerMode (bool last, HtmlLexer lexer)
 When the given lexer resets, this is called. More...
 
override Node cloneNode (bool deep)
 Clones this node. More...
 
virtual bool OnLexerCloseNode (HtmlLexer lexer, int mode)
 Called when a close tag of this element has been created and is being added to the given lexer. Note that this method must not use 'this'. It is most often called as if it was a static method. It's not a static method so it can use inheritence and, as a result, be easily used on the element objects on the current open element stack. More...
 
void before (Node node)
 Inserts a node before this element. More...
 
void after (Node node)
 Inserts an element after this element. More...
 
void before (string html)
 Inserts html before this element. More...
 
void after (string html)
 Inserts html after this element. More...
 
override string ToString ()
 
void insertAdjacentHTML (string positionName, string html)
 Inserts HTML at the given position name. More...
 
void appendTextContent (string text)
 Appends the given literal text to the content of this element. This is good for preventing html injection as the text will be taken literally. More...
 
void append (string html)
 Appends the given html text to the content of this element. More...
 
void append (Element child)
 Appends the given child element to the content of this element. More...
 
void appendInnerHTML (string text)
 Appends the given html text to the content of this element. More...
 
void insertInnerHTML (int index, string text)
 Inserts HTML into this element at the given index. Pushes any elements at the given index over. More...
 
void prepend (Element child)
 Prepends the given child element to the content of this element, adding it as the first child. More...
 
void prepend (string text)
 Prepends the given html text to the content of this element, adding it as the first child. More...
 
void prependInnerHTML (string text)
 Prepends the given html text to the content of this element, adding it as the first child. More...
 
override bool isEqualNode (Node other)
 Tests whether two nodes are the same by attribute comparison. More...
 
void GetPropertyString (System.Text.StringBuilder result)
 A string built from the properties only. More...
 
override void ToString (System.Text.StringBuilder result)
 Gets a string representation of this element. More...
 
bool isChild (Node childElement)
 Checks if the given element is a child of this element. More...
 
void AddToAttributeLookups ()
 Adds this element to all fast lookups. More...
 
void AddToAttributeLookup (string attrib, AttributeLookup lookup)
 Adds this element to the given attribute lookup. More...
 
AttributeNode getAttributeNodeNS (string ns, string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
void setAttributeNodeNS (AttributeNode node)
 Set the named attribute. element[name] is generally better. More...
 
AttributeNode getAttributeNode (string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
bool hasAttributeNode (AttributeNode node)
 Does this element have the named attribute? element[name] is generally better. More...
 
void setAttributeNode (AttributeNode node)
 Set the named attribute. element[name] is generally better. More...
 
void removeAttributeNode (AttributeNode node)
 Remove the named attribute. element[name] is generally better. More...
 
string getAttributeNS (string ns, string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
bool hasAttributeNS (string ns, string name)
 Does this element have the named attribute? element[name] is generally better. More...
 
void setAttributeNS (string ns, string name, string value)
 Set the named attribute. element[name] is generally better. More...
 
void removeAttributeNS (string ns, string name)
 Remove the named attribute. element[name] is generally better. More...
 
string getAttribute (string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
bool hasAttribute (string name)
 Does this element have the named attribute? element[name] is generally better. More...
 
void setAttribute (string name, string value)
 Set the named attribute. element[name] is generally better. More...
 
void removeAttribute (string name)
 Remove the named attribute. element[name] is generally better. More...
 
void cue ()
 Cues the element to advance any paused PowerSlide slides. More...
 
bool matches (string selectorText)
 True if this element matches the given selector. More...
 
- Public Member Functions inherited from Dom.Node
HtmlElement getByTagName (string tag)
 Casts getElementByTagName to a HtmlElement for you (exists because of SVG and MathML). More...
 
HtmlElement getById (string id)
 Casts getElementById to a HtmlElement for you (exists because of SVG and MathML). More...
 
HtmlElement getByAttribute (string property, string value)
 Casts getElementByAttribute to a HtmlElement for you (exists because of SVG and MathML). More...
 
bool isBefore (Node other)
 True if this element is before the other one in the DOM. More...
 
void insertAfter (Node toInsert, Node after)
 Inserts the given element after the given one. More...
 
Node prependChild (Node child)
 Prepends the given element as a child. More...
 
Node insertBefore (Node toInsert, Node before)
 Inserts the given element before the given one. More...
 
Node replaceChild (Node with, Node element)
 Replaces the given child with another. More...
 
Node appendChild (Node element)
 Adds the given element to the children of this element. More...
 
Node moveChild (Node toMove, int index)
 Moves the given node to the given new index. More...
 
Node removeChildAt (int index)
 Removes the child at the given index from this element. More...
 
Node removeChild (Node element)
 Removes the given child from this element. More...
 
bool hasChildNodes ()
 True if this element has any child nodes. More...
 
virtual bool OnLexerAddNode (HtmlLexer lexer, int mode)
 Called when this node has been created and is being added to the given lexer. Closely related to Element.OnLexerCloseNode. More...
 
void normalize ()
 Normalises this node. More...
 
bool isSupported (string feature, string version)
 Is the given feature supported? More...
 
bool hasAttributes ()
 Does this node have any attributes? More...
 
ushort compareDocumentPosition (Node other)
 Compare document position (two elements only here). More...
 
bool isParentOf (Node node)
 True if this is a parent of the given node. More...
 
bool contains (Node node)
 True if the given node is a descendant of this or not. More...
 
string lookupNamespaceURI (string nsUri)
 Looks up a namespace URI, returning the prefix. More...
 
HTMLCollection getElementsByClassName (string className)
 Gets all elements with the given class name(s), seperated by spaces. May include this element or any of it's kids. More...
 
Element getElementByTagNameNS (string namespaceURI, string tag)
 Gets the first child element with the given tag. More...
 
HTMLCollection getElementsByTagNameNS (string namespaceURI, string tag)
 Gets all child elements with the given tag. More...
 
HTMLCollection getElementsByTagNameNS (MLNamespace ns, string tag, bool stopWithOne)
 Gets all child elements with the given tag. More...
 
bool getElementsByTagNameNS (MLNamespace ns, string tag, bool stopWithOne, INodeList results)
 Gets all child elements with the given tag. More...
 
Element getElementByTagName (string tag)
 Gets the first child element with the given tag. More...
 
HTMLCollection getElementsByTagName (string tag)
 Gets all child elements with the given tag. More...
 
HTMLCollection getElementsByTagName (string tag, bool stopWithOne)
 Gets all child elements with the given tag. More...
 
bool getElementsByTagName (string tag, bool stopWithOne, INodeList results)
 Gets all child elements with the given tag. More...
 
Element getElementByName (string name)
 Gets the first child element with the given name. More...
 
HTMLCollection getElementsByName (string name)
 Gets all child elements with the given name. More...
 
HTMLCollection getElementsByName (string name, bool stopWithOne)
 Gets all child elements with the given name. More...
 
bool getElementsByName (string name, bool stopWithOne, INodeList results)
 Gets all child elements with the given name. More...
 
Element getElementById (string value)
 Gets a child element by ID. More...
 
NodeList getElementsByAttribute (string property, string value)
 Gets all elements with the given attribute. May include this element or any of it's kids. More...
 
NodeList getElementsWithProperty (string property, string value)
 Gets all elements with the given attribute. May include this element or any of it's kids. More...
 
void getElementsByAttribute (string property, string value, INodeList results)
 Gets all elements with the given property. May include this element or any of it's kids. More...
 
void getElementsByClassName (string[] classes, INodeList results)
 Gets all elements with the given class name(s). May include this element or any of it's kids. More...
 
Element getElementByAttribute (string property, string value)
 Gets an element with the given attribute. May be this element or any of it's kids. More...
 
bool isSameNode (Node other)
 Tests whether two nodes are the same, that is if they reference the same object More...
 
bool isDefaultNamespace (string nsUri)
 Tests if this elements default namespace is the same as the given one. More...
 
string lookupPrefix (string prefix)
 Looks up a namespace prefix, returning the namespace URI. More...
 
Node remove ()
 Removes this node from the tree it belongs to. More...
 
override string ToString ()
 
Node insertChild (int index, Node child)
 Inserts a child into this element at the given index. Pushes any elements at the given index over. More...
 
Node replaceWith (Node element)
 Replaces this element with the given element. More...
 
- Public Member Functions inherited from Dom.EventTarget
void ClearEvents ()
 Clears all events on this document. More...
 
bool dispatchEvent (Event e)
 Runs an event of the given name. More...
 
void addEventListener (string name, EventListener listener)
 Adds an event listener to this document. More...
 
void addEventListener (string name, EventListener listener, bool useCapture)
 Adds an event listener to this document. More...
 
void removeEventListener (string name, object evtHandlerInternal)
 Removes an event listener from this document. More...
 
void addEventListener (string name, AnimationEventDelegate method)
 
void addEventListener (string name, AudioProcessingEventDelegate method)
 
void addEventListener (string name, BeforeInputEventDelegate method)
 
void addEventListener (string name, BeforeUnloadEventDelegate method)
 
void addEventListener (string name, BlobEventDelegate method)
 
void addEventListener (string name, ClipboardEventDelegate method)
 
void addEventListener (string name, CloseEventDelegate method)
 
void addEventListener (string name, CompositionEventDelegate method)
 
void addEventListener (string name, CustomEventDelegate method)
 
void addEventListener (string name, CSSFontFaceLoadEventDelegate method)
 
void addEventListener (string name, DeviceLightEventDelegate method)
 
void addEventListener (string name, DeviceMotionEventDelegate method)
 
void addEventListener (string name, DeviceOrientationEventDelegate method)
 
void addEventListener (string name, DeviceProximityEventDelegate method)
 
void addEventListener (string name, DomEventDelegate method)
 
void addEventListener (string name, DOMTransactionEventDelegate method)
 
void addEventListener (string name, DragEventDelegate method)
 
void addEventListener (string name, EditingBeforeInputEventDelegate method)
 
void addEventListener (string name, ErrorEventDelegate method)
 
void addEventListener (string name, FetchEventDelegate method)
 
void addEventListener (string name, FocusEventDelegate method)
 
void addEventListener (string name, GamepadEventDelegate method)
 
void addEventListener (string name, HashChangeEventDelegate method)
 
void addEventListener (string name, IDBVersionChangeEventDelegate method)
 
void addEventListener (string name, InputEventDelegate method)
 
void addEventListener (string name, KeyboardEventDelegate method)
 
void addEventListener (string name, MediaStreamEventDelegate method)
 
void addEventListener (string name, MessageEventDelegate method)
 
void addEventListener (string name, MouseEventDelegate method)
 
void addEventListener (string name, MutationEventDelegate method)
 
void addEventListener (string name, OfflineAudioCompletionEventDelegate method)
 
void addEventListener (string name, PageTransitionEventDelegate method)
 
void addEventListener (string name, PointerEventDelegate method)
 
void addEventListener (string name, PopStateEventDelegate method)
 
void addEventListener (string name, ProgressEventDelegate method)
 
void addEventListener (string name, RelatedEventDelegate method)
 
void addEventListener (string name, RTCDataChannelEventDelegate method)
 
void addEventListener (string name, RTCIdentityErrorEventDelegate method)
 
void addEventListener (string name, RTCIdentityEventDelegate method)
 
void addEventListener (string name, RTCPeerConnectionIceEventDelegate method)
 
void addEventListener (string name, SensorEventDelegate method)
 
void addEventListener (string name, StorageEventDelegate method)
 
void addEventListener (string name, TextEventDelegate method)
 
void addEventListener (string name, TimeEventDelegate method)
 
void addEventListener (string name, TouchEventDelegate method)
 
void addEventListener (string name, TrackEventDelegate method)
 
void addEventListener (string name, TransitionEventDelegate method)
 
void addEventListener (string name, UIEventDelegate method)
 
void addEventListener (string name, UserProximityEventDelegate method)
 
void addEventListener (string name, WebGLContextEventDelegate method)
 
void addEventListener (string name, WheelEventDelegate method)
 
void addEventListener (string name, Nitro.DynamicMethod< Nitro.Void > listener)
 
void addEventListener (string name, Nitro.DynamicMethod< Nitro.Void > listener, bool capture)
 
void addEventListener (string name, ContextEventDelegate method)
 
void addEventListener (string name, SlideEventDelegate method)
 
void addEventListener (string name, PowerUI.SpriteEventDelegate method)
 
void addEventListener (string name, SVGEventDelegate method)
 Adds an event listener to this document. More...
 
void addEventListener (string name, SVGZoomEventDelegate method)
 
- Public Member Functions inherited from Css.IRenderableNode
void OnComputeBox (Renderman renderer, LayoutBox box, ref bool widthUndefined, ref bool heightUndefined)
 Called whilst a CSS box is being recomputed. More...
 

Public Attributes

ElementStyle Style
 This elements style. More...
 
- Public Attributes inherited from Dom.Element
string Tag
 The raw tag as a string. e.g. "div","span" etc in html. More...
 
Node ParentNode
 Internal use only. The parent of this element. Use PowerUI.HtmlElement.parentNode instead. More...
 
bool IsRebuildingChildren
 This is true if the childNodes are being rebuilt. True for a tiny amount of time, but prevents collisions with the renderer thread. More...
 
- Public Attributes inherited from Dom.Node
MLNamespace Namespace
 The namespace this node belongs to. More...
 
Dictionary< string, string > Properties =new Dictionary<string,string>()
 The set of attributes on this tag. An attribute is e.g. style="display:none;". More...
 
const ushort ELEMENT_NODE =1
 
const ushort ATTRIBUTE_NODE =2
 
const ushort TEXT_NODE =3
 
const ushort CDATA_SECTION_NODE =4
 
const ushort ENTITY_REFERENCE_NODE =5
 
const ushort ENTITY_NODE =6
 
const ushort PROCESSING_INSTRUCTION_NODE =7
 
const ushort COMMENT_NODE =8
 
const ushort DOCUMENT_NODE =9
 
const ushort DOCUMENT_TYPE_NODE =10
 
const ushort DOCUMENT_FRAGMENT_NODE =11
 
const ushort DOCUMENT_NOTATION_NODE =12
 
const ushort DOCUMENT_POSITION_DISCONNECTED =1
 
const ushort DOCUMENT_POSITION_PRECEDING =2
 
const ushort DOCUMENT_POSITION_FOLLOWING =4
 
const ushort DOCUMENT_POSITION_CONTAINS =8
 
const ushort DOCUMENT_POSITION_CONTAINED_BY =16
 
const ushort DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC =32
 
- Public Attributes inherited from Dom.EventTarget
EventsSet Events
 A set of events for this document. See addEventListener. More...
 

Protected Member Functions

void BuildChildren (RenderContext renderer)
 Renders the child nodes of this tag. More...
 
virtual void PopTransforms (RenderContext renderer)
 
virtual bool PushTransforms (RenderContext renderer)
 
bool BuildStrokeMarkers (VectorPath path, RenderContext renderer)
 Renders a stroke with markers. More...
 
virtual void SetClip (RenderContext renderer)
 Sets the clipping region of the specified RenderContext. More...
 
VectorPath GetPaths (Node parent, RenderContext renderer)
 Adds all child paths together. More...
 
void AddChildPaths (Node parent, VectorPath bakeInto, RenderContext renderer, Matrix4x4 extraTransform, bool applyExtra)
 Adds all child paths together. More...
 
virtual void ResetClip (RenderContext renderer)
 Resets the clipping region of the specified RenderContext back to where it was before the SetClip method was called. More...
 

Package Functions

virtual void BuildFill (VectorPath path, RenderContext renderer)
 Renders the fill of the SvgVisualElement to the specified RenderContext More...
 
virtual bool BuildStroke (VectorPath path, RenderContext renderer)
 Renders the stroke of the SvgVisualElement to the specified RenderContext More...
 
- Package Functions inherited from Dom.Element
bool GetBoolAttribute (string name)
 Gets an attribute as a boolean value. More...
 
void SetBoolAttribute (string name, bool value)
 Sets an attribute as a boolean value. More...
 
- Package Functions inherited from Dom.Node
void empty ()
 Clears the child node set such that they no longer have a parent. More...
 
virtual void ResetVariable (string name)
 Reloads the content of variables if it's name matches the given one. More...
 
virtual void ResetAllVariables ()
 Re-resolves all variable tags. This is used when the language is changed. More...
 
virtual void RemovedFromDOM ()
 Internal. Called when this element has been removed from the DOM. More...
 
virtual void AddedToDOM ()
 Internal. Called when this element has been added to the DOM. More...
 
virtual void ChangedDOM ()
 Called when this elements child nodes change. Doesn't occur when AddedToDOM or RemovedFromDOM trigger. More...
 

Properties

static Loonim.TextureNode TransparentFill [get]
 Objects fill transparent by default. This is the fill handler. Initiated when first required. More...
 
ComputedStyle ComputedStyle [get]
 This nodes computed style. More...
 
RenderableData RenderData [get]
 This nodes render data. More...
 
override ElementStyle style [get]
 This elements style. More...
 
Css.ComputedStyle computedStyle [get]
 Gets the computed style of this element. More...
 
SVGFontElement ParentFont [get]
 The parent font element, if there is one. More...
 
BoxRegion GroupBounds [get]
 The combined bounds of the child nodes. More...
 
virtual BoxRegion Bounds [get]
 The bounds of this element. More...
 
virtual Loonim.TextureNode Fill [get, set]
 Gets or sets the fill. More...
 
virtual Loonim.TextureNode Stroke [get, set]
 
int Visibility [get]
 The VisibilityMode of this element. More...
 
SVGElement ownerSVGElement [get]
 The parent svg element. More...
 
virtual Css.Value ClipPath [get, set]
 Gets the associated SvgClipPath if one has been specified. More...
 
string ClipRule [get, set]
 Gets or sets the algorithm which is to be used to determine the clipping region. More...
 
virtual Css.Value Filter [get, set]
 Gets the associated SvgClipPath if one has been specified. More...
 
virtual float Opacity [get]
 Element opacity. More...
 
float FillOpacity [get]
 Fill opacity. More...
 
float StrokeOpacity [get]
 Stroke opacity. More...
 
float StrokeWidth [get]
 Stroke width. More...
 
int StrokeLineCap [get]
 Stroke line cap. More...
 
int StrokeLineJoin [get]
 Stroke line join. More...
 
Css.Value StrokeDashOffset [get]
 Stroke dash offset. More...
 
Css.Value StrokeDashArray [get]
 Stroke dash array. More...
 
float StrokeMiterLimit [get]
 Stroke-miterlimit. More...
 
string FillRule [get]
 Fill rule (e.g. nonzero). More...
 
- Properties inherited from Dom.Element
virtual bool IsSelfClosing [get]
 True if this element is 'self closing' - i.e. the end tag can be omitted. More...
 
virtual bool NonStandard [get]
 True if this property is non-standard. More...
 
virtual float DragStartDistance [get]
 The minimum distance this element must be dragged in order to trigger a drag start event. More...
 
virtual bool OkToBeOpenAfterBody [get]
 True if this element is ok to be open when /body shows up. html is one example. More...
 
virtual bool IsSpecial [get]
 True if this element has special parsing rules. http://w3c.github.io/html/syntax.html#special More...
 
virtual bool IsParserScope [get]
 True if this element indicates being 'in scope'. http://w3c.github.io/html/syntax.html#in-scope More...
 
virtual bool IsTableRowContext [get]
 True if this element is a table row context. More...
 
virtual bool IsTableBodyContext [get]
 True if this element is a table body context. More...
 
virtual bool IsTableContext [get]
 True if this element is a table context. More...
 
virtual bool IsTableStructure [get]
 True if this element is part of table structure, except for td. More...
 
virtual ImplicitEndMode ImplicitEndAllowed [get]
 The mode used for an implicit end (see http://w3c.github.io/html/syntax.html#generate-implied-end-tags). More...
 
override string textContent [get, set]
 
string outerHTML [get, set]
 The html of this element including the element itself. More...
 
virtual string innerHTML [get, set]
 Gets or sets the innerHTML of this element. More...
 
virtual bool Internal [get]
 True if this tag is for internal use only. More...
 
string PropertyString [get]
 A string built from the properties only. More...
 
override string nodeName [get]
 The name for this type of node. More...
 
string tagName [get]
 The lowercase tag name. More...
 
override string localName [get]
 The local name of this node. More...
 
override ushort nodeType [get]
 The type of element that this is. More...
 
KeyboardEventDelegate onkeyup [get, set]
 Called when this element receives a keyup. More...
 
KeyboardEventDelegate onkeydown [get, set]
 Called when this element receives a keydown. More...
 
MouseEventDelegate onmouseup [get, set]
 Called when this element receives a mouseup. More...
 
MouseEventDelegate onmouseout [get, set]
 Called when this element receives a mouseout. More...
 
MouseEventDelegate onmousedown [get, set]
 Called when this element receives a mousedown. More...
 
MouseEventDelegate onmousemove [get, set]
 Called when this element receives a mousemove. Note that it must be focused. More...
 
MouseEventDelegate onmouseover [get, set]
 Called when this element receives a mouseover. More...
 
FormEventDelegate onreset [get, set]
 Called when a form is reset. More...
 
FormEventDelegate onsubmit [get, set]
 Called when a form is submitted. More...
 
UIEventDelegate onload [get, set]
 Called when this element receives a load event (e.g. iframe). More...
 
FocusEventDelegate onfocus [get, set]
 Called when this element gets focused. More...
 
FocusEventDelegate onfocusin [get, set]
 Called just before this element is focused. More...
 
FocusEventDelegate onfocusout [get, set]
 Called just before this element is blurred. More...
 
FocusEventDelegate onblur [get, set]
 Called when this element is unfocused (blurred). More...
 
MouseEventDelegate onclick [get, set]
 Called when this element receives a full click. More...
 
DomEventDelegate onchange [get, set]
 Used by e.g. input, select etc. Called when its value changes. More...
 
ContextMenus.ContextEventDelegate oncontextmenu [get, set]
 Called when this element receives a contextmenu request. More...
 
virtual Css.ElementStyle style [get]
 This elements style. More...
 
- Properties inherited from Dom.Node
HtmlElement htmlParentNode [get]
 The parent as a HtmlElement (convenience method). More...
 
HtmlDocument htmlDocument [get]
 The ownerDocument as a Html document. More...
 
string this[string property] [get, set]
 Gets or sets the named attribute of this tag. An attribute is e.g. style="display:none;". More...
 
virtual bool ClearBackground [get]
 True if this node should clear the background state of the renderer. The background state essentially declares if this nodes background-color or background-image represents the viewports background. In HTML, both the body tag and root html tag can represent the background, so the root HTML node doesn't clear the state to allow body to set it if needed. So, only the root html element overrides this (and this is better than checking for .Tag=="html"). More...
 
override EventTarget eventTargetParentNode [get]
 The parent node as used by EventTarget during capture. Can be null. More...
 
Document document [get]
 The document that this node belongs to. More...
 
virtual string nodeName [get]
 The name for this type of node. More...
 
virtual string nodeValue [get, set]
 The value of this node. More...
 
virtual ushort nodeType [get]
 The type of element that this is. More...
 
Node firstChild [get]
 The first child of this element. More...
 
Node lastChild [get]
 The last child of this element. More...
 
Node previousSibling [get]
 The sibling before this one under this elements parent. Null if this is the first child. More...
 
Node nextSibling [get]
 The sibling following this one under this elements parent. Null if this is the last child. More...
 
Element previousElementSibling [get]
 The next non-text node sibling. More...
 
Element nextElementSibling [get]
 The next non-text node sibling. More...
 
virtual Document ownerDocument [get]
 The owner document. More...
 
virtual string localName [get]
 The local name of this node. More...
 
virtual string baseURI [get]
 The base URI. More...
 
string namespaceURI [get]
 The namespace this node is in. More...
 
string innerText [get, set]
 Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally. More...
 
bool isRooted [get]
 True if this element is in any document and is rooted. More...
 
string outerText [get, set]
 Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally. More...
 
virtual string textContent [get, set]
 Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally. More...
 
Element parentElement [get]
 Gets the parent html element of this element. More...
 
string prefix [get]
 The prefix (namespace). More...
 
Node rootNode [get]
 The root node. More...
 
NodeList childNodes [get]
 The set of children of this element. More...
 
HTMLCollection children [get]
 The set of children elements. More...
 
int sameNameIndex [get]
 Gets the index of this element in it's parents childNodes in terms of child elements that have the same name (tag) as this one. More...
 
int childIndex [get]
 Gets the index of this element in it's parents childNodes. More...
 
int childElementCount [get]
 The number of child elements of this element. More...
 
int childCount [get]
 The number of children of this element. More...
 
Element firstElementChild [get]
 The first non-text child of this element. More...
 
Element lastElementChild [get]
 The last non-text child of this element. More...
 
string id [get, set]
 The ID of this element. Won't ever be null. More...
 
string className [get, set]
 The css class attribute of this element. Won't ever be null. Note that it can potentially hold multiple names, e.g. "red button". Use classList for those. More...
 
Node parentNode [get]
 This nodes parent node. More...
 
DOMTokenList classList [get]
 The set of class names. More...
 
- Properties inherited from Dom.EventTarget
static DispatchStack dispatchStackRef [get]
 The active dispatch stack. Use event.deepPath to access it (available during dispatch only). More...
 
virtual EventTarget eventTargetParentNode [get]
 The parent node as used by EventTarget during capture. Can be null. More...
 
virtual NodeList eventTargetChildren [get]
 The childNode set as used by EventTarget during capture. Can be null. More...
 
- Properties inherited from Dom.IParentNode
NodeList childNodes [get]
 The kids of this node. More...
 
Node parentNode [get]
 The parent node. More...
 
Element parentElement [get]
 The parent element. More...
 
int childCount [get]
 The number of kids of this node. More...
 
int childElementCount [get]
 The number of child elements of this parent. More...
 
HTMLCollection children [get]
 The kids of this node. More...
 
Element firstElementChild [get]
 The first element child of this node. More...
 
Element lastElementChild [get]
 The last element child of this node. More...
 
- Properties inherited from Css.IRenderableNode
RenderableData RenderData [get]
 The box model for a node. More...
 
ComputedStyle ComputedStyle [get]
 The computed style. More...
 

Private Member Functions

void BuildFilter (RenderContext renderer, bool withCssFilter)
 
void ApplyOpacity (float opacity, Loonim.Property prop, ref Loonim.TextureNode fill)
 Applies an opacity value to a Loonim node. More...
 
bool BuildDefaultStroke (VectorPath path, RenderContext renderer)
 

Private Attributes

ScreenRegion _previousClip
 

Static Private Attributes

static Loonim.TextureNode _transparentFill =null
 Objects fill transparent by default. This is the fill handler. Initiated when first required. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Dom.Node
static bool PropertiesEqual (Dictionary< string, string > a, Dictionary< string, string > b)
 True if two args sets are equal. More...
 
- Package Attributes inherited from Dom.Element
bool SelfClosing
 True if this tag closes itself and doesn't need an end ("/div" for example) tag. More...
 
- Static Package Attributes inherited from Dom.EventTarget
static DispatchStack PooledStack
 The current head of the pooled dispatched stacks. More...
 

Constructor & Destructor Documentation

Svg.SVGElement.SVGElement ( )
inline

Member Function Documentation

void Svg.SVGElement.AddChildPaths ( Node  parent,
VectorPath  bakeInto,
RenderContext  renderer,
Matrix4x4  extraTransform,
bool  applyExtra 
)
inlineprotected

Adds all child paths together.

void Svg.SVGElement.ApplyOpacity ( float  opacity,
Loonim.Property  prop,
ref Loonim.TextureNode  fill 
)
inlineprivate

Applies an opacity value to a Loonim node.

void Svg.SVGElement.BuildChildren ( RenderContext  renderer)
inlineprotected

Renders the child nodes of this tag.

bool Svg.SVGElement.BuildDefaultStroke ( VectorPath  path,
RenderContext  renderer 
)
inlineprivate
virtual void Svg.SVGElement.BuildFill ( VectorPath  path,
RenderContext  renderer 
)
inlinepackagevirtual

Renders the fill of the SvgVisualElement to the specified RenderContext

void Svg.SVGElement.BuildFilter ( RenderContext  renderer,
bool  withCssFilter 
)
inlineprivate
virtual bool Svg.SVGElement.BuildStroke ( VectorPath  path,
RenderContext  renderer 
)
inlinepackagevirtual

Renders the stroke of the SvgVisualElement to the specified RenderContext

Parameters
rendererThe RenderContext object to render to.

Reimplemented in Svg.SVGLineElement, Svg.SVGPolylineElement, and Svg.SVGPolygonElement.

bool Svg.SVGElement.BuildStrokeMarkers ( VectorPath  path,
RenderContext  renderer 
)
inlineprotected

Renders a stroke with markers.

void Svg.SVGElement.FontLoaded ( DynamicFont  font)
inline

Called when a font-face is ready.

Implements Css.IRenderableNode.

float Svg.SVGElement.GetDecimal ( Css.CssProperty  property)
inline

Resolves a float value.

float Svg.SVGElement.GetFloatAttribute ( string  property,
float  dflt 
)
inline

Gets the value of the given property as a float.

int Svg.SVGElement.GetInt ( Css.CssProperty  property)
inline

Resolves an integer from the computed style.

virtual VectorPath Svg.SVGElement.GetPath ( SVGElement  context,
RenderContext  renderer 
)
inlinevirtual

Gets the path this tag represents. Note that it can potentially be a clipping path.

Reimplemented in Svg.SVGUseElement, Svg.SVGSymbolElement, Svg.SVGSwitchElement, Svg.SVGGeometryElement, and Svg.SVGClipPathElement.

VectorPath Svg.SVGElement.GetPaths ( Node  parent,
RenderContext  renderer 
)
inlineprotected

Adds all child paths together.

void Svg.SVGElement.GetWidthBounds ( out float  min,
out float  max 
)
inline

Part of shrink-to-fit. Computes the maximum and minimum possible width for an element.

Implements Css.IRenderableNode.

override bool Svg.SVGElement.OnAttributeChange ( string  attribute)
inlinevirtual

Called on an instance of this handler when an attribute on the element it's attached to changes. It's also called when the tag is being loaded.

Parameters
attributeThe attribute that changed.

Reimplemented from Dom.Node.

Reimplemented in Svg.SVGTextContentElement, Svg.SVGFilterPrimitiveStandardAttributes, Svg.SVGRectangleElement, Svg.SVGEllipseElement, Svg.SVGLineElement, Svg.SVGCircleElement, Svg.SVGSVGElement, Svg.SVGTRefElement, Svg.SVGPolylineElement, Svg.SVGPolygonElement, Svg.SVGUseElement, Svg.SVGGlyphElement, Svg.SVGFEFloodElement, Svg.SVGFontFaceElement, Svg.SVGFontElement, Svg.SVGKernElement, Svg.SVGSymbolElement, Svg.SVGPathElement, and Svg.SVGTextPathElement.

virtual void Svg.SVGElement.OnComputeBox ( Renderman  renderer,
Css.LayoutBox  box,
ref bool  widthUndefined,
ref bool  heightUndefined 
)
inlinevirtual

Called during the box compute process. Useful if your element has clever dimensions, such as the img tag or words.

Reimplemented in Svg.SVGRectangleElement.

void Svg.SVGElement.OnRender ( Renderman  renderer)
inline

Called during a global render event on all elements. This knows exactly where the element is on screen.

Implements Css.IRenderableNode.

virtual void Svg.SVGElement.PopTransforms ( RenderContext  renderer)
inlineprotectedvirtual

Reimplemented in Svg.SVGUseElement, and Svg.SVGSymbolElement.

virtual bool Svg.SVGElement.PushTransforms ( RenderContext  renderer)
inlineprotectedvirtual
Element Svg.SVGElement.querySelector ( string  selector)
inline

Gets the first element which matches the given selector.

Implements Css.IRenderableNode.

HTMLCollection Svg.SVGElement.querySelectorAll ( string  selector)
inline

Gets all child elements with the given tag.

Parameters
selectorThe selector string to match.
Returns
The set of all tags with this tag.

Implements Css.IRenderableNode.

HTMLCollection Svg.SVGElement.querySelectorAll ( string  selector,
bool  one 
)
inline

Gets all child elements with the given tag.

Parameters
selectorThe selector string to match.
Returns
The set of all tags with this tag.

Implements Css.IRenderableNode.

void Svg.SVGElement.querySelectorAll ( Selector[]  selectors,
INodeList  results,
CssEvent  e,
bool  one 
)
inline

Gets all child elements with the given tag.

Parameters
selectorsThe selectors to match.
Returns
The set of all tags with this tag.

Implements Css.IRenderableNode.

virtual void Svg.SVGElement.ResetClip ( RenderContext  renderer)
inlineprotectedvirtual

Resets the clipping region of the specified RenderContext back to where it was before the SetClip method was called.

Parameters
rendererThe RenderContext to have its clipping region reset.
virtual void Svg.SVGElement.SetClip ( RenderContext  renderer)
inlineprotectedvirtual

Sets the clipping region of the specified RenderContext.

Parameters
rendererThe RenderContext to have its clipping region set.
SVGElement Svg.SVGElement.TryResolveHref ( )
inline

Finds the element by ID stored in this elements href attribute.

void Svg.SVGElement.WentOffScreen ( )
inline

Called when this element goes offscreen.

Implements Css.IRenderableNode.

Member Data Documentation

ScreenRegion Svg.SVGElement._previousClip
private
Loonim.TextureNode Svg.SVGElement._transparentFill =null
staticprivate

Objects fill transparent by default. This is the fill handler. Initiated when first required.

ElementStyle Svg.SVGElement.Style

This elements style.

Property Documentation

virtual BoxRegion Svg.SVGElement.Bounds
get

The bounds of this element.

virtual Css.Value Svg.SVGElement.ClipPath
getset

Gets the associated SvgClipPath if one has been specified.

string Svg.SVGElement.ClipRule
getset

Gets or sets the algorithm which is to be used to determine the clipping region.

ComputedStyle Svg.SVGElement.ComputedStyle
get

This nodes computed style.

Css.ComputedStyle Svg.SVGElement.computedStyle
get

Gets the computed style of this element.

virtual Loonim.TextureNode Svg.SVGElement.Fill
getset

Gets or sets the fill.

The fill.

float Svg.SVGElement.FillOpacity
get

Fill opacity.

string Svg.SVGElement.FillRule
get

Fill rule (e.g. nonzero).

virtual Css.Value Svg.SVGElement.Filter
getset

Gets the associated SvgClipPath if one has been specified.

BoxRegion Svg.SVGElement.GroupBounds
get

The combined bounds of the child nodes.

virtual float Svg.SVGElement.Opacity
get

Element opacity.

SVGElement Svg.SVGElement.ownerSVGElement
get

The parent svg element.

SVGFontElement Svg.SVGElement.ParentFont
get

The parent font element, if there is one.

RenderableData Svg.SVGElement.RenderData
get

This nodes render data.

virtual Loonim.TextureNode Svg.SVGElement.Stroke
getset
Css.Value Svg.SVGElement.StrokeDashArray
get

Stroke dash array.

Css.Value Svg.SVGElement.StrokeDashOffset
get

Stroke dash offset.

int Svg.SVGElement.StrokeLineCap
get

Stroke line cap.

int Svg.SVGElement.StrokeLineJoin
get

Stroke line join.

float Svg.SVGElement.StrokeMiterLimit
get

Stroke-miterlimit.

float Svg.SVGElement.StrokeOpacity
get

Stroke opacity.

float Svg.SVGElement.StrokeWidth
get

Stroke width.

override ElementStyle Svg.SVGElement.style
get

This elements style.

Loonim.TextureNode Svg.SVGElement.TransparentFill
staticget

Objects fill transparent by default. This is the fill handler. Initiated when first required.

int Svg.SVGElement.Visibility
get

The VisibilityMode of this element.