CVB.Net 14.0
PolyLineOverlay Class Reference

A polygon overlay. More...

Inherits ExtendedOverlayPluginBase< PluginData.PolyLinePlugInData >, and ICollection< Point >.

Public Member Functions

 PolyLineOverlay (string text, bool canDrag, System.Drawing.Color color, int penWidth, DashStyle dashStyle, Point[] pixels, object tag)
 Standard constructor for Polyline overlays. More...
 
 PolyLineOverlay (string text, bool canDrag, System.Drawing.Color color, int penWidth, DashStyle dashStyle, Point[] pixels)
 Standard constructor for Polyline overlays. More...
 
override OverlayPluginBase Clone ()
 Virtual copy Constructor. More...
 
void Add (Point pixel)
 Add a new pixel to the polygon plugin More...
 
void Clear ()
 remove all pixel from the pixel list plugin
 
bool Contains (Point pixel)
 Contains method of the ICollection interface - check if a pixel is part of the collection More...
 
void CopyTo (Point[] array, int arrayIndex)
 copy the contents of the polygon into an array starting at a given array index More...
 
bool Remove (Point pixel)
 remove all instances of a given pixel from the polygon More...
 
IEnumerator< Point > GetEnumerator ()
 Enumeration implementation More...
 

Protected Member Functions

override PluginData.PolyLinePlugInData CreatePluginData ()
 Create the plugin data structure for later use More...
 
- Protected Member Functions inherited from ExtendedOverlayPluginBase< PluginData.PolyLinePlugInData >
 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 Count [get]
 number of pixels currently in the list (it is sufficient to give the count of pl since the last pixel list generation because user interaction cannot change the number of elements
 
bool IsReadOnly [get]
 tell that this collection can be read and written
 
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.PolyLinePlugInData >
TData opiData_
 The plugin-specific data structure
 

Detailed Description

A polygon overlay.

Constructor & Destructor Documentation

◆ PolyLineOverlay() [1/2]

PolyLineOverlay ( string  text,
bool  canDrag,
System.Drawing.Color  color,
int  penWidth,
DashStyle  dashStyle,
Point[]  pixels,
object  tag 
)

Standard constructor for Polyline overlays.

Parameters
textstatus line text
canDragdrag-ability
colorcolor of the polygon
penWidthwidth of the pen used for painting
dashStylestyle in which to paint the polyline
pixelsvertex list
tagobject to be associated with this overlay

◆ PolyLineOverlay() [2/2]

PolyLineOverlay ( string  text,
bool  canDrag,
System.Drawing.Color  color,
int  penWidth,
DashStyle  dashStyle,
Point[]  pixels 
)

Standard constructor for Polyline overlays.

Parameters
textstatus line text
canDragdrag-ability
colorcolor of the polygon
penWidthwidth of the pen used for painting
dashStylestyle in which to paint the polyline
pixelsvertex list

Member Function Documentation

◆ Add()

void Add ( Point  pixel)

Add a new pixel to the polygon plugin

Parameters
pixelpixel to be added

◆ Clone()

override OverlayPluginBase Clone ( )

Virtual copy Constructor.

Returns
The cloned PolyLineOverlay object.

◆ Contains()

bool Contains ( Point  pixel)

Contains method of the ICollection interface - check if a pixel is part of the collection

Parameters
pixelpixel to check for
Returns
true if the pixel is part of the overlay's vertex list, false otherwise.

◆ CopyTo()

void CopyTo ( Point[]  array,
int  arrayIndex 
)

copy the contents of the polygon into an array starting at a given array index

Parameters
arraytarget array for the copy operation
arrayIndexindex at which to start filling the array

◆ CreatePluginData()

override PluginData.PolyLinePlugInData CreatePluginData ( )
protectedvirtual

Create the plugin data structure for later use

Returns
The overlay plugin data structure.

Implements ExtendedOverlayPluginBase< PluginData.PolyLinePlugInData >.

◆ GetEnumerator()

IEnumerator< Point > GetEnumerator ( )

Enumeration implementation

Returns
IEnumerator<Point> for this plugin's vertex collection.

◆ Remove()

bool Remove ( Point  pixel)

remove all instances of a given pixel from the polygon

Parameters
pixelpixel to be removed
Returns
true if something was removed, false otherwise

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