Avalonia solo in codiceEnglish

API › RAVAL

RImage class

Il riferimento e' in inglese: viene dai commenti del sorgente di RAVAL, che dalla 2.0 ha nomi e commenti in inglese.

public static class RImage

Controls drawn into bitmaps.

Metodi

static RenderTargetBitmap Render(Control c, double width, double height, double dpi = 96)

The control drawn at width × height dip and the given dpi (96 for the screen, 300 for print).

static RenderTargetBitmap SavePng(Control c, string path, double width, double height, double dpi = 96)

The control saved as PNG; returns the bitmap.

static void SetDpi(string path, double dpi)

Writes the resolution into a PNG file (its pHYs chunk, in pixels per metre), replacing the one that is there: page layout programs then place the figure at its true size.

static double Dpi(string path)

The resolution written in a PNG (NaN if it has no pHYs in metres).

static double Dip(double cm)

The width in dip of a figure that prints cm centimetres wide.