FreeTextAnnotation
FreeTextAnnotation
概述
FreeTextAnnotation 是 Aspose.PDF Go 的 FOSS 中的一种类型。继承自:drawingAnnotationBase。
FreeTextAnnotation 直接在页面上显示文本,使用嵌入式字体渲染到 /AP/N。
此类型为在 Go 程序中处理 FreeTextAnnotation 对象提供了 18 个方法。可用的方法包括:AnnotationType、BorderEffect、BorderEffectIntensity、CalloutPoints、Contents、EndLineEnding、InnerRect、Intent、RegenerateAppearance、SetBorderEffect、SetBorderEffectIntensity、SetCalloutPoints,以及另外 6 个方法。安装 Aspose.PDF Go 的 FOSS 包后,所有公共成员对任何 Go 应用程序均可访问。
方法
| 签名 | 描述 |
|---|---|
AnnotationType() → AnnotationType | 返回注释类型。 |
Contents() → string | Contents 返回 /Contents 文本主体。 |
SetContents(s: string) | SetContents 写入 /Contents 并重新生成 /AP/N(渲染的文本内容取决于 Contents)。 |
TextStyle() → TextStyle | TextStyle 返回从 /DA + /Q + /BG 重建的文本样式。 |
SetTextStyle(s: TextStyle) | SetTextStyle 将样式写为 /DA + /Q + /BG 并重新生成 /AP/N。 |
Intent() → FreeTextIntent | Intent 返回映射到 FreeTextIntent 的 /IT 条目。 |
SetIntent(i: FreeTextIntent) | SetIntent 写入 /IT 条目。 |
RegenerateAppearance() | RegenerateAppearance 强制从当前状态重建 /AP/N。 |
CalloutPoints() → []Point | CalloutPoints 返回 /CL 膝部 + 端点坐标(页面空间)。 |
SetCalloutPoints(pts: []Point) | SetCalloutPoints 写入 /CL(必须是 2 或 3 个点;否则调用无操作)。 |
EndLineEnding() → LineEndingStyle | EndLineEnding 将 /LE 条目作为 LineEndingStyle 返回。 |
SetEndLineEnding(s: LineEndingStyle) | SetEndLineEnding 为标注端点形状写入 /LE。 |
InnerRect() → Rectangle | InnerRect 返回从 /RD 条目派生的内部文本矩形。 |
SetInnerRect(inner: Rectangle) | SetInnerRect 写入通过外部 /Rect 与提供的内部矩形(页面空间)之差计算得到的 /RD。 |
BorderEffect() → BorderEffect | BorderEffect 将 /BE/S 条目作为 BorderEffect 返回。 |
SetBorderEffect(e: BorderEffect) | SetBorderEffect 写入 /BE/S。 |
BorderEffectIntensity() → float64 | BorderEffectIntensity 返回 /BE/I 条目。 |
SetBorderEffectIntensity(i: float64) | SetBorderEffectIntensity 写入 /BE/I(云强度,通常为 0-2)。 |