CVB.Net 14.0
MeasureLineAdorner Class Reference

Adorner with which pixel distance and angle regarding the x-axis is calculated. More...

Inherits TextAdorner.

Public Member Functions

 MeasureLineAdorner (Display adornedDisplay)
 Creates the measure line adorner. More...
 

Static Public Attributes

static readonly DependencyProperty AngleProperty
 Backing store for the Angle property.
 
static readonly DependencyProperty CoordinateModeProperty
 Backing store for the CoordinateMode property.
 
static readonly DependencyProperty DistanceProperty
 Backing store of the Distance property.
 
static readonly DependencyProperty EndPointProperty
 Backing store for the EndPoint property.
 
static readonly DependencyProperty StartPointProperty
 Backing store for the StartPoint property.
 
- Static Public Attributes inherited from TextAdorner
static readonly DependencyProperty FontBackgroundColorProperty
 Backing store for FontBackgroundColor property.
 
static readonly DependencyProperty FontFamilyProperty
 Backing store for the FontFamily property.
 
static readonly DependencyProperty FontShadowThicknessProperty
 Backing store for the FontShadowThickness property.
 
static readonly DependencyProperty FontSizeProperty
 Backing store for the FontSize property.
 
static readonly DependencyProperty FontStretchProperty
 Backing store of the FontStretch property.
 
static readonly DependencyProperty FontStyleProperty
 Backing store of the FontStyle property. More...
 
static readonly DependencyProperty FontWeightProperty
 Backing store for the FontWeight property.
 
static readonly DependencyProperty ForegroundProperty
 Backing store for Foreground property.
 

Protected Member Functions

override void OnRender (DrawingContext drawingContext)
 Renders the measure line in case a start/end point is set. More...
 
- Protected Member Functions inherited from TextAdorner
 TextAdorner (UIElement adornedElement)
 Ctor. More...
 
FormattedText NewDefaultText (string text)
 Creates a new FormattedText based on the current culture and control font settings. More...
 
void DrawString (DrawingContext drawingContext, FormattedText text, Point location)
 Draws the given text with a drop shadow to ensure its visibility. More...
 

Properties

Angle Angle [get]
 Gets the current angle regarding the x-axis. More...
 
CoordinateMode CoordinateMode [get, set]
 Gets/sets the coordinate mode for measuring.
 
double Distance [get]
 Gets the distance between the start and the end point. More...
 
Point EndPoint [get]
 Gets the measure line end point.
 
Point StartPoint [get, set]
 Gets/sets the point from which to measure.
 
- Properties inherited from TextAdorner
System.Windows.Media.Color FontBackgroundColor [get, set]
 Gets/sets the background color for the font's background. More...
 
FontFamily FontFamily [get, set]
 Gets/sets the font family of the text. More...
 
double FontShadowThickness [get, set]
 Gets/sets the thickness of the border of the text. More...
 
double FontSize [get, set]
 Gets/sets the font size of the text. More...
 
FontStretch FontStretch [get, set]
 Gets/sets the font stretch of the text. More...
 
FontStyle FontStyle [get, set]
 Gets/sets the font style of the text.
 
FontWeight FontWeight [get, set]
 Gets/sets the font weight of the text. More...
 
Brush Foreground [get, set]
 Gets/sets the foreground brush to draw the text with. More...
 

Detailed Description

Adorner with which pixel distance and angle regarding the x-axis is calculated.

Constructor & Destructor Documentation

◆ MeasureLineAdorner()

MeasureLineAdorner ( Display  adornedDisplay)

Creates the measure line adorner.

Parameters
adornedDisplayThe display to adorn.

Member Function Documentation

◆ OnRender()

override void OnRender ( DrawingContext  drawingContext)
protected

Renders the measure line in case a start/end point is set.

Parameters
drawingContextContext to draw on.

Property Documentation

◆ Angle

Angle Angle
get

Gets the current angle regarding the x-axis.

Angle of the line through StartPoint and EndPoint regarding the x-axis.

◆ Distance

double Distance
get

Gets the distance between the start and the end point.

Distance in image pixels; NaN if no line is present.