diff --git a/applications/fpvviewer/fpvv_mainform.lfm b/applications/fpvviewer/fpvv_mainform.lfm index a03932d8e..d383d8584 100644 --- a/applications/fpvviewer/fpvv_mainform.lfm +++ b/applications/fpvviewer/fpvv_mainform.lfm @@ -82,7 +82,7 @@ object frmFPVViewer: TfrmFPVViewer TabOrder = 1 object editFileName: TFileNameEdit Left = 8 - Height = 23 + Height = 22 Top = 8 Width = 304 DialogOptions = [] @@ -104,7 +104,7 @@ object frmFPVViewer: TfrmFPVViewer end object spinScale: TFloatSpinEdit Left = 72 - Height = 23 + Height = 16 Top = 97 Width = 168 DecimalPlaces = 6 @@ -117,9 +117,9 @@ object frmFPVViewer: TfrmFPVViewer end object Label1: TLabel Left = 8 - Height = 15 + Height = 16 Top = 97 - Width = 46 + Width = 55 Caption = 'Scale by:' ParentColor = False end @@ -161,15 +161,15 @@ object frmFPVViewer: TfrmFPVViewer end object Label2: TLabel Left = 8 - Height = 15 + Height = 16 Top = 72 - Width = 73 + Width = 88 Caption = 'Y adjustment:' ParentColor = False end object spinAdjustY: TSpinEdit Left = 80 - Height = 23 + Height = 16 Top = 72 Width = 72 Increment = 100 @@ -180,7 +180,7 @@ object frmFPVViewer: TfrmFPVViewer end object spinAdjustX: TSpinEdit Left = 232 - Height = 23 + Height = 16 Top = 72 Width = 72 Increment = 50 @@ -191,9 +191,9 @@ object frmFPVViewer: TfrmFPVViewer end object Label3: TLabel Left = 160 - Height = 15 + Height = 16 Top = 72 - Width = 73 + Width = 88 Caption = 'X adjustment:' ParentColor = False end @@ -208,18 +208,18 @@ object frmFPVViewer: TfrmFPVViewer end object Label4: TLabel Left = 9 - Height = 15 + Height = 16 Top = 126 - Width = 128 + Width = 153 Caption = 'Force encoding on read:' ParentColor = False end object comboEncoding: TComboBox Left = 144 - Height = 23 + Height = 20 Top = 126 Width = 128 - ItemHeight = 15 + ItemHeight = 0 ItemIndex = 0 Items.Strings = ( 'Read from the file' @@ -255,22 +255,22 @@ object frmFPVViewer: TfrmFPVViewer end object labelFileEncoding: TLabel Left = 278 - Height = 15 + Height = 16 Top = 130 - Width = 74 + Width = 88 Caption = 'File encoding:' ParentColor = False end object checkForceWhiteBackground: TCheckBox Left = 9 - Height = 19 + Height = 18 Top = 152 - Width = 153 + Width = 178 Caption = 'Force white background?' TabOrder = 11 end object buttonViewDebugInfo: TButton - Left = 256 + Left = 344 Height = 17 Top = 153 Width = 131 @@ -296,5 +296,13 @@ object frmFPVViewer: TfrmFPVViewer OnClick = buttonAdjustClick TabOrder = 14 end + object checkShowPage: TCheckBox + Left = 216 + Height = 18 + Top = 152 + Width = 87 + Caption = 'Show Page' + TabOrder = 15 + end end end diff --git a/applications/fpvviewer/fpvv_mainform.pas b/applications/fpvviewer/fpvv_mainform.pas index 20ed2efaf..8047fec16 100644 --- a/applications/fpvviewer/fpvv_mainform.pas +++ b/applications/fpvviewer/fpvv_mainform.pas @@ -27,6 +27,7 @@ type buttonAdjust: TButton; buttonViewDebugInfo: TButton; buttonRenderingTest: TButton; + checkShowPage: TCheckBox; checkForceWhiteBackground: TCheckBox; comboEncoding: TComboBox; editFileName: TFileNameEdit; @@ -97,6 +98,7 @@ const var Vec: TvVectorialDocument; CanvasSize: TPoint; + lCurPage: TvVectorialPage; begin // First check the in input if editFileName.FileName = '' then Exit; // silent exit in this simple case @@ -137,6 +139,13 @@ begin if checkForceWhiteBackground.Checked then Vec.GetPageAsVectorial(0).BackgroundColor := colWhite; if not checkForceWhiteBackground.Checked then Vec.GetPageAsVectorial(0).DrawBackground(Drawer.Drawing.Canvas); + if checkShowPage.Checked then + Vec.GetPageAsVectorial(0).RenderPageBorder( + Drawer.Drawing.Canvas, + FPVVIEWER_SPACE_FOR_NEGATIVE_COORDS + Drawer.PosX, + Drawer.Drawing.Height - FPVVIEWER_SPACE_FOR_NEGATIVE_COORDS + Drawer.PosY, + spinScale.Value, + -1 * spinScale.Value); Vec.GetPageAsVectorial(0).Render( Drawer.Drawing.Canvas, FPVVIEWER_SPACE_FOR_NEGATIVE_COORDS + Drawer.PosX, @@ -306,6 +315,7 @@ procedure TfrmFPVViewer.Button2Click(Sender: TObject); var Vec: TvVectorialDocument; i: Integer; + lCurPage: TvVectorialPage; begin // First check the in input //if not CheckInput() then Exit; diff --git a/applications/fpvviewer/reference/OpenDocument-v1.1.pdf b/applications/fpvviewer/reference/OpenDocument-v1.1.pdf new file mode 100644 index 000000000..99067c9f6 Binary files /dev/null and b/applications/fpvviewer/reference/OpenDocument-v1.1.pdf differ