Einzelnen Beitrag anzeigen

termodox

Registriert seit: 4. Feb 2008
8 Beiträge
 
#4

AW: Graphics32 GR32 unter Delphi XE?

  Alt 28. Dez 2010, 10:22
Habs rausgefunden.
Das sind die notwendigen Änderungen an drei Dateien,
ausgehend von Version 1.9 für Delphi 2010 (graphics32-1-9-0-r1336),
um GR32_RS2010.dpk und GR32_DSGN_RS2010.dpk unter Delphi XE compilieren
und natürlich installieren zu können:

Index: GR32.inc
================================================== =================
RCS file: /usr/cvsroot/medicalobjects/components/graphics32/GR32.inc,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 GR32.inc
--- GR32.inc 1 Dec 2010 11:28:57 -0000 1.1.1.2
+++ GR32.inc 1 Dec 2010 13:39:14 -0000
@@ -32,7 +32,24 @@
*
* ***** END LICENSE BLOCK ***** *)

- {$IFDEF VER210}
+ {$IFDEF VER220}
+ {$DEFINE INLININGSUPPORTED}
+ {$DEFINE COMPILER2011}
+ {$DEFINE COMPILER2010}
+ {$DEFINE COMPILER2009}
+ {$DEFINE COMPILER2007}
+ {$DEFINE COMPILER2006}
+ {$DEFINE COMPILER2005}
+ {$DEFINE COMPILER7}
+ {$DEFINE COMPILER6}
+ {$IFNDEF BCB}
+ {$DEFINE DELPHI2010}
+ {$ELSE}
+ {$DEFINE BCB7}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VER210}
{$DEFINE INLININGSUPPORTED}
{$DEFINE COMPILER2010}
{$DEFINE COMPILER2009}
Index: GR32_Polygons.pas
================================================== =================
RCS file: /usr/cvsroot/medicalobjects/components/graphics32/GR32_Polygons.pas,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 GR32_Polygons.pas
--- GR32_Polygons.pas 1 Dec 2010 11:29:07 -0000 1.1.1.2
+++ GR32_Polygons.pas 1 Dec 2010 22:26:02 -0000
@@ -1662,7 +1662,7 @@
procedure TPolygon32.BuildNormals;
var
I, J, Count, NextI: Integer;
- dx, dy, f: Single;
+ dx, dy, f: TFloat;
begin
if Length(Normals) <> 0 then Exit;
SetLength(FNormals, Length(Points));
@@ -1694,7 +1694,7 @@
end;
if (dx <> 0) or (dy <> 0) then
begin
- f := 1 / Hypot(dx, dy);
+ f := 1 / GR32_Math.Hypot(dx, dy);
dx := dx * f;
dy := dy * f;
end;
Index: GR32_Transforms.pas
================================================== =================
RCS file: /usr/cvsroot/medicalobjects/components/graphics32/GR32_Transforms.pas,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 GR32_Transforms.pas
--- GR32_Transforms.pas 1 Dec 2010 11:29:10 -0000 1.1.1.2
+++ GR32_Transforms.pas 1 Dec 2010 22:19:28 -0000
@@ -1024,14 +1024,14 @@
procedure TTwirlTransformation.ReverseTransformFloat(DstX, DstY: TFloat;
out SrcX, SrcY: TFloat);
var
- xf, yf, r, t: Single;
+ xf, yf, r, t: TFloat;
begin
xf := DstX - Frx;
yf := DstY - Fry;

- r := Hypot(xf, yf);
+ r := GR32_Math.Hypot(xf, yf);
t := ArcTan2(yf, xf) + r * FTwirl;
- SinCos(t, yf, xf);
+ GR32_Math.SinCos(t, yf, xf);

SrcX := Frx + r * xf;
SrcY := Fry + r * yf;
@@ -1061,10 +1061,10 @@
procedure TBloatTransformation.ReverseTransformFloat(DstX, DstY: TFloat;
out SrcX, SrcY: TFloat);
var
- SinY, CosY, SinX, CosX, t: Single;
+ SinY, CosY, SinX, CosX, t: TFloat;
begin
- SinCos(FPiH * DstY, SinY, CosY);
- SinCos(FPiW * DstX, SinX, CosX);
+ GR32_Math.SinCos(FPiH * DstY, SinY, CosY);
+ GR32_Math.SinCos(FPiW * DstX, SinX, CosX);
t := FBP * SinY * SinX;
SrcX := DstX + t * CosX;
SrcY := DstY + t * CosY;
@@ -1111,7 +1111,7 @@
begin
Yry := (DstY - Fry) * sy;
Xrx := (DstX - Frx) * sx;
- d := Hypot(Xrx, Yry);
+ d := GR32_Math.Hypot(Xrx, Yry);
if (d < FMinR) and (d > 0) then
begin
d := ArcSin(d * Fsr) * Faw / d;
@@ -1168,7 +1168,7 @@
begin
Theta := (SrcX - SrcRect.Left) * Rt2 + Phase;
R := (SrcY - SrcRect.Bottom) * Rr;
- SinCos(Theta, S, C);
+ GR32_Math.SinCos(Theta, S, C);

DstX := Dx * R * C + Cx;
DstY := Dy * R * S + Cy;
@@ -1188,7 +1188,7 @@
if Theta < 0 then Theta := Theta + PI2;

SrcX := SrcRect.Left + Theta * Rt;
- SrcY := SrcRect.Bottom - Hypot(Dcx, Dcy) * Sy;
+ SrcY := SrcRect.Bottom - GR32_Math.Hypot(Dcx, Dcy) * Sy;
end;
Mein Gott, was soll man da ändern? Ich verstehe nichts =/
was ist das "@@ -1188,7 +1188,7 @@"??
Muss ich das
RCS file: /usr/cvsroot/medicalobjects/components/graphics32/GR32_Transforms.pas,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 GR32_Transforms.pas
--- GR32_Transforms.pas 1 Dec 2010 11:29:10 -0000 1.1.1.2
+++ GR32_Transforms.pas 1 Dec 2010 22:19:28 -0000
auch reinkopieren..mensch
  Mit Zitat antworten Zitat