User-definable overlay. This type of overlay does not use a predefined appearance, but needs to be user-drawn using a subset of the GDI functionality exported by the Aux.Drawing.UnmanagedGraphics object.
More...
Inherits OverlayBase.
Inherited by VisualToolBase< TResult >.
|
| UserOverlay (string text, bool canDrag, bool xorPaint, Color color, bool addCenterVertex, Point[] vertices, Cursor[] cursors) |
| Construct a user object. More...
|
|
| UserOverlay (string text, bool canDrag, bool xorPaint, Color color, bool addCenterVertex, Point[] vertices, Cursor[] cursors, object tag) |
| Construct a user object. More...
|
|
| UserOverlay (UserOverlay obj) |
| copy ctor More...
|
|
|
Point[] | Vertices [get] |
| Pixel positions to paint the user object with. Modifying the Vertex positions will not change the appearance of the overlay and the changes will in fact be overwritten in the next Paint event. Positions are in image coordinates, NOT in client coordinates.
|
|
bool | XORPaint [get, set] |
| Use or don't use XOR mode for painting.
|
|
override Color | Color [get, set] |
| Color of the overlay.
|
|
Display | Parent [get] |
| The display on which the label lives (if any...). Note that a label may only be associated with one display at a time
|
|
object | Tag [get, set] |
| Field for user-definable data to be associated with the overlay object.
|
|
bool | InvokeRequired [get] |
| tell whether actions on the display object require an invoke action or not (being user interface objects, display objects should not be modified asynchronously)
|
|
string | Text [get, set] |
| Text being displayed on the label and/or in the status line
|
|
virtual Color | Color [get, set] |
| Color of the label
|
|
bool | IsDragable [get, set] |
| Label dragable?
|
|
|
Color | color_ = Color.White |
| Internally stored color.
|
|
User-definable overlay. This type of overlay does not use a predefined appearance, but needs to be user-drawn using a subset of the GDI functionality exported by the Aux.Drawing.UnmanagedGraphics object.
◆ UserOverlay() [1/3]
UserOverlay |
( |
string |
text, |
|
|
bool |
canDrag, |
|
|
bool |
xorPaint, |
|
|
Color |
color, |
|
|
bool |
addCenterVertex, |
|
|
Point[] |
vertices, |
|
|
Cursor[] |
cursors |
|
) |
| |
Construct a user object.
- Parameters
-
text | status line text of the object |
canDrag | If true, the object becomes dragable, if false it will remain fixed |
color | color to be memorized for painting |
xorPaint | set to true to paint the overlay in xor mode |
vertices | vertices to be used for painting |
addCenterVertex | when , and additional drag handle will be created automatically in the object's center of mass |
cursors | array of cursors to use for the drag handles (may be null, in which case the default drag handle cursor will be used; if the array is not long enough, it will be filled up with default drag handle cursor entries internally) |
◆ UserOverlay() [2/3]
UserOverlay |
( |
string |
text, |
|
|
bool |
canDrag, |
|
|
bool |
xorPaint, |
|
|
Color |
color, |
|
|
bool |
addCenterVertex, |
|
|
Point[] |
vertices, |
|
|
Cursor[] |
cursors, |
|
|
object |
tag |
|
) |
| |
Construct a user object.
- Parameters
-
text | status line text of the object |
canDrag | If true, the object becomes dragable, if false it will remain fixed |
xorPaint | set to true to paint the overlay in xor mode |
color | color to be memorized for painting |
vertices | vertices to be used for painting |
tag | object with which this label is to be associated |
addCenterVertex | when , and additional drag handle will be created automatically in the object's center of mass |
cursors | array of cursors to use for the drag handles (may be null, in which case the default drag handle cursor will be used; if the array is not long enough, it will be filled up with default drag handle cursor entries internally) |
◆ UserOverlay() [3/3]
◆ OnPaint()
Inheritors may override this method to change behavior.
- Parameters
-
args | paint event arguments |
◆ Overlay_ConnectedToDisplay()
override void Overlay_ConnectedToDisplay |
( |
| ) |
|
|
protectedvirtual |
Add a label to a display.
- Exceptions
-
ObjectDisposedException | If the display we are trying to work on has already been disposed |
Implements OverlayBase.
◆ Overlay_DisconnectedFromDisplay()
override void Overlay_DisconnectedFromDisplay |
( |
bool |
handBackID | ) |
|
|
protectedvirtual |
Remove a label from its display
- Parameters
-
handBackID | true if the overlay plugin's display ID is to be handed back to the owning display, false otherwise. |
- Exceptions
-
ObjectDisposedException | If the display we are trying to work on has already been disposed |
Implements OverlayBase.