Last change
on this file since 13348 was
12762,
checked in by aballeit, 9 years ago
|
#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)
|
File size:
995 bytes
|
Rev | Line | |
---|
[12762] | 1 | using System;
|
---|
| 2 | using System.Xml;
|
---|
| 3 | using System.Drawing;
|
---|
| 4 |
|
---|
| 5 | using SharpVectors.Dom.Svg;
|
---|
| 6 | using SharpVectors.Dom.Css;
|
---|
| 7 |
|
---|
| 8 | namespace SharpVectors.Renderers.Gdi
|
---|
| 9 | {
|
---|
| 10 | public abstract class GdiFill
|
---|
| 11 | {
|
---|
| 12 | #region Constructors and Destructor
|
---|
| 13 |
|
---|
| 14 | protected GdiFill()
|
---|
| 15 | {
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | #endregion
|
---|
| 19 |
|
---|
| 20 | #region Public Methods
|
---|
| 21 |
|
---|
| 22 | public abstract Brush GetBrush(RectangleF bounds);
|
---|
| 23 |
|
---|
| 24 | public static GdiFill CreateFill(SvgDocument document, string absoluteUri)
|
---|
| 25 | {
|
---|
| 26 | XmlNode node = document.GetNodeByUri(absoluteUri);
|
---|
| 27 |
|
---|
| 28 | SvgGradientElement gradientNode = node as SvgGradientElement;
|
---|
| 29 | if (gradientNode != null)
|
---|
| 30 | {
|
---|
| 31 | return new GdiGradientFill(gradientNode);
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | SvgPatternElement patternNode = node as SvgPatternElement;
|
---|
| 35 | if (patternNode != null)
|
---|
| 36 | {
|
---|
| 37 | return new GdiPatternFill(patternNode);
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | return null;
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | #endregion
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.