From e543fe6d7fdb2d45884c92c5b57229bcf08ac952 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Thu, 10 May 2012 10:14:28 +0000 Subject: [PATCH] fpvviewer: Adds controls to allow walking through the drawing in the X and Y axises git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2424 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- applications/fpvviewer/fpvv_mainform.lfm | 52 ++++++++++++++++++++---- applications/fpvviewer/fpvv_mainform.pas | 8 +++- applications/fpvviewer/fpvviewer.lpi | 1 + 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/applications/fpvviewer/fpvv_mainform.lfm b/applications/fpvviewer/fpvv_mainform.lfm index 5e6b6230f..8be257237 100644 --- a/applications/fpvviewer/fpvv_mainform.lfm +++ b/applications/fpvviewer/fpvv_mainform.lfm @@ -1,14 +1,14 @@ object frmFPVViewer: TfrmFPVViewer Left = 322 - Height = 473 + Height = 538 Top = 143 Width = 485 Caption = 'Free Pascal Vectorial Viewer' - ClientHeight = 473 + ClientHeight = 538 ClientWidth = 485 OnCreate = FormCreate OnDestroy = FormDestroy - LCLVersion = '0.9.31' + LCLVersion = '1.1' object editFileName: TFileNameEdit Left = 8 Height = 21 @@ -34,7 +34,7 @@ object frmFPVViewer: TfrmFPVViewer object spinScale: TFloatSpinEdit Left = 72 Height = 21 - Top = 72 + Top = 97 Width = 168 DecimalPlaces = 6 Increment = 0.1 @@ -47,7 +47,7 @@ object frmFPVViewer: TfrmFPVViewer object Label1: TLabel Left = 8 Height = 14 - Top = 79 + Top = 97 Width = 45 Caption = 'Scale by:' ParentColor = False @@ -67,8 +67,8 @@ object frmFPVViewer: TfrmFPVViewer AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom Left = 0 - Height = 369 - Top = 104 + Height = 410 + Top = 128 Width = 485 PageIndex = 0 Anchors = [akTop, akLeft, akRight, akBottom] @@ -108,10 +108,46 @@ object frmFPVViewer: TfrmFPVViewer object btnContourLines: TButton Left = 256 Height = 25 - Top = 71 + Top = 97 Width = 224 Caption = 'Generate Contour Lines' OnClick = btnContourLinesClick TabOrder = 7 end + object Label2: TLabel + Left = 8 + Height = 14 + Top = 72 + Width = 68 + Caption = 'Y adjustment:' + ParentColor = False + end + object spinAdjustY: TSpinEdit + Left = 80 + Height = 21 + Top = 72 + Width = 72 + Increment = 100 + MaxValue = 1000 + MinValue = -1000 + TabOrder = 8 + end + object spinAdjustX: TSpinEdit + Left = 232 + Height = 21 + Top = 72 + Width = 72 + Increment = 50 + MaxValue = 1000 + MinValue = -1000 + TabOrder = 9 + end + object Label3: TLabel + Left = 160 + Height = 14 + Top = 72 + Width = 68 + Caption = 'X adjustment:' + ParentColor = False + end end diff --git a/applications/fpvviewer/fpvv_mainform.pas b/applications/fpvviewer/fpvv_mainform.pas index 66f37a0a3..0c6e68c8c 100644 --- a/applications/fpvviewer/fpvv_mainform.pas +++ b/applications/fpvviewer/fpvv_mainform.pas @@ -20,9 +20,13 @@ type btnContourLines: TButton; buttonRenderingTest: TButton; editFileName: TFileNameEdit; + Label2: TLabel; + Label3: TLabel; notebook: TNotebook; pageViewer: TPage; Page2: TPage; + spinAdjustY: TSpinEdit; + spinAdjustX: TSpinEdit; spinScale: TFloatSpinEdit; Label1: TLabel; DXFTreeView: TTreeView; @@ -97,8 +101,8 @@ begin DrawFPVectorialToCanvas( Vec.GetPage(0), Drawer.Drawing.Canvas, - FPVVIEWER_SPACE_FOR_NEGATIVE_COORDS, - Drawer.Drawing.Height - FPVVIEWER_SPACE_FOR_NEGATIVE_COORDS, + FPVVIEWER_SPACE_FOR_NEGATIVE_COORDS + spinAdjustX.Value, + Drawer.Drawing.Height - FPVVIEWER_SPACE_FOR_NEGATIVE_COORDS + spinAdjustY.Value, spinScale.Value, -1 * spinScale.Value); Drawer.Invalidate; diff --git a/applications/fpvviewer/fpvviewer.lpi b/applications/fpvviewer/fpvviewer.lpi index ed5a4573a..05ef7fb7a 100644 --- a/applications/fpvviewer/fpvviewer.lpi +++ b/applications/fpvviewer/fpvviewer.lpi @@ -79,6 +79,7 @@ +