Table of Contents

Method GetPaperSizeForSkiaDocument

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetPaperSizeForSkiaDocument(KnownPaperKind, float?)

Calculates the pixel dimensions of a specified paper size for use with Skia documents, based on the given paper kind and optional raster DPI.

public static SizeI GetPaperSizeForSkiaDocument(KnownPaperKind paperSize, float? rasterDpi = null)

Parameters

paperSize KnownPaperKind

A value that specifies the standard paper size to use, as defined by the KnownPaperKind enumeration.

rasterDpi float?

The rasterization resolution, in dots per inch (DPI), to use for the calculation. If null, the default DPI for Skia documents is used.

Returns

SizeI

A SizeI structure representing the width and height of the paper in pixels, calculated according to the specified paper size and DPI.

Remarks

The calculated pixel dimensions are rounded to the nearest integer values. Use this method to obtain the appropriate pixel size for rendering or printing documents with Skia at a specific resolution.