Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.LineAnnot

Creates a line annotation.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 5.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.LineAnnot"; PDF; x1; y1; x2; y2; LineWidth; LineEndStyleStart; LineEndStyleEnd; FillColor; StrokeColor; ColorSpace { ; Author; Subject; Comment } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
x1 X-Coordinate of the start point 100
y1 Y-Coordinate of the start point 100
x2 X-Coordinate of the end point 100
y2 Y-Coordinate of the end point 100
LineWidth Line width of the circle or ellipse 2
LineEndStyleStart End line style of the start point. Can be None, Butt, Circle, ClosedArrow, Diamon, OpenArrow, RClosedArrow, ROpenArrow, Slash or Square. "Circle"
LineEndStyleEnd End line style of the end point. "Circle"
FillColor Fill color for line.
See DynaPDF.RGB function for RGB colors.
200
StrokeColor Stroke color for line.
See DynaPDF.RGB function for RGB colors.
255
ColorSpace Color space of the fill and stroke colors. "RGB"
Author The author name. Can be empty. "Christian Schmitz" Optional
Subject The subject to use. Can be empty. Optional
Comment The comment. Can be empty. Optional

Result

Returns annotation handle or error.

Description

Creates a line annotation.
The simplest form of a line annotation represents a simple straight line that has an associated PopUp annotation to display the string Content in a floating window.
The initial window state of the associated PopUp annotation is closed by default but the state can be changed with DynaPDF.SetAnnotOpenState if necessary.
The coordinates are interpreted in current user space. Any transformation that was applied on the coordinate system will be taken into account.
The parameter FillColor is only used if the line end style of the start or end point has an interior that can be filled. The special constant NO_COLOR (4294967281) represents a transparent interior.
The stroke color is required and must not be set to NO_COLOR (4294967281).
Measure lines
A measure line is an extended line annotation that has additional properties. To create a measure line create first the line annotation and set then the measure line specific properties with DynaPDF.SetLineAnnotParms.
The parameter LineWidth must be in the range 0 through 12 units. Values outside the valid range will be adjusted to the nearest allowed value. A zero line width produces a 1 pixel wide line.
The line end styles can be changed if necessary with DynaPDF.SetAnnotLineEndStyle.

See also LineAnnot function in DynaPDF manual.

See also

This function checks for a license.

Created 28th November 2014, last changed 17th July 2022


DynaPDF.Lab - DynaPDF.LineTo