C# Class SharpVectors.Renderer.Gdi.GdiRenderer

Renders a Svg image to GDI+
Inheritance: ISvgRenderer, IDisposable
ファイルを表示 Open project: codebutler/savagesvg Class Usage Examples

Public Methods

Method Description
ClearMap ( ) : void
Dispose ( ) : void
GdiRenderer ( ) : System

Initializes a new instance of the GdiRenderer class.

GetGraphicsNodeByUri ( string baseUri, string url ) : RenderingNode

Generates a new RenderingNode that corresponds to the given Uri.

GetRenderer ( ) : ISvgRenderer

Creates a new ISvgRenderer object. TODO: I don't know what this method is for apart from implementing an interface method that isn't used at all.

GetRenderingNode ( ISvgElement node ) : RenderingNode

Generates a new RenderingNode that corresponds to the given XmlElement.

InvalidateRect ( RectangleF rect ) : void
OnMouseEvent ( string type, int x, int y ) : void

Processes mouse events.

Render ( ISvgDocument node ) : Bitmap

Renders the SvgDocument.

Render ( ISvgElement node ) : Bitmap

Renders the SvgElement.

SetTagNameNodeType ( string namespaceURI, string localName, Type type ) : void

Adds an entry into the nodeByTagName mapping.

Private Methods

Method Description
ColorToId ( Color color ) : int

TODO: This method is not used.

RendererAfterRender ( ) : void

AfterRender - Dispose of Graphics object created for rendering.

RendererBeforeRender ( ) : void

BeforeRender - Make sure we have a Graphics object to render to. If we don't have one, then create one to matche the SvgWindow's physical dimensions.

_getGraphicsNodeFromColor ( Color color ) : GraphicsNode

Gets the GraphicsNode object that corresponds to the given hit color.

Returns null if a corresponding GraphicsNode object cannot be found for the given hit color.

_getNextColor ( GraphicsNode grNode ) : Color

Allocate a hit color for the specified graphics node.

_removeColor ( Color color, GraphicsNode grNode ) : void

Method Details

ClearMap() public method

public ClearMap ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

GdiRenderer() public method

Initializes a new instance of the GdiRenderer class.
public GdiRenderer ( ) : System
return System

GetGraphicsNodeByUri() public method

Generates a new RenderingNode that corresponds to the given Uri.
public GetGraphicsNodeByUri ( string baseUri, string url ) : RenderingNode
baseUri string /// The base Uri. ///
url string /// The url. ///
return SharpVectors.Dom.Svg.Rendering.RenderingNode

GetRenderer() public method

Creates a new ISvgRenderer object. TODO: I don't know what this method is for apart from implementing an interface method that isn't used at all.
public GetRenderer ( ) : ISvgRenderer
return ISvgRenderer

GetRenderingNode() public method

Generates a new RenderingNode that corresponds to the given XmlElement.
public GetRenderingNode ( ISvgElement node ) : RenderingNode
node ISvgElement /// The XmlElement node for which to generate /// a new RenderingNode object. ///
return SharpVectors.Dom.Svg.Rendering.RenderingNode

InvalidateRect() public method

public InvalidateRect ( RectangleF rect ) : void
rect System.Drawing.RectangleF
return void

OnMouseEvent() public method

Processes mouse events.
public OnMouseEvent ( string type, int x, int y ) : void
type string /// A string describing the type of mouse event that occured. ///
x int
y int
return void

Render() public method

Renders the SvgDocument.
public Render ( ISvgDocument node ) : Bitmap
node ISvgDocument /// The SvgDocument node to be /// rendered ///
return System.Drawing.Bitmap

Render() public method

Renders the SvgElement.
public Render ( ISvgElement node ) : Bitmap
node ISvgElement /// The SvgElement node to be /// rendered ///
return System.Drawing.Bitmap

SetTagNameNodeType() public method

Adds an entry into the nodeByTagName mapping.
public SetTagNameNodeType ( string namespaceURI, string localName, Type type ) : void
namespaceURI string /// The namespaceURI of the mapping key. ///
localName string /// The localName of the mapping key. ///
type System.Type /// The Xml element type corresponding to the mapping key. ///
return void