-
Notifications
You must be signed in to change notification settings - Fork 133
/
ISvgRenderer.cs
75 lines (67 loc) · 2.15 KB
/
ISvgRenderer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using System.Xml;
namespace SharpVectors.Dom.Svg
{
public delegate void RenderEvent(SvgRectF updatedRect);
/// <summary>
/// Defines the interface required by a renderer to render the SVG DOM.
/// </summary>
/// <remarks>
/// The <see cref="ISvgRenderer">ISvgRenderer</see> is used to render
/// a <see cref="ISvgElement">ISvgElement</see> object onto a bitmap.
/// </remarks>
public interface ISvgRenderer
{
/// <summary>
/// The window that is being rendered to.
/// </summary>
ISvgWindow Window
{
get;
set;
}
/// <summary>
/// Renders an <see cref="ISvgElement">SvgElement</see> object onto a
/// bitmap and returns that bitmap.
/// </summary>
/// <param name="node">
/// The SvgElement object to be rendered.
/// </param>
/// <returns>
/// A bitmap with <c>node</c> rendered onto it.
/// </returns>
void Render(ISvgElement node);
/// <summary>
/// Renders an <see cref="ISvgDocument">SvgDocument</see> object onto
/// a bitmap and returns that bitmap.
/// </summary>
/// <param name="node">
/// The SvgDocument object to be rendered.
/// </param>
/// <returns>
/// A bitmap with <c>node</c> rendered onto it.
/// </returns>
void Render(ISvgDocument node);
/// <summary>
/// Controls the rendering of the document.
/// </summary>
SvgRectF InvalidRect
{
get;
set;
}
/// <summary>
/// Allows you to establish or add to the existing invalidation rectangle
/// </summary>
/// <param name="rect"></param>
void InvalidateRect(SvgRectF rect);
/// <summary>
/// Event Delegate to report when the SVG renderer does it's work.
/// </summary>
RenderEvent OnRender
{
get;
set;
}
ISvgRect GetRenderedBounds(ISvgElement element, float margin);
}
}