Results 1 to 2 of 2

Thread: Result of 90 degrees rotation is wrong

  1. #1

    Result of 90 degrees rotation is wrong

    When I was programming a rotation event for a game,
    I discovered that when I tell PowerDraw to rotate an image
    90 degrees, the result is an image that is rotated approximately 30 degrees.
    I have a simple (Delphi) function to solve this.

    Code:
    function DegToPower(Angle: Real): Extended;
    begin
      Result := (Angle / 360) * 256;
    end;
    I hope this makes the implementation of the rotation feature of PowerDraw easier.

  2. #2

    Result of 90 degrees rotation is wrong

    I suggesto to change directly the PowerTypes unit in the pRotate4 procedure:
    Code:
     // convert angle to radians
     //Beta:= (Angle * Pi) / 128;
    to:
    Code:
     // convert angle to radians
     Beta:= (Angle * Pi) / 180;

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •