Loading...
Searching...
No Matches
Line.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFAnnotsLine
6#define PDFTRON_H_CPPPDFAnnotsLine
7
8#include <PDF/Annots/Markup.h>
9#include <PDF/QuadPoint.h>
10
11#ifdef SWIG
12#define Line LineAnnot
13#endif
14
15namespace pdftron {
16 namespace PDF {
17 namespace Annots {
23class Line : public Markup
24{
25public:
32
39 Line(const Annot& ann) : Markup(ann.GetSDFObj()) {}
40
41
50 static Line Create(SDF::SDFDoc& doc, const Rect& pos);
51 static Line CreateAnnot(SDF::SDFDoc& doc, const Rect& pos);
52
59
65 void SetStartPoint(const Point& sp);
66
73
79 void SetEndPoint(const Point& ep);
80
99
107
108
117
118
126
127
136
137
138
151 double GetLeaderLineLength() const;
152
166 void SetLeaderLineLength(const double& length);
167
178
189 void SetLeaderLineExtensionLength(const double& length);
190
200 bool GetShowCaption() const;
201
211 void SetShowCaption(bool showCaption);
212
224
234
245
254 double GetLeaderLineOffset() const;
255
265 void SetLeaderLineOffset(double length);
266
273 {
276 };
277
287
297 void SetCaptionPosition(const CapPos& style);
298
308 double GetTextHOffset() const;
309
319 void SetTextHOffset(double offset);
320
329 double GetTextVOffset() const;
330
340 void SetTextVOffset(double offset);
341
342// @cond PRIVATE_DOC
343#ifndef SWIGHIDDEN
344 Line(TRN_Annot line);
345#endif
346// @endcond
347
348};//class Line
349 };//namespace Annot
350 };//namespace PDF
351};//namespace pdftron
352
353#ifdef SWIG
354#undef Line
355#endif
356
357#include <Impl/Page.inl>
358
359#endif // PDFTRON_H_CPPPDFAnnotsLine
Annot(SDF::Obj d=0)
SDF::Obj GetSDFObj() const
void SetEndPoint(const Point &ep)
double GetLeaderLineLength() const
double GetLeaderLineOffset() const
@ e_Top
the caption shall be on top of the line
Definition Line.h:275
@ e_Inline
the caption shall be centered inside the line
Definition Line.h:274
@ e_Butt
A short line at the endpoint perpendicular to the line itself.
Definition Line.h:92
@ e_OpenArrow
Two short lines meeting in an acute angle to form an open arrowhead.
Definition Line.h:90
@ e_RClosedArrow
A triangular closed arrowhead in the reverse direction from ClosedArrow.
Definition Line.h:94
@ e_ClosedArrow
Two short lines meeting in an acute angle as in the OpenArrow style and connected by a third line to ...
Definition Line.h:91
@ e_Diamond
A diamond shape filled with the annotation's interior color, if any.
Definition Line.h:89
@ e_None
No special line ending.
Definition Line.h:96
@ e_Circle
A circle filled with the annotation's interior color, if any.
Definition Line.h:88
@ e_Unknown
Non-standard or invalid ending.
Definition Line.h:97
@ e_Square
A square filled with the annotation's interior color, if any.
Definition Line.h:87
@ e_Slash
A short line at the endpoint approximately 30 degrees clockwise from perpendicular to the line itself...
Definition Line.h:95
@ e_ROpenArrow
Two short lines in the reverse direction from OpenArrow.
Definition Line.h:93
EndingStyle GetEndStyle() const
void SetStartStyle(EndingStyle sst)
void SetLeaderLineLength(const double &length)
double GetTextVOffset() const
void SetIntentType(IntentType it)
IntentType GetIntentType() const
void SetLeaderLineExtensionLength(const double &length)
void SetLeaderLineOffset(double length)
void SetEndStyle(EndingStyle est)
void SetCaptionPosition(const CapPos &style)
void SetStartPoint(const Point &sp)
static Line CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
CapPos GetCaptionPosition() const
void SetShowCaption(bool showCaption)
void SetTextVOffset(double offset)
static Line Create(SDF::SDFDoc &doc, const Rect &pos)
Line(const Annot &ann)
Definition Line.h:39
@ e_LineArrow
Line is an arrow.
Definition Line.h:220
@ e_LineDimension
Line is a dimension.
Definition Line.h:221
double GetLeaderLineExtensionLength() const
double GetTextHOffset() const
EndingStyle GetStartStyle() const
void SetTextHOffset(double offset)