AddMeasureLineAnnotationA
Annotations and hotspot links, Measurement and coordinate units
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to AddMeasureLineAnnotation and string arguments are interpreted using the current SetAnsiMode code page
Adds a /Subtype /Line annotation with /IT /LineDimension, leader lines (/LL, /LLE), a /Subtype /RL /Measure dictionary, and an automatically synthesized normal appearance stream (/AP /N)
Syntax
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);
Parameters
| X1 | Start horizontal coordinate |
|---|---|
| Y1 | Start vertical coordinate |
| X2 | End horizontal coordinate |
| Y2 | End vertical coordinate |
| LeaderLength | Perpendicular leader line offset |
| ScaleRatio | World units per PDF user-space unit |
| UnitLabel | Measurement unit label (for example mm or m) |
| CustomText | Optional custom caption text overriding the computed distance label |
| Red | Red color component (0.0 to 1.0) |
| Green | Green color component (0.0 to 1.0) |
| Blue | Blue color component (0.0 to 1.0) |
Return values
1 when the measurement line annotation was added to the selected page, or 0 on failure