CVB.Net 14.0
PixelListOverlay Class Reference

A pixel list overlay that marks each pixel individually. More...

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

Public Member Functions

 PixelListOverlay (string text, bool canDrag, System.Drawing.Color color, int penWidth, DashStyle dashStyle, IEnumerable< Point > pixels, object tag)
 Standard constructor for pixel list overlays. More...
 
 PixelListOverlay (string text, bool canDrag, System.Drawing.Color color, int penWidth, DashStyle dashStyle, IEnumerable< Point > pixels)
 
override OverlayPluginBase Clone ()
 Virtual copy Constructor. More...
 
void Add (Point pixel)
 Add a new pixel to the pixel list 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 pixel list into an array starting at a given array index. More...
 
bool Remove (Point pixel)
 Remove all instances of a given pixel from the list. More...
 
IEnumerator< Point > GetEnumerator ()
 Enumeration implementation More...
 

Protected Member Functions

override PluginData.PixelListPlugInData CreatePluginData ()
 Create the plugin data structure for later use More...
 
- Protected Member Functions inherited from ExtendedOverlayPluginBase< PluginData.PixelListPlugInData >
 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.
 
bool IsReadOnly [get]
 Declare 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.PixelListPlugInData >
TData opiData_
 The plugin-specific data structure
 

Detailed Description

A pixel list overlay that marks each pixel individually.

Constructor & Destructor Documentation

◆ PixelListOverlay() [1/2]

PixelListOverlay ( string  text,
bool  canDrag,
System.Drawing.Color  color,
int  penWidth,
DashStyle  dashStyle,
IEnumerable< Point >  pixels,
object  tag 
)

Standard constructor for pixel list overlays.

Parameters
textstatus line text
canDragdrag-ability
colorcolor of the pixel markers
penWidthwidth of the pen with which to paint the pixel markers
dashStylestyle in which to paint the pixel markers
tagobject to be associated with this overlay
pixelspixels to mark

◆ PixelListOverlay() [2/2]

PixelListOverlay ( string  text,
bool  canDrag,
System.Drawing.Color  color,
int  penWidth,
DashStyle  dashStyle,
IEnumerable< Point >  pixels 
)

Standard constructor for pixel list overlays.

Parameters
textstatus line text
canDragdrag-ability
colorcolor of the pixel markers
penWidthwidth of the pen with which to paint the pixel markers
dashStylestyle in which to paint the pixel markers
pixelspixels to mark

Member Function Documentation

◆ Add()

void Add ( Point  pixel)

Add a new pixel to the pixel list plugin.

Parameters
pixelpixel to be added

◆ Clone()

override OverlayPluginBase Clone ( )

Virtual copy Constructor.

Returns
The clones PixelListOverlay 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 pixel list, false otherwise.

◆ CopyTo()

void CopyTo ( Point[]  array,
int  arrayIndex 
)

Copy the contents of the pixel list 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.PixelListPlugInData CreatePluginData ( )
protectedvirtual

Create the plugin data structure for later use

Returns
The overlay plugin data structure.

Implements ExtendedOverlayPluginBase< PluginData.PixelListPlugInData >.

◆ GetEnumerator()

IEnumerator< Point > GetEnumerator ( )

Enumeration implementation

Returns
IEnumerator<Point> for this pixel list.

◆ Remove()

bool Remove ( Point  pixel)

Remove all instances of a given pixel from the list.

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