private Inline CreateInline(IWebVTTNode node, Brush brush = null) { if (node is WebVTTTextNode) { var c = (WebVTTTextNode)node; return(new Run() { Text = c.Text }); } else if (node is WebVTTClassNode) { return(new Span()); } else if (node is WebVTTVoiceNode) { return(new Span()); } else if (node is WebVTTLanguageNode) { return(new Span()); } else if (node is WebVTTBoldNode) { return(new Bold()); } else if (node is WebVTTItalicNode) { return(new Italic()); } else if (node is WebVTTUnderlineNode) { return(new Underline()); } else if (node is WebVTTRubyNode) { return(new Span()); } else if (node is WebVTTRubyTextNode) { // TODO: ruby annotations } else if (node is WebVTTTimestampNode) { var span = new Span(); if (brush != null) { span.Foreground = brush; } return(span); } return(null); }
public NodeRenderingEventArgs(WebVTTCue cue, IWebVTTNode node, Inline inline) { Cue = cue; Node = node; Inline = inline; }
private Inline CreateInline(IWebVTTNode node, Brush brush = null) { if (node is WebVTTTextNode) { var c = (WebVTTTextNode)node; return new Run() { Text = c.Text }; } else if (node is WebVTTClassNode) { return new Span(); } else if (node is WebVTTVoiceNode) { return new Span(); } else if (node is WebVTTLanguageNode) { return new Span(); } else if (node is WebVTTBoldNode) { return new Bold(); } else if (node is WebVTTItalicNode) { return new Italic(); } else if (node is WebVTTUnderlineNode) { return new Underline(); } else if (node is WebVTTRubyNode) { return new Span(); } else if (node is WebVTTRubyTextNode) { // TODO: ruby annotations } else if (node is WebVTTTimestampNode) { var span = new Span(); if (brush != null) span.Foreground = brush; return span; } return null; }
public NodeRenderingEventArgs(WebVTTCue cue, IWebVTTNode node, Inline inline) { Cue = cue; Node = node; Inline = inline; }