The CubeColourDialog is an alternative implementation of
wx.ColourDialog, and it offers different functionalities with respect to
the default wxPython one. It can be used as a replacement of
wx.ColourDialog with exactly the same syntax and methods.
Some features:
And much more.
CubeColourDialog is freeware and distributed under the wxPython
license.
|
Colour
This is a subclass of wx.Colour, which adds Hue, Saturation and
Brightness capability to the base class.
|
|
LineDescription
Simple class to store description and constants for a line in 2D
space.
|
|
BasePyControl
Base class used to hold common code for the HSB colour wheel and
the RGB colour cube.
|
|
RGBCube
Implements the drawing, mouse handling and sizing routines for
the RGB cube colour.
|
|
HSVWheel
Implements the drawing, mouse handling and sizing routines for
the HSV colour wheel.
|
|
BaseLineCtrl
Base class used to hold common code for the Alpha channel
control and the brightness palette control.
|
|
BrightCtrl
Implements the drawing, mouse handling and sizing routines for
the brightness palette control.
|
|
AlphaCtrl
Implements the drawing, mouse handling and sizing routines for
the alpha channel control.
|
|
ColourPanel
Simple custom class used to display "old" and
"new" colour panels, with alpha blending
capabilities.
|
|
CubeColourDialog
This is the CubeColourDialog main class implementation.
|
|
rad2deg(x)
Transforms radians into degrees.
|
|
deg2rad(x)
Transforms degrees into radians.
|
|
toscale(x)
Normalize a value as a function of the radius.
|
|
scaletomax(x)
Normalize a value as a function of the radius.
|
|
rgb2html(colour)
Transforms a RGB triplet into an html hex string.
|
|
Slope(pt1,
pt2)
Calculates the slope of the line connecting 2 points.
|
|
Intersection(line1,
line2)
Calculates the intersection point between 2 lines.
|
|
FindC(line)
Internal function.
|
|
PointOnLine(pt1,
pt2,
length,
maxLen)
Internal function.
|
|
Distance(pt1,
pt2)
Returns the distance between 2 points.
|
|
AngleFromPoint(pt,
center)
Returns the angle between the x-axis and the line connecting the
center and the point pt.
|
|
PtFromAngle(angle,
sat,
center)
Given the angle with respect to the x-axis, returns the point
based on the saturation value.
|
|
RestoreOldDC(dc,
oldPen,
oldBrush,
oldMode)
Restores the old settings for a wx.DC.
|
|
DrawCheckerBoard(dc,
rect,
checkColour,
box=5)
Draws a checkerboard on a wx.DC.
|