AddMeasureLineAnnotation
注释和热点链接、测量和坐标单位
描述
添加 /Subtype /Line 注释,带 /IT /LineDimension、引出线(/LL、/LLE)、/Subtype /RL 的 /Measure 字典,以及自动合成的正常外观流(/AP /N)
语法
Delphi
Function AddMeasureLineAnnotation(X1, Y1, X2, Y2, LeaderLength, ScaleRatio: Double; Const UnitLabel, CustomText: WideString; Red, Green, Blue: Double): Integer;ActiveX
Function PDFlib::AddMeasureLineAnnotation(X1 As Double, Y1 As Double, X2 As Double, Y2 As Double, LeaderLength As Double, ScaleRatio As Double, UnitLabel As String, CustomText As String, Red As Double, Green As Double, Blue As Double) As LongDLL
int DLAddMeasureLineAnnotation(int InstanceID, double X1, double Y1, double X2, double Y2, double LeaderLength, double ScaleRatio, const wchar_t* UnitLabel, const wchar_t* CustomText, double Red, double Green, double Blue);
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