~ubuntu-branches/ubuntu/edgy/djvulibre/edgy

« back to all changes in this revision

Viewing changes to libdjvu/GBitmap.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-07-03 11:38:23 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060703113823-un2te7742kk04c63
Tags: 3.5.17-1ubuntu1
* Sync with Debian
* debian/rules:
  - use dh_iconcache.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
//C- | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
52
52
//C- +------------------------------------------------------------------
53
53
// 
54
 
// $Id: GBitmap.cpp,v 1.10 2004/04/17 23:56:11 leonb Exp $
55
 
// $Name: debian_version_3_5_16-1 $
 
54
// $Id: GBitmap.cpp,v 1.11 2005/12/24 12:45:01 leonb Exp $
 
55
// $Name: debian_version_3_5_17-1 $
56
56
 
57
57
#ifdef HAVE_CONFIG_H
58
58
# include "config.h"
69
69
#include "GException.h"
70
70
#include <string.h>
71
71
 
72
 
// File "$Id: GBitmap.cpp,v 1.10 2004/04/17 23:56:11 leonb Exp $"
 
72
// File "$Id: GBitmap.cpp,v 1.11 2005/12/24 12:45:01 leonb Exp $"
73
73
// - Author: Leon Bottou, 05/1997
74
74
 
75
75
 
1557
1557
GBitmap::rotate(int count)
1558
1558
{
1559
1559
  GP<GBitmap> newbitmap=this;
1560
 
  if((count%=4))
 
1560
  count = count & 3;
 
1561
  if(count)
1561
1562
  {
1562
1563
    if( count & 0x01 )
1563
1564
    {
1573
1574
    dbitmap.set_grays(grays);
1574
1575
    switch(count)
1575
1576
    {
1576
 
    case 1: // rotate 90 counter clockwise
 
1577
    case 3: // rotate 90 counter clockwise
1577
1578
      {
1578
1579
        const int lastrow = dbitmap.rows()-1;
1579
1580
        for(int y=0; y<nrows; y++)
1601
1602
        }
1602
1603
      }
1603
1604
      break;
1604
 
    case 3: // rotate 270 counter clockwise
 
1605
    case 1: // rotate 270 counter clockwise
1605
1606
      {
1606
1607
        const int lastcolumn = dbitmap.columns()-1;
1607
1608
        for(int y=0,ynew=lastcolumn;ynew>=0;y++,ynew--)