Gets or sets the default brush used when calling
ToAnnObject.
Syntax
Visual Basic (Declaration) | |
---|
Public Property Brush As AnnBrush |
Managed Extensions for C++ | |
---|
public: __property AnnBrush get_Brush();
public: __property void set_Brush(
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 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 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