Skip to content

Commit

Permalink
Fix and improve wxDC background mode documentation
Browse files Browse the repository at this point in the history
Use wxBRUSHSTYLE_SOLID/TRANSPARENT constants instead of wxPENSTYLE_XXX
ones, as even though they have the same values, using brush style for
the background makes more sense.

Also document that the default background mode is transparent.
  • Loading branch information
vadz committed Aug 13, 2020
1 parent d3cab1b commit e96155f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions interface/wx/dc.h
Expand Up @@ -997,7 +997,7 @@ class wxDC : public wxObject
//@{

/**
Returns the current background mode: @c wxPENSTYLE_SOLID or @c wxPENSTYLE_TRANSPARENT.
Returns the current background mode: @c wxBRUSHSTYLE_SOLID or @c wxBRUSHSTYLE_TRANSPARENT.
@see SetBackgroundMode()
*/
Expand Down Expand Up @@ -1037,10 +1037,15 @@ class wxDC : public wxObject
const wxColour& GetTextForeground() const;

/**
@a mode may be one of @c wxPENSTYLE_SOLID and @c wxPENSTYLE_TRANSPARENT.
Change the current background mode.
This setting determines whether text will be drawn with a background
colour or not.
Default is @c wxBRUSHSTYLE_TRANSPARENT, i.e. text background is not
drawn.
@param mode one of @c wxBRUSHSTYLE_SOLID and @c wxBRUSHSTYLE_TRANSPARENT.
*/
void SetBackgroundMode(int mode);

Expand Down Expand Up @@ -1980,7 +1985,8 @@ class wxDCBgModeChanger
@param dc
The DC where the mode must be temporary set.
@param mode
The background mode to set.
The background mode to set, one of @c wxBRUSHSTYLE_SOLID or @c
wxBRUSHSTYLE_TRANSPARENT.
*/
wxDCBgModeChanger(wxDC& dc, int mode);

Expand Down

0 comments on commit e96155f

Please sign in to comment.