Draws the specified WriteableBitmap object at the specified location,
stretching it to fit the destination rectangle.
Namespace:
C1.Silverlight.PdfAssembly: C1.Silverlight.Pdf (in C1.Silverlight.Pdf.dll)
Syntax
C# |
---|
public void DrawImage( WriteableBitmap img, Rect rc ) |
Visual Basic |
---|
Public Sub DrawImage ( _ img As WriteableBitmap, _ rc As Rect _ ) |
Parameters
- img
- Type: System.Windows.Media.Imaging..::..WriteableBitmap
WriteableBitmap object to draw.
- rc
- Type: System.Windows..::..Rect
Rect structure that specifies the location of the drawn image, in points from the top left corner of the page.
Examples
The code below shows how you can use the DrawImage method can be used to render any
UIElement. The code creates a WriteableBitmap from the element,
then calls the DrawImage method:
Copy CodeC#
void DrawImage(UIElement e, Rect rc) { DrawImage(new WriteableBitmap(e, null), rc); } |