HtmlRenderRenderToImage 方法 (Image, String, PointF, CssData, EventHandlerHtmlStylesheetLoadEventArgs, EventHandlerHtmlImageLoadEventArgs) |
Renders the specified HTML on top of the given image.
image will contain the rendered html in it on top of original content.
image must not contain transparent pixels as it will corrupt the rendered html text.
The HTML will be layout by the given image size but may be clipped if cannot fit.
See "Rendering to image" remarks section on
HtmlRender.
命名空间:
DSkin.Html
程序集:
DSkin (在 DSkin.dll 中) 版本:16.6.3.22
语法 public static void RenderToImage(
Image image,
string html,
PointF location = null,
CssData cssData = null,
EventHandler<HtmlStylesheetLoadEventArgs> stylesheetLoad = null,
EventHandler<HtmlImageLoadEventArgs> imageLoad = null
)
参数
- image
- 类型:System.DrawingImage
the image to render the html on - html
- 类型:SystemString
HTML source to render - location (Optional)
- 类型:System.DrawingPointF
optional: the top-left most location to start render the html at (default - 0,0) - cssData (Optional)
- 类型:DSkin.Html.CoreCssData
optional: the style to use for html rendering (default - use W3 default style) - stylesheetLoad (Optional)
- 类型:SystemEventHandlerHtmlStylesheetLoadEventArgs
optional: can be used to overwrite stylesheet resolution logic - imageLoad (Optional)
- 类型:SystemEventHandlerHtmlImageLoadEventArgs
optional: can be used to overwrite image resolution logic
参见