WpfAnnotationCanvasCreateVisual Method (WpfAnnotationUICollection, BitmapSource, Size, WpfVisualScaleMode, Thickness) |
Returns a Visual object of the specified annotations and optional source image using the
specified parameters. This is useful for printing annotations or saving them to XPS documents.
Namespace:
Atalasoft.Annotate.Wpf
Assembly:
Atalasoft.dotImage.Wpf (in Atalasoft.dotImage.Wpf.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax public Visual CreateVisual(
WpfAnnotationUICollection annotations,
BitmapSource source,
Size pageSize,
WpfVisualScaleMode scaleMode,
Thickness padding
)
Public Function CreateVisual (
annotations As WpfAnnotationUICollection,
source As BitmapSource,
pageSize As Size,
scaleMode As WpfVisualScaleMode,
padding As Thickness
) As Visual
Parameters
- annotations
- Type: Atalasoft.Annotate.WpfWpfAnnotationUICollection
A collection of WpfAnnotationUI object. - source
- Type: System.Windows.Media.ImagingBitmapSource
A source image the annotations will render over. This may be null (Nothing in VB). - pageSize
- Type: System.WindowsSize
The page size used to scale the annotation and image rendering. - scaleMode
- Type: Atalasoft.Annotate.WpfWpfVisualScaleMode
The type of scaling to perform. - padding
- Type: System.WindowsThickness
The padding around the annotations and image.
Return Value
Type:
Visual A Visual object of the annotations and image.
Exceptions Exception | Condition |
---|
| Thrown if the annotations argument is null (Nothing in VB). |
Remarks When a source image is provided, the annotation rendering will be clipped to the image area.
Examples CreateVisual Method
See Also