CVB.Net 14.0
PenStyleOverlayPluginBase Class Reference

Base class for all overlays that use pen width and pen style through a TPenStylePluginData structure. More...

Inherits ExtendedOverlayPluginBase< PluginData.PenStylePlugInData >.

Inherited by Area2DOverlay, CircleOverlay, CrossHairOverlay, FixedSizeEllipseOverlay, LineOverlay, RectOverlay, and RotatedCrossHairOverlay.

Protected Member Functions

 PenStyleOverlayPluginBase (string text, bool canDrag, System.Drawing.Color color, bool xorPaint, bool filled, Point[] vertices, OverlayPluginInfo info, object tag)
 Constructor for pen-styled overlay plugins. More...
 
 PenStyleOverlayPluginBase (string text, bool canDrag, System.Drawing.Color color, bool xorPaint, bool filled, Point[] vertices, OverlayPluginInfo info, DashStyle dashStyle, int penWidth, object tag)
 Constructor for pen-styled overlay plugins. More...
 
override PluginData.PenStylePlugInData CreatePluginData ()
 Build the plugin data structure using the current settings. More...
 
- Protected Member Functions inherited from ExtendedOverlayPluginBase< PluginData.PenStylePlugInData >
 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

int PenWidth [get, set]
 Width of the pen to be used for painting. More...
 
DashStyle DashStyle [get, set]
 Dash style to be used for painting. More...
 

Additional Inherited Members

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

Detailed Description

Base class for all overlays that use pen width and pen style through a TPenStylePluginData structure.

Constructor & Destructor Documentation

◆ PenStyleOverlayPluginBase() [1/2]

PenStyleOverlayPluginBase ( string  text,
bool  canDrag,
System.Drawing.Color  color,
bool  xorPaint,
bool  filled,
Point[]  vertices,
OverlayPluginInfo  info,
object  tag 
)
protected

Constructor for pen-styled overlay plugins.

Parameters
textstatus line text
canDragdrag-ability
colorcolor
xorPaintpaint mode
filledpaint mode
verticesvertices for the opi
infowhich opi
tagobject to be associated with this overlay

This constructor initializes the object with a pen width of 1 and a dashStyle of "Solid"

◆ PenStyleOverlayPluginBase() [2/2]

PenStyleOverlayPluginBase ( string  text,
bool  canDrag,
System.Drawing.Color  color,
bool  xorPaint,
bool  filled,
Point[]  vertices,
OverlayPluginInfo  info,
DashStyle  dashStyle,
int  penWidth,
object  tag 
)
protected

Constructor for pen-styled overlay plugins.

Parameters
textstatus line text
canDragdrag-ability
colorcolor
xorPaintpaint mode
filledpaint mode
verticesvertices for the opi
infowhich opi
dashStyledash style
penWidthpen width
tagobject to be associated with this overlay
Exceptions
ArgumentExceptionIf penWidth is less than 0 or dashStyle is Custom

Member Function Documentation

◆ CreatePluginData()

override PluginData.PenStylePlugInData CreatePluginData ( )
protectedvirtual

Build the plugin data structure using the current settings.

Returns
The overlay plugin data structure.

Implements ExtendedOverlayPluginBase< PluginData.PenStylePlugInData >.

Property Documentation

◆ DashStyle

DashStyle DashStyle
getset

Dash style to be used for painting.

Dash style "Custom" is not supported.

Dash style setting will only have an effect if the pen width has been set to 1. If pen width is greater than 1, a solid brush will always be used. This is a limitation coming from the GDI function CreatePen that is being used internally by the overlay plugin.

Exceptions
ArgumentExceptionIf the dash style is "Custom"

◆ PenWidth

int PenWidth
getset

Width of the pen to be used for painting.

Exceptions
ArgumentExceptionIf the pen width is 0 or less