[]
        
(Showing Draft Content)

GrapeCity.Documents.Html.HtmlPage.RenderAndCrop

RenderAndCrop Method

RenderAndCrop(GcBitmap, PngOptions, Color?, int, int, int, int)

Renders the current page to an existing GcBitmap and crops.

Declaration
public void RenderAndCrop(GcBitmap bitmap, PngOptions options = null, Color? backColor = null, int leftMargin = 0, int topMargin = 0, int rightMargin = 0, int bottomMargin = 0)
Parameters
Type Name Description
GcBitmap bitmap

The destination GcBitmap. Note that its current content will be lost.

PngOptions options

The set of parameters for the output image.

Color? backColor

The color to be treated as the background to crop. If not set, the color of the bottom right pixel of the image is taken as the background.

int leftMargin

The width of the left margin, in pixels.

int topMargin

The height of the top margin, in pixels.

int rightMargin

The width of the right margin, in pixels.

int bottomMargin

The height of the bottom margin, in pixels.