From dc3d395e11dd3e0e1236868d14ee8910e4eb2eb1 Mon Sep 17 00:00:00 2001 From: ronaldhordijk Date: Sun, 6 Feb 2005 09:07:29 +0000 Subject: [PATCH] Rotation in export --- 2.02g/Source/Main.dfm | 12 ++++++------ 2.02g/Source/Main.pas | 13 ++++++++----- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/2.02g/Source/Main.dfm b/2.02g/Source/Main.dfm index ca35c23..7a96f83 100644 --- a/2.02g/Source/Main.dfm +++ b/2.02g/Source/Main.dfm @@ -2,7 +2,7 @@ object MainForm: TMainForm Left = 316 Top = 424 Width = 574 - Height = 435 + Height = 455 Caption = 'Apophysis' Color = clBtnFace Font.Charset = ANSI_CHARSET @@ -27,7 +27,7 @@ object MainForm: TMainForm Left = 160 Top = 28 Width = 4 - Height = 334 + Height = 354 end object ToolBar: TToolBar Left = 0 @@ -251,7 +251,7 @@ object MainForm: TMainForm Left = 0 Top = 28 Width = 160 - Height = 334 + Height = 354 Align = alLeft Columns = < item @@ -270,7 +270,7 @@ object MainForm: TMainForm Left = 164 Top = 28 Width = 402 - Height = 334 + Height = 354 Align = alClient BevelInner = bvLowered BevelOuter = bvNone @@ -281,7 +281,7 @@ object MainForm: TMainForm Left = 1 Top = 1 Width = 400 - Height = 332 + Height = 352 Align = alClient AutoSize = True PopupMenu = DisplayPopup @@ -293,7 +293,7 @@ object MainForm: TMainForm end object StatusBar: TStatusBar Left = 0 - Top = 362 + Top = 382 Width = 566 Height = 19 Panels = < diff --git a/2.02g/Source/Main.pas b/2.02g/Source/Main.pas index 23b250c..a7fcdbb 100644 --- a/2.02g/Source/Main.pas +++ b/2.02g/Source/Main.pas @@ -1356,6 +1356,7 @@ begin format('" center="%g %g" ', [x, y]) + format('scale="%g" ', [cp1.pixels_per_unit]) + format('angle="%g" ', [cp1.FAngle]) + + format('rotate="%g" ', [-180 * cp1.FAngle/Pi]) + format('zoom="%g" ', [cp1.zoom]) + 'oversample="' + IntToStr(cp1.spatial_oversample) + format('" filter="%g" ', [cp1.spatial_filter_radius]) + @@ -3846,16 +3847,16 @@ begin end; -procedure TMainForm.mnuExportFLameClick(Sender: TObject); +procedure TMainForm.mnuExportFlameClick(Sender: TObject); var FileList: Tstringlist; Ext, ex, Path: string; cp1: TControlPoint; begin - if MainCp.FAngle <> 0 then begin - showMessage('This flame is rotated. It cannot be correctly rendered this way'); - Exit; - end; +// if MainCp.FAngle <> 0 then begin +// showMessage('This flame is rotated. It cannot be correctly rendered this way'); +// Exit; +// end; if not FileExists(HqiPath) then begin @@ -4070,6 +4071,8 @@ begin if v <> '' then Parsecp.zoom := StrToFloat(v); v := Attributes.Value('scale'); if v <> '' then Parsecp.pixels_per_unit := StrToFloat(v); + v := Attributes.Value('rotate'); + if v <> '' then Parsecp.FAngle := -PI * StrToFloat(v)/180; v := Attributes.Value('angle'); if v <> '' then Parsecp.FAngle := StrToFloat(v);