Wt: Wt::WBrush Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Related Functions
Wt::WBrush Class Reference
Painting system

A value class that defines the style for filling a path. More...

`#include <Wt/WBrush>`

List of all members.

## Public Member Functions
| WBrush ()
| Creates a brush.
| WBrush (BrushStyle style)
| Creates a black brush with given style.
| WBrush (const WColor &color)
| Creates a solid brush of a given color.
| WBrush (GlobalColor color)
| Creates a solid brush with a particular standard color.
bool | operator== (const WBrush &other) const
| Comparison operator.
bool | operator!= (const WBrush &other) const
| Comparison operator.
void | setStyle (BrushStyle style)
| Sets the brush style.
BrushStyle | style () const
| Returns the fill style.
void | setColor (const WColor &color)
| Sets the brush color.
const WColor & | color () const
| Returns the brush color.
## Related Functions
(Note that these are not member functions.)
enum | BrushStyle { NoBrush, SolidPattern }
| Enumeration that indicates a fill style. More...

## Detailed Description

A value class that defines the style for filling a path.

A brush defines the properties of how areas (the interior of shapes) are filled. A brush is defined using a color and a fill type (currently only solid fills are supported).

See also:
  WPainter::setBrush(), WPen

## Constructor & Destructor Documentation

Wt::WBrush::WBrush | ( |  | ) |

Creates a brush.

Creates a brush with a NoBrush fill style.

Wt::WBrush::WBrush | ( | BrushStyle | style | ) |

Creates a black brush with given style.

Creates a black brush with the indicated `style`.

Wt::WBrush::WBrush | ( | const WColor & | color | ) |

Creates a solid brush of a given color.

Creates a solid brush with the indicated `color`.

Wt::WBrush::WBrush | ( | GlobalColor | color | ) |

Creates a solid brush with a particular standard color.

Creates a solid brush with the indicated `color`.

## Member Function Documentation

const WColor& Wt::WBrush::color | ( |  | ) | const

Returns the brush color.

See also:
  color()

bool Wt::WBrush::operator!= | ( | const WBrush & | other | ) | const

Comparison operator.

Returns `true` if the brushes are different.

bool Wt::WBrush::operator== | ( | const WBrush & | other | ) | const

Comparison operator.

Returns `true` if the brushes are exactly the same.

void Wt::WBrush::setColor | ( | const WColor & | color | ) |

Sets the brush color.

See also:
  color()

void Wt::WBrush::setStyle | ( | BrushStyle | style | ) |

Sets the brush style.

See also:
  style()

BrushStyle Wt::WBrush::style | ( |  | ) | const

Returns the fill style.

See also:
  setStyle(BrushStyle)

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator