Namespace: PdfSharp.Pdf.AcroForms.Rendering
Renders a PdfPushButtonField
The current implementation does not render the Rollover- and Down- states
so the button will always appear in Normal state.
public class PdfPushButtonFieldRenderer
Inheritance Object → PdfPushButtonFieldRenderer
Remarks:
Inheritors should override the methods PdfPushButtonFieldRenderer.RenderNormalState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect),
PdfPushButtonFieldRenderer.RenderRolloverState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect) and
PdfPushButtonFieldRenderer.RenderDownState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect)
It is allowed to throw a NotImplementedException in the methods
PdfPushButtonFieldRenderer.RenderRolloverState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect) and
PdfPushButtonFieldRenderer.RenderDownState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect),
only the implementation of PdfPushButtonFieldRenderer.RenderNormalState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect)
is mandatory.
public PdfPushButtonFieldRenderer()
Renders the normal state of the PdfPushButtonField
public void RenderNormalState(PdfPushButtonField field, PdfWidgetAnnotation widget, XGraphics gfx, XRect rect)
field
PdfPushButtonField
The field being rendered
widget
PdfWidgetAnnotation
The PdfWidgetAnnotation of the field that is being rendered
gfx
XGraphics
The XGraphics used to perform drawing operations
rect
XRect
The XRect spcifying the position and dimensions of the field
Renders the rollover state of the PdfPushButtonField
public void RenderRolloverState(PdfPushButtonField field, PdfWidgetAnnotation widget, XGraphics gfx, XRect rect)
field
PdfPushButtonField
The field being rendered
widget
PdfWidgetAnnotation
The PdfWidgetAnnotation of the field that is being rendered
gfx
XGraphics
The XGraphics used to perform drawing operations
rect
XRect
The XRect spcifying the position and dimensions of the field
Renders the down state of the PdfPushButtonField
public void RenderDownState(PdfPushButtonField field, PdfWidgetAnnotation widget, XGraphics gfx, XRect rect)
field
PdfPushButtonField
The field being rendered
widget
PdfWidgetAnnotation
The PdfWidgetAnnotation of the field that is being rendered
gfx
XGraphics
The XGraphics used to perform drawing operations
rect
XRect
The XRect spcifying the position and dimensions of the field