Skip to content

GraphicsViewGeoCanvas

Namespace: ThinkGeo.UI.Maui

Implements a GeoCanvas that renders using a GeoGraphicsView.

public class GraphicsViewGeoCanvas : ThinkGeo.Core.GeoCanvas, ThinkGeo.Core.IGeoCanvasRotatable

Inheritance object → GeoCanvas → GraphicsViewGeoCanvas
Implements IGeoCanvasRotatable

Properties

RotationAngle

Gets or sets the rotation angle applied during drawing operations.

public double RotationAngle { get; set; }

Property Value

double

PivotX

Gets or sets the pivot X coordinate used for rotation.

public double PivotX { get; set; }

Property Value

double

PivotY

Gets or sets the pivot Y coordinate used for rotation.

public double PivotY { get; set; }

Property Value

double

CurrentScale

public double CurrentScale { get; }

Property Value

double

FontDisplayDensity

public double FontDisplayDensity { get; }

Property Value

double

DrawingQuality

public DrawingQuality DrawingQuality { get; set; }

Property Value

DrawingQuality

MapUnit

public GeographyUnit MapUnit { get; }

Property Value

GeographyUnit

Width

public float Width { get; protected set; }

Property Value

float

Height

public float Height { get; protected set; }

Property Value

float

CurrentWorldExtent

public RectangleShape CurrentWorldExtent { get; protected set; }

Property Value

RectangleShape

SupportKeyColor

public bool SupportKeyColor { get; }

Property Value

bool

KeyColors

public Collection<GeoColor> KeyColors { get; }

Property Value

Collection<GeoColor>

NativeImage

public object NativeImage { get; }

Property Value

object

IsDrawing

public bool IsDrawing { get; protected set; }

Property Value

bool

Dpi

public float Dpi { get; set; }

Property Value

float

ScaleFactor

public float ScaleFactor { get; set; }

Property Value

float

CancellationToken

public CancellationToken CancellationToken { get; set; }

Property Value

CancellationToken

ClippingArea

public RectangleShape ClippingArea { get; set; }

Property Value

RectangleShape

Constructors

GraphicsViewGeoCanvas()

public GraphicsViewGeoCanvas()

Methods

DrawArcCore(GeoPen, float, float, float, float, float, float, DrawingLevel)

Draws an arc using the specified parameters.

protected void DrawArcCore(GeoPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle, DrawingLevel drawingLevel)

Parameters

pen GeoPen
The pen used to render the arc outline.

x float
The x-coordinate of the bounding rectangle.

y float
The y-coordinate of the bounding rectangle.

width float
The width of the bounding rectangle.

height float
The height of the bounding rectangle.

startAngle float
The starting angle of the arc.

sweepAngle float
The sweep angle of the arc.

drawingLevel DrawingLevel
The drawing level used for ordering.

Returns

void

DrawAreaCore(IEnumerable<ScreenPointF[]>, GeoPen, GeoBrush, DrawingLevel, float, float, PenBrushDrawingOrder)

Draws a filled area defined by the provided screen point paths.

protected void DrawAreaCore(IEnumerable<ScreenPointF[]> screenPoints, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)

Parameters

screenPoints IEnumerable<ScreenPointF[]>
The polygon paths to draw.

outlinePen GeoPen
The pen used for outlining.

fillBrush GeoBrush
The brush used for filling.

drawingLevel DrawingLevel
The drawing level used for ordering.

xOffset float
The horizontal offset.

yOffset float
The vertical offset.

penBrushDrawingOrder PenBrushDrawingOrder
Specifies the drawing order between pen and brush.

Returns

void

DrawLineCore(IEnumerable<ScreenPointF>, GeoPen, DrawingLevel, float, float)

Draws a line defined by the given screen points.

protected void DrawLineCore(IEnumerable<ScreenPointF> screenPoints, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)

Parameters

screenPoints IEnumerable<ScreenPointF>
The points making up the line.

linePen GeoPen
The pen used to draw the line.

drawingLevel DrawingLevel
The drawing level used for ordering.

xOffset float
The horizontal offset.

yOffset float
The vertical offset.

Returns

void

DrawEllipseCore(ScreenPointF, float, float, GeoPen, GeoBrush, DrawingLevel, float, float, PenBrushDrawingOrder)

Draws an ellipse at the specified screen position.

protected void DrawEllipseCore(ScreenPointF screenPoint, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)

