Leadtools.Dicom.Annotations Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
Brush Property
See Also  Example
Leadtools.Dicom.Annotations Namespace > DicomAnnotationsUtilities Class : Brush Property




Gets or sets the default brush used when calling ToAnnObject.

Syntax

Visual Basic (Declaration) 
Public Property Brush As AnnBrush
Visual Basic (Usage)Copy Code
Dim instance As DicomAnnotationsUtilities
Dim value As AnnBrush
 
instance.Brush = value
 
value = instance.Brush
C# 
public AnnBrush Brush {get; set;}
Managed Extensions for C++ 
public: __property AnnBrush get_Brush();
public: __property void set_Brush( 
   AnnBrush value
);
C++/CLI 
public:
property AnnBrush Brush {
   AnnBrush get();
   void set (AnnBrush value);
}

Return Value

The default brush used when calling ToAnnObject.

Example

This sample does the following: <list type="number"> <item><description>Creates a DicomTextObject ellipse</description></item> <item><description>Creates a converter</description></item> <item><description>Converts to a LEAD annotation</description></item> <item><description>Displays the LEAD annotation</description></item> </list>

Visual BasicCopy Code
Public Function DicomAnnotationsUtilities_Brush() As AnnObject
  ' Create a DicomTextAnnotation object -- a filled ellipse
  Dim dicomAnnotationObject As DicomGraphicObject = New Leadtools.Dicom.DicomGraphicObject()
  dicomAnnotationObject.Type = DicomAnnotationType.Ellipse
  dicomAnnotationObject.Filled = True
  Dim annotationPoints As DicomAnnotationPoint() = New DicomAnnotationPoint(3){}
  annotationPoints(0).X = 000.00F
  annotationPoints(0).Y = 100.00F
  annotationPoints(1).X = 300.00F
  annotationPoints(1).Y = 100.00F
  annotationPoints(2).X = 150.00F
  annotationPoints(2).Y = 000.00F
  annotationPoints(3).X = 150.00F
  annotationPoints(3).Y = 200.00F
  dicomAnnotationObject.SetAnnotationPoints(annotationPoints, annotationPoints.Length)

  ' Create an instance of the converter, and set some properties
  Dim du As DicomAnnotationsUtilities = New DicomAnnotationsUtilities()
  du.Pen = New AnnPen(Color.Blue, New AnnLength(3, AnnUnit.Pixel))
  du.Brush = New AnnSolidBrush(Color.Yellow)
  du.TextColor = Color.Brown

  ' Convert to a LEAD AnnObject
  Dim annObject As AnnObject = du.ToAnnObject(dicomAnnotationObject)
  Return annObject
 End Function
C#Copy Code
public AnnObject DicomAnnotationsUtilities_Brush() 

   // Create a DicomTextAnnotation object -- a filled ellipse 
   DicomGraphicObject dicomAnnotationObject = new Leadtools.Dicom.DicomGraphicObject(); 
   dicomAnnotationObject.Type = DicomAnnotationType.Ellipse; 
   dicomAnnotationObject.Filled = true; 
   DicomAnnotationPoint[] annotationPoints = new DicomAnnotationPoint[4]; 
   annotationPoints[0].X = 000.00F; 
   annotationPoints[0].Y = 100.00F; 
   annotationPoints[1].X = 300.00F; 
   annotationPoints[1].Y = 100.00F; 
   annotationPoints[2].X = 150.00F; 
   annotationPoints[2].Y = 000.00F; 
   annotationPoints[3].X = 150.00F; 
   annotationPoints[3].Y = 200.00F; 
   dicomAnnotationObject.SetAnnotationPoints(annotationPoints, annotationPoints.Length); 
 
   // Create an instance of the converter, and set some properties 
   DicomAnnotationsUtilities du = new DicomAnnotationsUtilities(); 
   du.Pen = new AnnPen(Color.Blue, new AnnLength(3, AnnUnit.Pixel)); 
   du.Brush = new AnnSolidBrush(Color.Yellow); 
   du.TextColor = Color.Brown; 
 
   // Convert to a LEAD AnnObject 
   AnnObject annObject = du.ToAnnObject(dicomAnnotationObject); 
   return annObject; 
}

Remarks

A DicomAnnotationObject can be filled but it has no color. A filled AnnObject has a color. When calling ToAnnObject to convert a DicomAnnotationObject, the Brush is the default brush if the object is filled.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

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