Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
AnnBrush Class
See Also  Members   Example 
Leadtools.Annotations Namespace : AnnBrush Class



Classes derived from this abstract base class define objects used to fill the interiors of annotation objects like rectangles, ellipses, polygons, etc.

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public MustInherit Class AnnBrush 
Visual Basic (Usage)Copy Code
Dim instance As AnnBrush
C# 
[SerializableAttribute()]
public abstract class AnnBrush 
C++/CLI 
[SerializableAttribute()]
public ref class AnnBrush abstract 

Example

This example uses an AnnBrush to fill a rectangle.

Visual BasicCopy Code
Public Sub AnnBrush_AnnBrush(ByVal graphics As Graphics, ByVal br As AnnBrush, ByVal converter As AnnUnitConverter, ByVal rc As AnnRectangle)
   Dim gdiBrush As Brush = br.Create(converter, rc)
   Try
      Dim rect As RectangleF = rc.ConvertTo(converter, AnnUnit.Pixel).ToRectangleF()
      graphics.FillRectangle(gdiBrush, rect)
   Finally
      CType(gdiBrush, IDisposable).Dispose()
   End Try
End Sub
C#Copy Code
public void AnnBrush_AnnBrush(Graphics graphics, AnnBrush br, AnnUnitConverter converter, AnnRectangle rc) 

   using(Brush gdiBrush = br.Create(converter, rc)) 
   { 
      RectangleF rect = rc.ConvertTo(converter, AnnUnit.Pixel).ToRectangleF(); 
      graphics.FillRectangle(gdiBrush, rect); 
   } 
}

Inheritance Hierarchy

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features