summaryrefslogtreecommitdiff
path: root/packages/fpvectorial/src/fpvectorial.pas
diff options
context:
space:
mode:
Diffstat (limited to 'packages/fpvectorial/src/fpvectorial.pas')
-rw-r--r--packages/fpvectorial/src/fpvectorial.pas32
1 files changed, 32 insertions, 0 deletions
diff --git a/packages/fpvectorial/src/fpvectorial.pas b/packages/fpvectorial/src/fpvectorial.pas
index af0feaa868..928b001d11 100644
--- a/packages/fpvectorial/src/fpvectorial.pas
+++ b/packages/fpvectorial/src/fpvectorial.pas
@@ -39,6 +39,12 @@ const
STR_WINMETAFILE_EXTENSION = '.wmf';
type
+ T3DPoint = record
+ X, Y, Z: Double;
+ end;
+
+ P3DPoint = ^T3DPoint;
+
TSegmentType = (
st2DLine, st2DBezier,
st3DLine, st3DBezier, stMoveTo);
@@ -159,6 +165,17 @@ type
procedure CalculateBoundingRectangle;
end;
+ {@@
+ }
+
+ { TvAlignedDimension }
+
+ TvAlignedDimension = class(TvEntity)
+ public
+ // Mandatory fields
+ BaseLeft, BaseRight, DimensionLeft, DimensionRight: T3DPoint;
+ end;
+
type
TvCustomVectorialWriter = class;
@@ -216,6 +233,8 @@ type
procedure AddCircle(ACenterX, ACenterY, ACenterZ, ARadius: Double);
procedure AddCircularArc(ACenterX, ACenterY, ACenterZ, ARadius, AStartAngle, AEndAngle: Double);
procedure AddEllipse(CenterX, CenterY, CenterZ, MajorHalfAxis, MinorHalfAxis, Angle: Double);
+ // Dimensions
+ procedure AddAlignedDimension(BaseLeft, BaseRight, DimLeft, DimRight: T3DPoint);
{ properties }
property PathCount: Integer read GetPathCount;
property Paths[Index: Cardinal]: TPath read GetPath;
@@ -642,6 +661,19 @@ begin
FEntities.Add(lEllipse);
end;
+procedure TvVectorialDocument.AddAlignedDimension(BaseLeft, BaseRight,
+ DimLeft, DimRight: T3DPoint);
+var
+ lDim: TvAlignedDimension;
+begin
+ lDim := TvAlignedDimension.Create;
+ lDim.BaseLeft := BaseLeft;
+ lDim.BaseRight := BaseRight;
+ lDim.DimensionLeft := DimLeft;
+ lDim.DimensionRight := DimRight;
+ FEntities.Add(lDim);
+end;
+
{@@
Convenience method which creates the correct
writer object for a given vector graphics document format.