PDFsharp-net6

PdfPushButtonFieldRenderer

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 ObjectPdfPushButtonFieldRenderer

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.

Constructors

PdfPushButtonFieldRenderer()

public PdfPushButtonFieldRenderer()

Methods

RenderNormalState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect)

Renders the normal state of the PdfPushButtonField

public void RenderNormalState(PdfPushButtonField field, PdfWidgetAnnotation widget, XGraphics gfx, XRect rect)

Parameters

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

RenderRolloverState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect)

Renders the rollover state of the PdfPushButtonField

public void RenderRolloverState(PdfPushButtonField field, PdfWidgetAnnotation widget, XGraphics gfx, XRect rect)

Parameters

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

RenderDownState(PdfPushButtonField, PdfWidgetAnnotation, XGraphics, XRect)

Renders the down state of the PdfPushButtonField

public void RenderDownState(PdfPushButtonField field, PdfWidgetAnnotation widget, XGraphics gfx, XRect rect)

Parameters

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