[Python-checkins] CVS: python/dist/src/Tools/pynche DetailsViewer.py,2.9,2.10

Barry Warsaw bwarsaw@users.sourceforge.net
Tue, 10 Jul 2001 14:39:20 -0700


Update of /cvsroot/python/python/dist/src/Tools/pynche
In directory usw-pr-cvs1:/tmp/cvs-serv29488

Modified Files:
	DetailsViewer.py 
Log Message:
__delta(): Use augmented assignments.


Index: DetailsViewer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/pynche/DetailsViewer.py,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -r2.9 -r2.10
*** DetailsViewer.py	1999/04/27 18:54:12	2.9
--- DetailsViewer.py	2001/07/10 21:39:18	2.10
***************
*** 211,225 ****
          elif atbound == WRAP or (atbound == RATIO and len(tie) < 2):
              if red < 0:
!                 red = red + 256
              if green < 0:
!                 green = green + 256
              if blue < 0:
!                 blue = blue + 256
              if red > 255:
!                 red = red - 256
              if green > 255:
!                 green = green - 256
              if blue > 255:
!                 blue = blue - 256
          elif atbound == RATIO:
              # for when 2 or 3 colors are tied together
--- 211,225 ----
          elif atbound == WRAP or (atbound == RATIO and len(tie) < 2):
              if red < 0:
!                 red += 256
              if green < 0:
!                 green += 256
              if blue < 0:
!                 blue += 256
              if red > 255:
!                 red -= 256
              if green > 255:
!                 green -= 256
              if blue > 255:
!                 blue -= 256
          elif atbound == RATIO:
              # for when 2 or 3 colors are tied together