Matrix.IsInvertible method

Applies to: desktop apps only

The Matrix::IsInvertible method determines whether this matrix is invertible.

Syntax

BOOL IsInvertible();

Parameters

This method has no parameters.

Return value

Type:

Type: BOOL

If this matrix is invertible, this method returns TRUE; otherwise, it returns FALSE.

Examples

The following example creates a Matrix object and calls the Matrix::IsInvertible method to determine whether the matrix is invertible. If the matrix is invertible, the code uses it to set the world transformation of a Graphics object.


VOID Example_IsInvertible(HDC hdc)
{
   Graphics graphics(hdc);
   Pen pen(Color(255, 0, 0, 255));

   Matrix matrix(3.0f, 0.0f, 0.0f, 2.0f, 20.0f, 10.0f);

   if(matrix.IsInvertible())
      graphics.SetTransform(&matrix);

   graphics.DrawRectangle(&pen, 0, 0, 100, 100); 
}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusmatrix.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Matrix
Matrix::Invert
Transformations
Global and Local Transformations
Matrix Representation of Transformations

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show: