| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Class SharpPlot Properties SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Reference SharpLeaf Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpPlot Reference > SharpPlot Methods > IncludeSource Method SharpPlot.IncludeSource MethodAdd arbitrary (SVG/EPS) content to beginning or end of output stream. Examplestring svgfiters = "<defs> <filter id=\"MyShadow\"> <feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"12\" result=\"blur\"/> " + "<feOffset in=\"blur\" dx=\"24\" dy=\"20\" result=\"offsetBlur\"/> <feMerge> <feMergeNode in=\"offsetBlur\"/> " + "<feMergeNode in=\"SourceGraphic\"/> </feMerge> </filter> </defs>"; sp.IncludeSource(svgfilter); // include filter in SVG definition sp.AddEffect(ScriptTarget.Heading,"#MyShadow"); // use filter on heading sp.DefineFont("AS","Arial,Sans","filter:url(#MyShadow)"); // define a font with filter sp.SetFootnoteFont("AS"); // use font Overloads
This would typically be used to prepend SVG filters to the final output. It can also add arbitrary content to the end of the generated output, by setting the atEnd value to true. The source has to match the output format that will be used for the chart. For example if you include SVG but export the chart as EPS, the included SVG will corrupt the output EPS. If you need to export your chart in different output format AND have format-specific prologues, you can set the prologue argument of the Render functions (e.g. SharpPlot.RenderEps). See also ... |