Browse Source

fpvectorial: Basic implementation of the PostScript support

git-svn-id: trunk@17751 -
sekelsenmat 14 years ago
parent
commit
038cb54210
2 changed files with 1159 additions and 25 deletions
  1. 1146 25
      packages/fpvectorial/src/epsvectorialreader.pas
  2. 13 0
      packages/fpvectorial/src/fpvectorial.pas

File diff suppressed because it is too large
+ 1146 - 25
packages/fpvectorial/src/epsvectorialreader.pas


+ 13 - 0
packages/fpvectorial/src/fpvectorial.pas

@@ -292,6 +292,7 @@ type
     procedure AddLineToPath(AX, AY: Double); overload;
     procedure AddLineToPath(AX, AY: Double); overload;
     procedure AddLineToPath(AX, AY: Double; AColor: TvColor); overload;
     procedure AddLineToPath(AX, AY: Double; AColor: TvColor); overload;
     procedure AddLineToPath(AX, AY, AZ: Double); overload;
     procedure AddLineToPath(AX, AY, AZ: Double); overload;
+    procedure GetCurrenPathPenPos(var AX, AY: Double);
     procedure AddBezierToPath(AX1, AY1, AX2, AY2, AX3, AY3: Double); overload;
     procedure AddBezierToPath(AX1, AY1, AX2, AY2, AX3, AY3: Double); overload;
     procedure AddBezierToPath(AX1, AY1, AZ1, AX2, AY2, AZ2, AX3, AY3, AZ3: Double); overload;
     procedure AddBezierToPath(AX1, AY1, AZ1, AX2, AY2, AZ2, AX3, AY3, AZ3: Double); overload;
     procedure SetBrushColor(AColor: TvColor);
     procedure SetBrushColor(AColor: TvColor);
@@ -661,6 +662,18 @@ begin
   AppendSegmentToTmpPath(segment);
   AppendSegmentToTmpPath(segment);
 end;
 end;
 
 
+{@@
+  Gets the current Pen Pos in the temporary path
+}
+procedure TvVectorialDocument.GetCurrenPathPenPos(var AX, AY: Double);
+begin
+  // Check if we are the first segment in the tmp path
+  if FTmpPath.PointsEnd = nil then raise Exception.Create('[TvVectorialDocument.GetCurrenPathPenPos] One cannot obtain the Pen Pos if there are no segments in the temporary path');
+
+  AX := T2DSegment(FTmpPath.PointsEnd).X;
+  AY := T2DSegment(FTmpPath.PointsEnd).Y;
+end;
+
 {@@
 {@@
   Adds a bezier element to the path. It starts where the previous element ended
   Adds a bezier element to the path. It starts where the previous element ended
   and it goes throw the control points [AX1, AY1] and [AX2, AY2] and ends
   and it goes throw the control points [AX1, AY1] and [AX2, AY2] and ends

Some files were not shown because too many files changed in this diff