mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 11:00:07 +01:00
Start updating some wx.lib docstrings
This commit is contained in:
@@ -36,8 +36,8 @@ def AdjustAlpha(colour, alpha):
|
||||
:param integer `alpha`: the new value for the colour alpha channel (between 0
|
||||
and 255).
|
||||
|
||||
:rtype: :class:`Colour`
|
||||
:returns: A new :class:`Colour` with the alpha channel specified as input
|
||||
:rtype: :class:`wx.Colour`
|
||||
:returns: A new :class:`wx.Colour` with the alpha channel specified as input
|
||||
"""
|
||||
|
||||
return wx.Colour(colour.Red(), colour.Green(), colour.Blue(), alpha)
|
||||
@@ -48,12 +48,12 @@ def AdjustColour(color, percent, alpha=wx.ALPHA_OPAQUE):
|
||||
Brighten/darken input colour by `percent` and adjust alpha
|
||||
channel if needed. Returns the modified color.
|
||||
|
||||
:param Colour `color`: color object to adjust;
|
||||
:param wx.Colour `color`: color object to adjust;
|
||||
:param integer `percent`: percent to adjust +(brighten) or -(darken);
|
||||
:param integer `alpha`: amount to adjust alpha channel.
|
||||
|
||||
:rtype: :class:`Colour`
|
||||
:returns: A new darkened/lightened :class:`Colour` with the alpha channel
|
||||
:rtype: :class:`wx.Colour`
|
||||
:returns: A new darkened/lightened :class:`wx.Colour` with the alpha channel
|
||||
specified as input
|
||||
"""
|
||||
|
||||
@@ -76,10 +76,10 @@ def BestLabelColour(color, bw=False):
|
||||
Get the best color to use for the label that will be drawn on
|
||||
top of the given color.
|
||||
|
||||
:param Colour `color`: background color that text will be drawn on;
|
||||
:param wx.Colour `color`: background color that text will be drawn on;
|
||||
:param bool `bw`: If ``True``, only return black or white.
|
||||
|
||||
:rtype: :class:`Colour`
|
||||
:rtype: :class:`wx.Colour`
|
||||
"""
|
||||
|
||||
avg = sum(color.Get()) / 3
|
||||
@@ -100,7 +100,7 @@ def GetHighlightColour():
|
||||
"""
|
||||
Gets the default highlight color.
|
||||
|
||||
:rtype: :class:`Colour`
|
||||
:rtype: :class:`wx.Colour`
|
||||
"""
|
||||
|
||||
if wx.Platform == '__WXMAC__':
|
||||
|
||||
Reference in New Issue
Block a user