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...
|
| 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.
|
|
|
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.
|
|
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
◆ ExportCanvas()
TPG.GeoFramework.RasterExport.OffscreenExport.ExportCanvas.ExportCanvas |
( |
BitmapSource |
exportedImage, |
|
|
Size |
totalExportSize, |
|
|
Thickness |
margins, |
|
|
double |
dpi |
|
) |
| |
|
inline |
Creates a new export canvas.
- Parameters
-
exportedImage | The image to embed in the canvas. It will be placed according to the margins given. |
totalExportSize | The desired total size of the canvas. |
margins | Margins to use for placing the exportedImage. |
dpi | The dpi of the canvas. |
◆ 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
-
element | The 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
-
element | The 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
-
element | The 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
-
element | The 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
-
element | The 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
-
element | The 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
-
element | The 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
-
element | The 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:
- Src/Layers/RasterExport/TPG.GeoFramework.RasterExport/OffscreenExport/ExportCanvas.cs