CVB.Net 14.0
CompassOverlay Class Reference

Compass plugin, indicating text and optionally an angle. More...

Inherits ExtendedOverlayPluginBase< PluginData.CompassPlugInData >.

Public Member Functions

 CompassOverlay (string text, bool canDrag, System.Drawing.Color color, bool xorPaint, Point location, int length, Angle angle, int baseRadius, int circleRadius, int penWidth, int fontSize, bool opaqueLabel, NeedleMode mode, bool showAngle, object tag)
 Standard Constructor for Compass overlays. More...
 
 CompassOverlay (string text, bool canDrag, System.Drawing.Color color, bool xorPaint, Point location, int length, Angle angle, int baseRadius, int circleRadius, int penWidth, int fontSize, bool opaqueLabel, NeedleMode mode, bool showAngle)
 Standard Constructor for Compass overlays. More...
 
override OverlayPluginBase Clone ()
 Virtual copy Constructor. More...
 

Protected Member Functions

override PluginData.CompassPlugInData CreatePluginData ()
 Create the plugin data structure for later use. More...
 
- Protected Member Functions inherited from ExtendedOverlayPluginBase< PluginData.CompassPlugInData >
 ExtendedOverlayPluginBase (string text, bool canDrag, System.Drawing.Color color, bool xorPaint, bool filled, Point[] vertices, OverlayPluginInfo info, object tag)
 Standard constructor for overlays with a plugin data structure. More...
 
override OverlayPluginWrapper CreateOverlayWrapper ()
 overrideable creation function for overlay wrapper objects More...
 
abstract TData CreatePluginData ()
 Inheritors must override this and in the override prepare the plugin data reflecting the OPI's current state (depending usually on the current values of the Overlay object's properties) More...
 
virtual void OpiDataPropertyChanged ()
 A property that is relevant for the opi data structure has been changed; as a consequence, the opi may potentially need to be re-generated in order to reflect the changes.
 
virtual void OpiDataPropertyChanged (bool skipDestroyAndCreate)
 A property that is relevant for the opi data structure has been changed; as a consequence, the opi may potentially need to be re-generated in order to reflect the changes. More...
 

Properties

bool ShowAngle [get, set]
 Indicates whether or not the overlay should display the current angle.
 
NeedleMode NeedleMode [get, set]
 Gets or sets the compass needle behavior.
 
bool OpaqueLabel [get, set]
 true: a white rectangle will be painted under the label text in order to improve visibility of the text label; false: the text background will be transparent.
 
int FontSize [get, set]
 Font size for the compass label. More...
 
int PenWidth [get, set]
 Width of the pen to be used for painting. More...
 
int CircleRadius [get, set]
 Radius of the additional circle around the base.
 
int BaseRadius [get, set]
 Radius of the compass needle's base.
 
Angle Angle [get, set]
 Direction of the compass needle (in radians).
 
new bool Filled [get, set]
 Filled property is always true.
 
new string Text [get, set]
 Text to be displayed on the compass label.
 
int Length [get, set]
 Length of the compass needle.
 
Point Location [get, set]
 Location of the Compass.
 

Additional Inherited Members

- Protected Attributes inherited from ExtendedOverlayPluginBase< PluginData.CompassPlugInData >
TData opiData_
 The plugin-specific data structure
 

Detailed Description

Compass plugin, indicating text and optionally an angle.

Constructor & Destructor Documentation

◆ CompassOverlay() [1/2]

CompassOverlay ( string  text,
bool  canDrag,
System.Drawing.Color  color,
bool  xorPaint,
Point  location,
int  length,
Angle  angle,
int  baseRadius,
int  circleRadius,
int  penWidth,
int  fontSize,
bool  opaqueLabel,
NeedleMode  mode,
bool  showAngle,
object  tag 
)

Standard Constructor for Compass overlays.

Parameters
textstatus line string
canDragdragable or not
colorcolor
xorPaintpaint mode
locationlocation of the compass
lengthlength of the compass needle
angleorientation of the compass needle
baseRadiusRadius of the circle at the compass base.
circleRadiusRadius of the outer circle around the compass base.
penWidthpen width with which to paint the compass circle
fontSizesize of the compass label text
opaqueLabelopacity of the compass label
modeneedle mode
showAngleset to true to display the angle
tagobject to be associated witht his overlay

◆ CompassOverlay() [2/2]

CompassOverlay ( string  text,
bool  canDrag,
System.Drawing.Color  color,
bool  xorPaint,
Point  location,
int  length,
Angle  angle,
int  baseRadius,
int  circleRadius,
int  penWidth,
int  fontSize,
bool  opaqueLabel,
NeedleMode  mode,
bool  showAngle 
)

Standard Constructor for Compass overlays.

Parameters
textstatus line string
canDragdragable or not
colorcolor
xorPaintpaint mode
locationlocation of the compass
lengthlength of the compass needle
angleorientation of the compass needle
baseRadiusRadius of the circle at the compass base.
circleRadiusRadius of the outer circle around the compass base.
penWidthpen width with which to paint the compass circle
fontSizesize of the compass label text
opaqueLabelopacity of the compass label
modeneedle mode
showAngleset to true to display the angle

Member Function Documentation

◆ Clone()

override OverlayPluginBase Clone ( )

Virtual copy Constructor.

Returns
Cloned CompassOverlay object.

◆ CreatePluginData()

override PluginData.CompassPlugInData CreatePluginData ( )
protectedvirtual

Create the plugin data structure for later use.

Returns
The internally used plugin data structure.

Implements ExtendedOverlayPluginBase< PluginData.CompassPlugInData >.

Property Documentation

◆ FontSize

int FontSize
getset

Font size for the compass label.

Exceptions
ArgumentExceptionwhen trying to set a font size smaller than 1

◆ PenWidth

int PenWidth
getset

Width of the pen to be used for painting.

Exceptions
ArgumentExceptionIf the pen width is 0 or less