Parameters

screenPoint ScreenPointF
The center of the ellipse.

width float
The ellipse width.

height float
The ellipse height.

outlinePen GeoPen
The pen used to draw the outline.

fillBrush GeoBrush
The brush used to fill the ellipse.

drawingLevel DrawingLevel
The drawing level used for ordering.

xOffset float
The horizontal offset.

yOffset float
The vertical offset.

penBrushDrawingOrder PenBrushDrawingOrder
Specifies the drawing order between pen and brush.

Returns

void

DrawScreenImageWithoutScalingCore(GeoImage, float, float, DrawingLevel, float, float, float, RasterResamplingMode)

Draws a screen image without scaling at the specified position.

protected void DrawScreenImageWithoutScalingCore(GeoImage image, float centerXInScreen, float centerYInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle, RasterResamplingMode resamplingMode)

Parameters

image GeoImage
The image to render.

centerXInScreen float
The x-coordinate of the image center.

centerYInScreen float
The y-coordinate of the image center.

drawingLevel DrawingLevel
The drawing level used for ordering.

xOffset float
The horizontal offset.

yOffset float
The vertical offset.

rotateAngle float
The rotation angle.

resamplingMode RasterResamplingMode

Returns

void

DrawScreenImageCore(GeoImage, float, float, float, float, DrawingLevel, float, float, float, RasterResamplingMode)

Draws a screen image with scaling at the specified position.

protected void DrawScreenImageCore(GeoImage image, float centerXInScreen, float centerYInScreen, float widthInScreen, float heightInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle, RasterResamplingMode resamplingMode)

Parameters

image GeoImage
The image to render.

centerXInScreen float
The x-coordinate of the image center.

centerYInScreen float
The y-coordinate of the image center.

widthInScreen float
The image width on screen.

heightInScreen float
The image height on screen.

drawingLevel DrawingLevel
The drawing level used for ordering.

xOffset float
The horizontal offset.

yOffset float
The vertical offset.

rotateAngle float
The rotation angle.

resamplingMode RasterResamplingMode

Returns

void

DrawTextCore(string, GeoFont, GeoBrush, GeoPen, IEnumerable<ScreenPointF>, DrawingLevel, float, float, DrawingTextAlignment, float)

Draws text at the specified path.

protected void DrawTextCore(string text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, IEnumerable<ScreenPointF> textPathInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, DrawingTextAlignment drawingTextAlignment, float rotateAngle)

Parameters

text string
The text to draw.

font GeoFont
The font used to render the text.

fillBrush GeoBrush
The brush used to fill the text.

haloPen GeoPen
The pen used to draw the halo.

textPathInScreen IEnumerable<ScreenPointF>
The path defining where the text is drawn.

drawingLevel DrawingLevel
The drawing level used for ordering.

xOffset float
The horizontal offset.

yOffset float
The vertical offset.

drawingTextAlignment DrawingTextAlignment
The alignment applied to the text.

rotateAngle float
The rotation angle.

Returns

void

MeasureTextCore(string, GeoFont)

Measures the screen-space size of the specified text.

protected DrawingRectangleF MeasureTextCore(string text, GeoFont font)

Parameters

text string
The text to measure.

font GeoFont
The font used for measurement.

Returns

DrawingRectangleF
A drawing rectangle describing the measured size.

BeginDrawingCore(object, RectangleShape, GeographyUnit)

Begins drawing onto the provided graphics view.

protected void BeginDrawingCore(object nativeImage, RectangleShape worldExtent, GeographyUnit drawingMapUnit)

Parameters

nativeImage object
The native image that should be a .

worldExtent RectangleShape
The world extent of the drawing area.

drawingMapUnit GeographyUnit
The map unit used for drawing.

Returns

void

GetCanvasWidthCore()

Gets the width of the canvas in device units.

protected float GetCanvasWidthCore()

Returns

float
The canvas width.

GetCanvasHeightCore()

Gets the height of the canvas in device units.

protected float GetCanvasHeightCore()

Returns

float
The canvas height.

EndDrawingCore()

Completes the drawing session.

protected void EndDrawingCore()

Returns

void

FlushCore()

Flushes pending drawing operations.

protected void FlushCore()

Returns

void

Events

DrawingProgressChanged

public event EventHandler<DrawingProgressChangedEventArgs> DrawingProgressChanged;