Skip to content

Commit 3592e99

Browse files
author
ArthurHub
committed
* add documentation
1 parent 3444048 commit 3592e99

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

‎Source/HtmlRenderer/HtmlRender.cs‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,32 @@
2121
namespace HtmlRenderer
2222
{
2323
/// <summary>
24-
/// Static class for direct html rendering, intendent for small html fragments.<br/>
25-
/// Prefer using WinForms Html controls: <see cref="HtmlPanel"/> or <see cref="HtmlLabel"/>.
26-
/// For direct non-trivial html rendering consider using <see cref="HtmlContainer"/>.
24+
/// Standalone static class for simple and direct HTML rendering.<br/>
25+
/// For WinForms UI prefer using HTML controls: <see cref="HtmlPanel"/> or <see cref="HtmlLabel"/>.<br/>
26+
/// For low-level control and performance consider using <see cref="HtmlContainer"/>.<br/>
2727
/// </summary>
2828
/// <remarks>
29-
/// Not suitable for large htmls as each render call will parse the given html string into DOM structure, for large html it
30-
/// can be very expensive.<br/>
31-
/// Consider using <see cref="HtmlContainer"/> for large html or for performance.
29+
/// <b>GDI vs. GDI+ text rendering</b><br/>
30+
/// Windows supports two text rendering technologies: GDI and GDI+.<br/>
31+
/// GDI is older, has better performance and looks better on standard monitors but doesn't support alpha channel for transparency.<br/>
32+
/// GDI+ is newer, device independent so work better for printers but is slower and looks worse on monitors.<br/>
33+
/// HtmlRender supports both GDI and GDI+ text rendering to acc
3234
/// </remarks>
3335
/// <example>
36+
/// <para>
37+
/// <b>Simple rendering</b><br/>
3438
/// HtmlRender.Render(g, "<![CDATA[<div>Hello <b>World</b></div>]]>");<br/>
3539
/// HtmlRender.Render(g, "<![CDATA[<div>Hello <b>World</b></div>]]>", 10, 10, 500, CssData.Parse("body {font-size: 20px}")");<br/>
40+
/// </para>
41+
/// <para>
42+
/// <b>Image rendering</b><br/>
43+
/// </para>
3644
/// </example>
3745
public static class HtmlRender
3846
{
3947
/// <summary>
4048
/// Adds a font family to be used in html rendering.<br/>
41-
/// The added font will be used by all rendering function including <see cref="HtmlContainer"/> and all winforms controls.
49+
/// The added font will be used by all rendering function including <see cref="HtmlContainer"/> and all WinForms controls.
4250
/// </summary>
4351
/// <remarks>
4452
/// The given font family instance must be remain alive while the renderer is in use.<br/>

0 commit comments

Comments
 (0)