ImageGear for .NET
Creating a Mark via the ToolBar

End users can create a mark using the ART toolbar, or your application can create them directly by calling ART functions. This section describes how to create marks with user interaction through the ART toolbar.

When a button is selected from the toolbar, ART goes into "edit mode", where the mouse is used to place and size the mark. The sequence of events depends on whether the mark is one of the types that contains text or not:

Mark does not contain text:

  1. User drags a rectangle on the image.
  2. Mark is placed and sized on the image, and is selected.
  3. Control returns to the application.

Mark contains text:

  1. User drags a rectangle on the image.
  2. Mark is placed and sized on the image, and is placed in text-edit mode.
  3. Blinking "I-Beam" insertion point is placed in the mark.
  4. User types text into the mark, as desired. 
  5. User clicks the mouse-button. Mark goes from text-edit mode to selected.
  6. Control returns to the application.

During the creation of polymarks, such as Polyline, Polyline Ruler or Polygon, two options can be enabled (both are disabled by default):

  1. Auto-rollback: when the user clicks on the last added point (for Polyline, Polyline Ruler, Curve, Polygon) or drags over it (for Freeline), the latest point is removed. This allows the user to fix mistakes in drawing a mark. See the IsPolyMarkAutoRollbackEnabled property.
  2. Auto-close: when the last point of the mark is quite close to the first one, and the mark has the IsClosed property, it is set to True. Marks that support the IsClosed property are Freeline and Polyline. See the IsPolylineAutoCloseEnabled property.

Note that ART ToolBar event handlers are implemented in the ART Forms open source code and can be modified at any time and in any way, but in order for them to work, your application needs to interact with the following events: 

C#
Copy Code
private void imGearPageView_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
    igARTForms.MouseDown(sender, e);
}
private void imGearPageView_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
    igARTForms.MouseMove(sender, e);
}
private void imGearPageView_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
    igARTForms.MouseUp(sender, e);
}

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback