Leadtools.Windows.Media.Effects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
RotateCommandBitmapEffect Class
See Also  Members  
Leadtools.Windows.Media.Effects Namespace : RotateCommandBitmapEffect Class




Rotates an image by the number of degrees specified.

Syntax

Visual Basic (Declaration) 
Public Class RotateCommandBitmapEffect 
   Inherits RasterCommandBitmapEffect
Visual Basic (Usage)Copy Code
Dim instance As RotateCommandBitmapEffect
C# 
public class RotateCommandBitmapEffect : RasterCommandBitmapEffect 
Managed Extensions for C++ 
public __gc class RotateCommandBitmapEffect : public RasterCommandBitmapEffect 
C++/CLI 
public ref class RotateCommandBitmapEffect : public RasterCommandBitmapEffect 

Example

This example will load an image, rotate it by 45 degrees then save it back to disk

Remarks

This command has the following features:

  • It uses the center of the image as the center of rotation.
  • It can rotate the image clockwise or counterclockwise up to 360 degrees in 1-degree increments.
  • It can resize the image to accommodate the rotated height and width, or it can retain the original height and width, cropping the image as necessary.
  • It uses FillColor as the background color to fill any new area created by the rotation.

RotateCommandBitmapEffectsFlags.Resample and RotateCommandBitmapEffectsFlags.Bicubic can be combined with RotateCommandBitmapEffectsFlags.Resize, but they can not be combined with each other.

If RotateCommandBitmapEffectsFlags.Resize is set, then the image is resized. Otherwise, the image is cropped.

Interpolation can be done while rotating certain images. This produces superior output, eliminating the jaggedness occurring when rotating images at angles that are not multiple of 90. (ie when RotateCommandBitmapEffect.Angle is not a multiple of 9000).

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Freezable
            System.Windows.Media.Animation.Animatable
               System.Windows.Media.Effects.BitmapEffect
                  Leadtools.Windows.Media.Effects.RasterCommandBitmapEffect
                     Leadtools.Windows.Media.Effects.RotateCommandBitmapEffect

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also