Rotation in export

This commit is contained in:
ronaldhordijk 2005-02-06 09:07:29 +00:00
parent f2dd490dd7
commit dc3d395e11
2 changed files with 14 additions and 11 deletions

View File

@ -2,7 +2,7 @@ object MainForm: TMainForm
Left = 316 Left = 316
Top = 424 Top = 424
Width = 574 Width = 574
Height = 435 Height = 455
Caption = 'Apophysis' Caption = 'Apophysis'
Color = clBtnFace Color = clBtnFace
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
@ -27,7 +27,7 @@ object MainForm: TMainForm
Left = 160 Left = 160
Top = 28 Top = 28
Width = 4 Width = 4
Height = 334 Height = 354
end end
object ToolBar: TToolBar object ToolBar: TToolBar
Left = 0 Left = 0
@ -251,7 +251,7 @@ object MainForm: TMainForm
Left = 0 Left = 0
Top = 28 Top = 28
Width = 160 Width = 160
Height = 334 Height = 354
Align = alLeft Align = alLeft
Columns = < Columns = <
item item
@ -270,7 +270,7 @@ object MainForm: TMainForm
Left = 164 Left = 164
Top = 28 Top = 28
Width = 402 Width = 402
Height = 334 Height = 354
Align = alClient Align = alClient
BevelInner = bvLowered BevelInner = bvLowered
BevelOuter = bvNone BevelOuter = bvNone
@ -281,7 +281,7 @@ object MainForm: TMainForm
Left = 1 Left = 1
Top = 1 Top = 1
Width = 400 Width = 400
Height = 332 Height = 352
Align = alClient Align = alClient
AutoSize = True AutoSize = True
PopupMenu = DisplayPopup PopupMenu = DisplayPopup
@ -293,7 +293,7 @@ object MainForm: TMainForm
end end
object StatusBar: TStatusBar object StatusBar: TStatusBar
Left = 0 Left = 0
Top = 362 Top = 382
Width = 566 Width = 566
Height = 19 Height = 19
Panels = < Panels = <

View File

@ -1356,6 +1356,7 @@ begin
format('" center="%g %g" ', [x, y]) + format('" center="%g %g" ', [x, y]) +
format('scale="%g" ', [cp1.pixels_per_unit]) + format('scale="%g" ', [cp1.pixels_per_unit]) +
format('angle="%g" ', [cp1.FAngle]) + format('angle="%g" ', [cp1.FAngle]) +
format('rotate="%g" ', [-180 * cp1.FAngle/Pi]) +
format('zoom="%g" ', [cp1.zoom]) + format('zoom="%g" ', [cp1.zoom]) +
'oversample="' + IntToStr(cp1.spatial_oversample) + 'oversample="' + IntToStr(cp1.spatial_oversample) +
format('" filter="%g" ', [cp1.spatial_filter_radius]) + format('" filter="%g" ', [cp1.spatial_filter_radius]) +
@ -3846,16 +3847,16 @@ begin
end; end;
procedure TMainForm.mnuExportFLameClick(Sender: TObject); procedure TMainForm.mnuExportFlameClick(Sender: TObject);
var var
FileList: Tstringlist; FileList: Tstringlist;
Ext, ex, Path: string; Ext, ex, Path: string;
cp1: TControlPoint; cp1: TControlPoint;
begin begin
if MainCp.FAngle <> 0 then begin // if MainCp.FAngle <> 0 then begin
showMessage('This flame is rotated. It cannot be correctly rendered this way'); // showMessage('This flame is rotated. It cannot be correctly rendered this way');
Exit; // Exit;
end; // end;
if not FileExists(HqiPath) then if not FileExists(HqiPath) then
begin begin
@ -4070,6 +4071,8 @@ begin
if v <> '' then Parsecp.zoom := StrToFloat(v); if v <> '' then Parsecp.zoom := StrToFloat(v);
v := Attributes.Value('scale'); v := Attributes.Value('scale');
if v <> '' then Parsecp.pixels_per_unit := StrToFloat(v); 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'); v := Attributes.Value('angle');
if v <> '' then Parsecp.FAngle := StrToFloat(v); if v <> '' then Parsecp.FAngle := StrToFloat(v);