Reference Guide
GdPicture14.WPF Namespace / GdViewer Class / RotateView Method
A member of the GdPictureRotateFlipType enumeration. Defines the required rotation and flipping.
Example





In This Topic
    RotateView Method (GdViewer)
    In This Topic
    Rotates clockwise or flips the global view of this GdViewer control. The rotation angle can be set to 0, 90, 180 or 270 degrees clockwise and you are allowed to specify the axis used to flip the view.
    Syntax
    'Declaration
     
    
    Public Sub RotateView( _
       ByVal Rotation As GdPictureRotateFlipType _
    ) 
    public void RotateView( 
       GdPictureRotateFlipType Rotation
    )
    public procedure RotateView( 
        Rotation: GdPictureRotateFlipType
    ); 
    public function RotateView( 
       Rotation : GdPictureRotateFlipType
    );
    public: void RotateView( 
       GdPictureRotateFlipType Rotation
    ) 
    public:
    void RotateView( 
       GdPictureRotateFlipType Rotation
    ) 

    Parameters

    Rotation
    A member of the GdPictureRotateFlipType enumeration. Defines the required rotation and flipping.
    Remarks
    You can regularly apply the GetStat method to determine if this method has been successful.
    Example
    How to rotate the viewer's global view upside down.
    'We assume that the GdViewer1 control has been properly integrated.
    If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
        Dim rotation As GdPictureRotateFlipType = GdPictureRotateFlipType.Rotate180FlipNone
        GdViewer1.RotateView(rotation)
        MessageBox.Show("The current view is rotated: " + GdViewer1.ViewRotation.ToString(), "GdViewer.RotateView")
    Else
        MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.RotateView")
    End If
    //We assume that the GdViewer1 control has been properly integrated.
    if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
    {
        GdPictureRotateFlipType rotation = GdPictureRotateFlipType.GdPictureRotate180FlipNone;
        GdViewer1.RotateView(rotation);
        MessageBox.Show("The current view is rotated: " + GdViewer1.ViewRotation.ToString(), "GdViewer.RotateView")
    }
    else
        MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.RotateView");
    See Also