def rotateHue ( self, hue_inc ):
""" Rotates the hue value of Colz object """
if isinstance( hue_inc, int ):
hue_inc /= 360.0
newhue = self.h + hue_inc
if newhue > 1.0:
newhue, whole = math.modf(newhue) # Keep decimal part
if newhue < 0.0:
newhue, whole = math.modf(newhue) # Keep decimal part
newhue = 1.0 + newhue
self.h = newhue
self.hsl[0] = self.h
self.hsla[0] = self.h
self.updateFromHsl()
# Return array of integer values
评论列表
文章目录