/usr/include/Wt/WBrush is in libwt-dev 3.3.3+dfsg-4.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef WBRUSH_H_
#define WBRUSH_H_
#include <Wt/WColor>
#include <Wt/WGradient>
namespace Wt {
/*! \class WBrush Wt/WBrush Wt/WBrush
* \brief 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 either as a solid color
* or a gradient.
*
* \sa WPainter::setBrush(), WPen
*
* \ingroup painting
*/
class WT_API WBrush
{
public:
/*! \brief Creates a brush.
*
* Creates a brush with a \link Wt::NoBrush NoBrush\endlink fill style.
*/
WBrush();
/*! \brief Creates a brush with the given style.
*/
WBrush(BrushStyle style);
/*! \brief Creates a solid brush of a given color.
*
* Creates a solid brush with the indicated \p color.
*/
WBrush(const WColor& color);
/*! \brief Creates a solid brush with a standard color.
*
* Creates a solid brush with the indicated \p color.
*/
WBrush(GlobalColor color);
/*! \brief Creates a gradient brush.
*/
WBrush(const WGradient& gradient);
#ifdef WT_TARGET_JAVA
/*! \brief Clone method.
*
* Clones this brush.
*/
WBrush clone() const;
#endif
/*! \brief Comparison operator.
*
* Returns \c true if the brushes are exactly the same.
*/
bool operator==(const WBrush& other) const;
/*! \brief Comparison operator.
*
* Returns \c true if the brushes are different.
*/
bool operator!=(const WBrush& other) const;
/*! \brief Sets the brush style.
*
* \sa style()
*/
void setStyle(BrushStyle style);
/*! \brief Returns the fill style.
*
* \sa setStyle(BrushStyle)
*/
BrushStyle style() const { return style_; }
/*! \brief Sets the brush color.
*
* If the current style is a gradient style, then it is reset to
* \link Wt::SolidPattern SolidPattern\endlink.
*
* \sa color()
*/
void setColor(const WColor& color);
/*! \brief Returns the brush color.
*
* \sa color()
*/
const WColor& color() const { return color_; }
/*! \brief Sets the brush gradient.
*
* This also sets the style to
* \link Wt::GradientPattern GradientPattern\endlink.
*/
void setGradient(const WGradient& gradient);
/*! \brief Returns the brush gradient.
*/
const WGradient& gradient() const { return gradient_; }
private:
BrushStyle style_;
WColor color_;
WGradient gradient_;
};
}
#endif // WBRUSH_H_
|