setLineAttributes, patch from Mathias Gumz

This commit is contained in:
fluxgen 2004-03-22 20:56:15 +00:00
parent 600c29b086
commit 9991ce9ff4

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: GContext.hh,v 1.8 2004/01/11 12:53:46 fluxgen Exp $
// $Id: GContext.hh,v 1.9 2004/03/22 20:56:15 fluxgen Exp $
#ifndef FBTK_GCONTEXT_HH
#define FBTK_GCONTEXT_HH
@ -37,6 +37,11 @@ class Font;
/// wrapper for X GC
class GContext {
public:
typedef enum JoinStyle { JOINMITER= JoinMiter, JOINROUND= JoinRound, JOINBEVEL= JoinBevel };
typedef enum LineStyle { LINESOLID= LineSolid, LINEONOFFDASH= LineOnOffDash, LINEDOUBLEDASH= LineDoubleDash };
typedef enum CapStyle { CAPNOTLAST= CapNotLast, CAPBUTT= CapButt, CAPROUND= CapRound, CAPPROJECTING= CapProjecting };
/// for FbTk drawable
explicit GContext(const FbTk::FbDrawable &drawable);
/// for X drawable
@ -95,6 +100,15 @@ public:
XSetFillRule(m_display, m_gc, rule);
}
inline void setLineAttributes(unsigned int width,
int line_style,
int cap_style,
int join_style) {
XSetLineAttributes(m_display, m_gc, width, line_style, cap_style, join_style);
}
void copy(GC gc);
void copy(const GContext &gc);
inline GContext &operator = (const GContext &copy_gc) { copy(copy_gc); return *this; }