IMHOTEP Framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Properties
Pages
Assets
ThirdParty
HTMLRenderer
HTMLTest.cs
1
using
UnityEngine;
2
using
System.Collections;
3
using
System;
4
using
System.IO;
5
6
public
class
HTMLTest
: MonoBehaviour {
7
8
// Use this for initialization
9
void
Start () {
10
loadHTML();
11
}
12
13
private
void
loadHTML()
14
{
15
//string html = "<h1> Hello World </h1><p style=\"color:white; background-color:red\"> This is html rendered text</p>";
16
17
// Open the file to read from.
18
string
html = File.ReadAllText(
"IMHOTEP.html"
);
19
20
System.Drawing.Image image = TheArtOfDev.HtmlRenderer.WinForms.HtmlRender.RenderToImageGdiPlus(html,
new
System.Drawing.Size(825, 1200));
//, System.Drawing.Text.TextRenderingHint.AntiAliasGridFit);
21
image.Save(
"image.png"
, System.Drawing.Imaging.ImageFormat.Png);
22
}
23
24
// Update is called once per frame
25
void
Update () {
26
27
}
28
}
HTMLTest
Definition:
HTMLTest.cs:6
Generated by
1.8.6