点击或拖拽改变大小

HtmlRenderRenderToImage 方法 (Image, String, PointF, SizeF, 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.
See "Rendering to image" remarks section on HtmlRender.

命名空间:  DSkin.Html
程序集:  DSkin (在 DSkin.dll 中) 版本:16.6.3.22
语法
C#
public static void RenderToImage(
	Image image,
	string html,
	PointF location,
	SizeF maxSize,
	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
类型:System.DrawingPointF
the top-left most location to start render the html at
maxSize
类型:System.DrawingSizeF
the max size of the rendered html (if height above zero it will be clipped)
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
参见