Copyright © Kambiz R. Khojasteh. All rights reserved.
Get future component updates from http://www.delphiarea.com.
DESCRIPTION
TRotateImage is a component similar to TImage with ability to show the image as rotated in an arbitrary angle.
KEY PROPERTIES
- Angle: Extended
Determines the rotation angle in degrees.
- ImageRect: TRect (Read-only)
Specifies the bounding rectangle of the image on the control's client area.
- ImageRgn: HRGN (Read-only)
Specifies the region that the image is occupied on the control's client area.
- MaxSize: Integer (Read-only)
Indicates the maximum width or height that the rotated image can have.
- RotatedBitmap: TBitmap (Read-only)
Contains the rotated copy of the image.
- UniqueSize: Boolean
Determines the behavior of the inherited AutoSize property. If set to true, size of the control is determined by the maximum size of the image during the rotation. If set to false, size of the control will change according to the selected rotation angle to exactly fit to the size of the rotated image.
KEY METHODS
- function RotatedPoint(const Pt: TPoint): TPoint
Returns the transformed coordinates of a point on the original image according to the current value of the rotation angle.
- procedure RotatePoints(var Points: array of TPoint)
Transforms coordinates of a set of points on the original image according to the current value of the rotation angle.
KEY EVENTS
- OnRotation: TNotifyEvent
Occurs when the rotated picture is calculated and ready.
GLOBAL ROUTINES
- function CreateRotatedBitmap(Bitmap: TBitmap; const Angle: Double; bgColor: TColor): TBitmap
Creates a new bitmap as the result of rotating the bitmap specified by the Bitmap parameter with the angle specified by the Angle parameter in degrees. The function fills the empty area of the new bitmap with the color specified by the bgColor parameter.
HISTORY
- 1.54 (November 18, 2008)
- The OnRotation event added.
- Support for Delphi 2009 added.
- 1.53 (January 19, 2007)
- A bug regarding transparency is fixed.
- 1.52 (May 1, 2006)
- A bug in drawing the image is fixed.
- 1.51 (April 30, 2006)
- A bug in calculating the visible region of the image is fixed.
- 1.50 (April 10, 2006)
- The rotation algorithm is optimized. For a 640x480 pixels bitmap the rotation algorithm is about 50% faster than before.
- The drawing algorithm optimized.
- Added the RotatePoints method.
- Added MaxSize, ImageRect, and ImageRgn properties as read-only.
- 1.40 (November 17, 2003)
- The rotation algorithm is optimized. For a 640x480 pixels bitmap the rotation algorithm is about 40% faster than before.
- 1.30 (September 14, 2002)
- The rotation algorithm is optimized. For a 640x480 pixels bitmap the rotation algorithm is more than 50% faster than before.
- 1.24 (December 28, 2001)
- Now Delphi 6 is supported.
- 1.23 (May 7, 2001)
- A bug in transparency is fixed.
- 1.22 (January 27, 2001)
- The RotatedPoint method is added.
- A minor bug is fixed.
- 1.21 (September 26, 2000)
- Component editor of the control is improved, so that at design time it can open the picture editor by double clicking on the control.
- 1.20 (June 29, 2000)
- A minor bug is fixed.
- 1.10 (June 28, 2000)
- The UniqueSize property is added.
- 1.00 (June 17, 2000)
- Initial release.
LICENSE
TRotateImage component is freeware. You may copy component's files AS LONG AS YOU COPY ALL OF THEM. If you want to change the source code in order to improve the component's features, performance, etc. please send me the new source code so that I can have a look at it. The changed source code should contain descriptions what you have changed, and of course your name. The only thing you MAY NOT CHANGE is the ORIGINAL COPYRIGHT INFORMATION.
DISCLAIMER
TRotateImage is provided "AS IS" without any warranty of any kind, either express or implied. The entire risk as to the quality and performance of the software is with you. The author is NOT liable for any DAMAGES resulting from the use and misuse of the component, especially he is NOT liable for DAMAGES that were caused BY ANY VERSION WHICH HAS NOT BEEN PROGRAMMED BY THE AUTHOR HIMSELF.