PTFreeTextRefreshAppearanceHandler
@interface PTFreeTextRefreshAppearanceHandler
: PTAnnotationRefreshCustomAppearanceHandler
A PTFreeTextRefreshAppearanceHandler generates custom PDF appearances for free text annotations.
-
Initializes a
PTFreeTextRefreshAppearanceHandlerinstance.Declaration
Objective-C
- (nonnull instancetype)init;Swift
init()Return Value
An initialized
PTFreeTextRefreshAppearanceHandlerinstance.
-
Draws the background for the free text annotation.
The default implementation of the method fills the bounds of the background with the annotation’s background color.
Declaration
Objective-C
- (void)drawBackgroundForFreeText:(nonnull PTFreeText *)freeText inRect:(nonnull PTPDFRect *)backgroundRect withBuilder:(nonnull PTElementBuilder *)elementBuilder writer:(nonnull PTElementWriter *)elementWriter userInfo:(nullable NSDictionary< PTAnnotationRefreshAppearanceUserInfoKey, id> *)userInfo;Swift
func drawBackground(for freeText: PTFreeText, in backgroundRect: PTPDFRect, with elementBuilder: PTElementBuilder, writer elementWriter: PTElementWriter, userInfo: [PTAnnotationRefreshAppearanceUserInfoKey : Any]? = nil)Parameters
freeTextThe free text annotation for which an appearance is being generated.
backgroundRectThe bounds of the background to be drawn.
elementBuilderThe element builder used to create new content stream elements.
elementWriterThe element writer used to write new elements to the output content stream.
userInfoA dictionary containing additional information, or
nil. -
Draws the content (text) of the free text annotation.
Declaration
Objective-C
- (void)drawContentsForFreeText:(nonnull PTFreeText *)freeText inRect:(nonnull PTPDFRect *)contentRect withBuilder:(nonnull PTElementBuilder *)elementBuilder writer:(nonnull PTElementWriter *)elementWriter userInfo: (nullable NSDictionary< PTAnnotationRefreshAppearanceUserInfoKey, id> *) userInfo;Swift
func drawContents(for freeText: PTFreeText, in contentRect: PTPDFRect, with elementBuilder: PTElementBuilder, writer elementWriter: PTElementWriter, userInfo: [PTAnnotationRefreshAppearanceUserInfoKey : Any]? = nil)Parameters
freeTextThe free text annotation for which an appearance is being generated.
contentRectThe bounds of the content (text) to be drawn.
elementBuilderThe element builder used to create new content stream elements.
elementWriterThe element writer used to write new elements to the output content stream.
userInfoA dictionary containing additional information, or
nil. -
Draws the border of the free text annotation.
The default implementation of this method strokes the border with the annotation’s border color.
Declaration
Objective-C
- (void)drawBorderForFreeText:(nonnull PTFreeText *)freeText inRect:(nonnull PTPDFRect *)borderRect withBuilder:(nonnull PTElementBuilder *)elementBuilder writer:(nonnull PTElementWriter *)elementWriter userInfo: (nullable NSDictionary< PTAnnotationRefreshAppearanceUserInfoKey, id> *) userInfo;Swift
func drawBorder(for freeText: PTFreeText, in borderRect: PTPDFRect, with elementBuilder: PTElementBuilder, writer elementWriter: PTElementWriter, userInfo: [PTAnnotationRefreshAppearanceUserInfoKey : Any]? = nil)Parameters
freeTextThe free text annotation for which an appearance is being generated.
borderRectThe bounds of the border to be drawn. The entire border is drawn within this rectangle (ie. the rectangle is inset on all sides by half of the border width).
elementBuilderThe element builder used to create new content stream elements.
elementWriterThe element writer used to write new elements to the output content stream.
userInfoA dictionary containing additional information, or
nil.
PTFreeTextRefreshAppearanceHandler Class Reference