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.
Classes |
AlphaCtrl |
Implements the drawing, mouse handling and sizing routines for the
alpha channel control. |
BaseLineCtrl |
Base class used to hold common code for the Alpha channel control and
the brightness palette control. |
BasePyControl |
Base class used to hold common code for the HSB colour wheel and the
RGB colour cube. |
BrightCtrl |
Implements the drawing, mouse handling and sizing routines for the
brightness palette control. |
Colour |
This is a subclass of wx.Colour, which adds Hue, Saturation and
Brightness capability to the base class. |
ColourPanel |
Simple custom class used to display "old" and
"new" colour panels, with alpha blending capabilities. |
CubeColourDialog |
This is the CubeColourDialog main class implementation. |
CustomPanel |
|
HSVWheel |
Implements the drawing, mouse handling and sizing routines for the HSV
colour wheel. |
LineDescription |
Simple class to store description and constants for a line in 2D
space. |
RGBCube |
Implements the drawing, mouse handling and sizing routines for the RGB
cube colour. |
Function Summary |
|
AngleFromPoint (pt,
center)
Returns the angle between the x-axis and the line connecting the
center and the point pt. |
|
deg2rad (x)
Transforms degrees into radians. |
|
Distance (pt1,
pt2)
Returns the distance between 2 points. |
|
DrawCheckerBoard (dc,
rect,
checkColour,
box)
Draws a checkerboard on a wx.DC. |
|
FindC (line)
Internal function. |
|
Intersection (line1,
line2)
Calculates the intersection point between 2 lines. |
|
PointOnLine (pt1,
pt2,
length,
maxLen)
Internal function. |
|
PtFromAngle (angle,
sat,
center)
Given the angle with respect to the x-axis, returns the point based on
the saturation value. |
|
rad2deg (x)
Transforms radians into degrees. |
|
RestoreOldDC (dc,
oldPen,
oldBrush,
oldMode)
Restores the old settings for a wx.DC. |
|
rgb2html (colour)
Transforms a RGB triplet into an html hex string. |
|
scaletomax (x)
Normalize a value as a function of the radius. |
|
Slope (pt1,
pt2)
Calculates the slope of the line connecting 2 points. |
|
toscale (x)
Normalize a value as a function of the radius. |