AppearanceSet Class |
Namespace: Atalasoft.PdfDoc.Generating.Annotations
The AppearanceSet type exposes the following members.
Name | Description | |
---|---|---|
AppearanceSet |
Initializes a new instance of the AppearanceSet class. Normal,
Rollover, and Activated are initialed to empty AppearanceStates |
Name | Description | |
---|---|---|
Activated |
Gets the Activated AppearanceStates.
| |
Normal |
Gets the normal AppearanceStates.
| |
Rollover |
Gets the rollover AppearanceStates.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
NotifyResourceRenamed |
Notifies the object that the resource was renamed.
| |
ResourcesUsed |
Reports a list of all resources consumed by the object of the given class.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DefaultAppearanceName |
A string to use for AppearanceStates objects with a single state.
|
PdfGeneratedDocument doc = new PdfGeneratedDocument(); PdfGeneratedPage page = doc.AddPage(PdfDefaultPages.Letter); RectangleAnnotation anno = new RectangleAnnotation(new PdfBounds(72, 400, 200, 200)); DrawingTemplate template = new DrawingTemplate(new PdfBounds(0, 0, anno.Bounds.Width, anno.Bounds.Height)); PdfPath path = new PdfPath(PdfColorFactory.FromRgb(.8, .25, .25)); path.FillMethod = PdfFillMethod.NonZeroWinding; path.MoveTo(100, 200); path.LineTo(175, 0); path.LineTo(0, 150); path.LineTo(200, 150); path.LineTo(25, 0); path.Close(); template.DrawingList.Add(path); string resourceName = doc.Resources.Templates.Add(template); anno.Appearance = new AppearanceSet(); anno.Appearance.Normal.Add(AppearanceSet.DefaultAppearanceName, resourceName); page.Annotations.Add(anno); doc.Save("staranno.pdf");