AddMeasureLineAnnotationA

注释和热点链接、测量和坐标单位

描述

末尾的 A 表示 ANSI(char)DLL 入口点;ActiveX/COM 接口仅公开 Unicode 形式。其行为与 AddMeasureLineAnnotation 相同,字符串参数按当前 SetAnsiMode 代码页解释

添加 /Subtype /Line 注释,带 /IT /LineDimension、引出线(/LL、/LLE)、/Subtype /RL 的 /Measure 字典,以及自动合成的正常外观流(/AP /N)

语法

Delphi

Function DLAddMeasureLineAnnotationA(InstanceID: Integer; X1, Y1, X2, Y2, LeaderLength, ScaleRatio: Double; UnitLabel, CustomText: PAnsiChar; Red, Green, Blue: Double): Integer;

DLL

int DLAddMeasureLineAnnotationA(int InstanceID, double X1, double Y1, double X2, double Y2, double LeaderLength, double ScaleRatio, const char* UnitLabel, const char* CustomText, double Red, double Green, double Blue);

参数

X1起点水平坐标
Y1起点垂直坐标
X2终点水平坐标
Y2终点垂直坐标
LeaderLength垂直于线的引出线偏移
ScaleRatio每 PDF 用户空间单位对应的世界单位数
UnitLabel测量单位标签(例如 mm 或 m)
CustomText可选的自定义标题文字,覆盖自动计算的距离标签
Red红色分量(0.0 到 1.0)
Green绿色分量(0.0 到 1.0)
Blue蓝色分量(0.0 到 1.0)

返回值

测量线注释成功添加到所选页面返回 1,失败返回 0

另请参阅

AddLineAnnotation, AddPageMeasureViewport