PdfRenderer.Page.Render(Bitmap, Rect, Matrix, PdfRenderMode) Method

Definition

Renders a page to a bitmap.

[Android.Runtime.Register("render", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Matrix;I)V", "")]
public void Render (Android.Graphics.Bitmap destination, Android.Graphics.Rect? destClip, Android.Graphics.Matrix? transform, Android.Graphics.Pdf.PdfRenderMode renderMode);
[<Android.Runtime.Register("render", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Matrix;I)V", "")>]
member this.Render : Android.Graphics.Bitmap * Android.Graphics.Rect * Android.Graphics.Matrix * Android.Graphics.Pdf.PdfRenderMode -> unit

Parameters

destination
Bitmap

Destination bitmap to which to render.

destClip
Rect

Optional clip in the bitmap bounds.

transform
Matrix

Optional transformation to apply when rendering.

renderMode
PdfRenderMode

The render mode.

Attributes

Remarks

Renders a page to a bitmap.

You may optionally specify a rectangular clip in the bitmap bounds. No rendering outside the clip will be performed, hence it is your responsibility to initialize the bitmap outside the clip.

You may optionally specify a matrix to transform the content from page coordinates which are in points (1/72") to bitmap coordinates which are in pixels. If this matrix is not provided this method will apply a transformation that will fit the whole page to the destination clip if provided or the destination bitmap if no clip is provided.

The clip and transformation are useful for implementing tile rendering where the destination bitmap contains a portion of the image, for example when zooming. Another useful application is for printing where the size of the bitmap holding the page is too large and a client can render the page in stripes.

<strong>Note: </strong> The destination bitmap format must be Config#ARGB_8888 ARGB.

<strong>Note: </strong> The optional transformation matrix must be affine as per android.graphics.Matrix#isAffine() Matrix.isAffine(). Hence, you can specify rotation, scaling, translation but not a perspective transformation.

Java documentation for android.graphics.pdf.PdfRenderer.Page.render(android.graphics.Bitmap, android.graphics.Rect, android.graphics.Matrix, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to