Maria GDK 4.5.0.137
Documentation of managed code in release branch
Loading...
Searching...
No Matches
TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas Class Reference

Represents a specialized canvas used for exporting content. It provides utility functions for placement of elements in predefined areas. As it is also a WPF Canvas, you can manipulate it as you would with any canvas. The predefined areas are as follows. More...

Inheritance diagram for TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas:

Public Member Functions

 ExportCanvas (BitmapSource exportedImage, Size totalExportSize, Thickness margins, double dpi)
 Creates a new export canvas.
 
BitmapSource FinalizeExport ()
 Renders the canvas with all its children to a bitmap.
 
void AddTopLeft (FrameworkElement element)
 Adds a element to the top left slot. The element will be placed as a child of a grid with the size defined in TopLeftAvailable. The element will be aligned to the left.
 
void AddTopMiddle (FrameworkElement element)
 Adds a element to the top middle slot. The element will be placed as a child of a grid with the size defined in TopMiddleAvailable. The element will be centered horizontally.
 
void AddTopRight (FrameworkElement element)
 Adds a element to the top right slot. The element will be placed as a child of a grid with the size defined in TopRightAvailable. The element will be aligned to the right.
 
void AddCenterLeft (FrameworkElement element)
 Adds a element to the center left slot. The element will be placed as a child of a grid with the size defined in CenterLeftAvailable. The element will be aligned to the left and centered vertically.
 
void AddCenterRight (FrameworkElement element)
 Adds a element to the center right slot. The element will be placed as a child of a grid with the size defined in CenterRightAvailable. The element will be aligned to the right and centered vertically.
 
void AddBottomLeft (FrameworkElement element)
 Adds a element to the bottom left slot. The element will be placed as a child of a grid with the size defined in BottomLeftAvailable. The element will be aligned to the left.
 
void AddBottomMiddle (FrameworkElement element)
 Adds a element to the bottom middle slot. The element will be placed as a child of a grid with the size defined in BottomMiddleAvailable. The element will be centered horizontally.
 
void AddBottomRight (FrameworkElement element)
 Adds a element to the bottom right slot. The element will be placed as a child of a grid with the size defined in BottomRightAvailable. The element will be aligned to the right.
 

Properties

Rect TopLeftAvailable [get]
 The placement and available space for the top left area.
 
Rect TopMiddleAvailable [get]
 The placement and available space for the top middle area.
 
Rect TopRightAvailable [get]
 The placement and available space for the top right area.
 
Rect CenterLeftAvailable [get]
 The placement and available space for the center left area.
 
Rect CenterRightAvailable [get]
 The placement and available space for the center right area.
 
Rect BottomLeftAvailable [get]
 The placement and available space for the bottom left area.
 
Rect BottomMiddleAvailable [get]
 The placement and available space for the bottom middle area.
 
Rect BottomRightAvailable [get]
 The placement and available space for the bottom right area.
 

Detailed Description

Represents a specialized canvas used for exporting content. It provides utility functions for placement of elements in predefined areas. As it is also a WPF Canvas, you can manipulate it as you would with any canvas. The predefined areas are as follows.

upper left | upper middle | upper right


center | the exported image |center left | from map stack |right

_ _ _ _ _|___________________________________ |_ _ _ _ lower left | lower middle | lower right

Constructor & Destructor Documentation

◆ ExportCanvas()

TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.ExportCanvas ( BitmapSource  exportedImage,
Size  totalExportSize,
Thickness  margins,
double  dpi 
)
inline

Creates a new export canvas.

Parameters
exportedImageThe image to embed in the canvas. It will be placed according to the margins given.
totalExportSizeThe desired total size of the canvas.
marginsMargins to use for placing the exportedImage.
dpiThe dpi of the canvas.

Member Function Documentation

◆ AddBottomLeft()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddBottomLeft ( FrameworkElement  element)
inline

Adds a element to the bottom left slot. The element will be placed as a child of a grid with the size defined in BottomLeftAvailable. The element will be aligned to the left.

Parameters
elementThe element to add.

◆ AddBottomMiddle()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddBottomMiddle ( FrameworkElement  element)
inline

Adds a element to the bottom middle slot. The element will be placed as a child of a grid with the size defined in BottomMiddleAvailable. The element will be centered horizontally.

Parameters
elementThe element to add.

◆ AddBottomRight()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddBottomRight ( FrameworkElement  element)
inline

Adds a element to the bottom right slot. The element will be placed as a child of a grid with the size defined in BottomRightAvailable. The element will be aligned to the right.

Parameters
elementThe element to add.

◆ AddCenterLeft()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddCenterLeft ( FrameworkElement  element)
inline

Adds a element to the center left slot. The element will be placed as a child of a grid with the size defined in CenterLeftAvailable. The element will be aligned to the left and centered vertically.

Parameters
elementThe element to add.

◆ AddCenterRight()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddCenterRight ( FrameworkElement  element)
inline

Adds a element to the center right slot. The element will be placed as a child of a grid with the size defined in CenterRightAvailable. The element will be aligned to the right and centered vertically.

Parameters
elementThe element to add.

◆ AddTopLeft()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddTopLeft ( FrameworkElement  element)
inline

Adds a element to the top left slot. The element will be placed as a child of a grid with the size defined in TopLeftAvailable. The element will be aligned to the left.

Parameters
elementThe element to add.

◆ AddTopMiddle()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddTopMiddle ( FrameworkElement  element)
inline

Adds a element to the top middle slot. The element will be placed as a child of a grid with the size defined in TopMiddleAvailable. The element will be centered horizontally.

Parameters
elementThe element to add.

◆ AddTopRight()

void TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.AddTopRight ( FrameworkElement  element)
inline

Adds a element to the top right slot. The element will be placed as a child of a grid with the size defined in TopRightAvailable. The element will be aligned to the right.

Parameters
elementThe element to add.

◆ FinalizeExport()

BitmapSource TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.FinalizeExport ( )
inline

Renders the canvas with all its children to a bitmap.

Returns
Bitmap with the canvas content.

The documentation for this class was generated from the following file: