Logo Search packages:      
Sourcecode: adesklets version File versions

void imlib_image_orientate ( int  orientation  ) 

Parameters:
orientation The orientation.
Performs 90 degree rotations on the current image. Passing in orientation does not rotate, 1 rotates clockwise by 90 degree, 2, rotates clockwise by 180 degrees, 3 rotates clockwise by 270 degrees.

Definition at line 3356 of file imlib2.c.

{
   ImlibImage         *im;

   if (!ctx)
      ctx = imlib_context_new();
   CHECK_PARAM_POINTER("imlib_image_orientate", "image", ctx->image);
   CAST_IMAGE(im, ctx->image);
   if ((!(im->data)) && (im->loader) && (im->loader->load))
      im->loader->load(im, NULL, 0, 1);
   if (!(im->data))
      return;
   __imlib_DirtyImage(im);
   switch (orientation)
     {
       default:
       case 0:
          break;
       case 1:
          __imlib_FlipImageDiagonal(im, 1);
          break;
       case 2:
          __imlib_FlipImageBoth(im);
          break;
       case 3:
          __imlib_FlipImageDiagonal(im, 2);
          break;
       case 4:
          __imlib_FlipImageHoriz(im);
          break;
       case 5:
          __imlib_FlipImageDiagonal(im, 3);
          break;
       case 6:
          __imlib_FlipImageVert(im);
          break;
       case 7:
          __imlib_FlipImageDiagonal(im, 0);
          break;
     }
}


Generated by  Doxygen 1.6.0   Back to index