Gets or sets the default brush used when calling
ToAnnObject.
Syntax
Visual Basic (Declaration) | |
---|
Public Property Brush As AnnBrush |
Return Value
The default brush used when calling
ToAnnObject.
Example
This sample does the following:
- Creates a DicomTextObject ellipse
- Creates a converter
- Converts to a LEAD annotation
- Displays the LEAD annotation
Visual Basic | Copy Code |
---|
Public Function DicomAnnotationsUtilities_Brush() As AnnObject
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)
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
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
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also