Package DejaVu :: Module ColorWheel :: Class ColorWheel
[hide private]
[frames] | no frames]

Class ColorWheel

source code

EventHandler.CallbackFunctions --+
                                 |
                                ColorWheel

Instance Methods [hide private]
  MakeWheelGeometry(self)
Compute vertex coordinates to draw the wheel's color patches
  MakeWheelColors(self, intensity)
build the array of colors to draw a wheel
  DrawWheel(self)
draw the color wheel
  DrawCursor(self)
Compute cursor position from hsv value and draw it
  _MoveCursor(self, x, y)
  MoveCursor(self, event=None)
Compute the new color for the cursor position, redraw cursor
  Callbacks(self)
Implement callback functions
  Get(self, mode='HSV')
Get the current color
  Set(self, color, mode='HSV')
Set the current color
  BuildWheel(self, value)
Compute the colors, convert them to Tk, draw wheel, draw cursor
  setWysiwyg(self, onOff)
Toggle Wysiwyg mode.
  setImmediate(self, onOff)
Toggle Wysiwyg mode.
  __init__(self, parent, width=100, height=100, radius=None, circles=5, stripes=10, immediate=1, wysiwyg=0, wheelPad=10)

Inherited from EventHandler.CallbackFunctions: AddCallback, MouseUp, RemoveCallback, SetCallback


Method Details [hide private]

MakeWheelGeometry(self)

source code 
Compute vertex coordinates to draw the wheel's color patches

MakeWheelColors(self, intensity)

source code 
build the array of colors to draw a wheel

DrawWheel(self)

source code 
draw the color wheel

DrawCursor(self)

source code 
Compute cursor position from hsv value and draw it

_MoveCursor(self, x, y)

source code 
None

MoveCursor(self, event=None)

source code 
Compute the new color for the cursor position, redraw cursor

Callbacks(self)

source code 
Implement callback functions
Overrides: EventHandler.CallbackFunctions.Callbacks

Get(self, mode='HSV')

source code 
Get the current color

Set(self, color, mode='HSV')

source code 
Set the current color

BuildWheel(self, value)

source code 
Compute the colors, convert them to Tk, draw wheel, draw cursor

setWysiwyg(self, onOff)

source code 
Toggle Wysiwyg mode. When on, wheel colors are recomputed

setImmediate(self, onOff)

source code 
Toggle Wysiwyg mode. When on, wheel colors are recomputed

__init__(self, parent, width=100, height=100, radius=None, circles=5, stripes=10, immediate=1, wysiwyg=0, wheelPad=10)
(Constructor)

source code 
None
Overrides: EventHandler.CallbackFunctions.__init__