summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-03-22 20:56:15 (GMT)
committerfluxgen <fluxgen>2004-03-22 20:56:15 (GMT)
commit9991ce9ff431e242b300403a89ee05a91f855433 (patch)
treee39060db91730468b5e8fccc16fb6dba8b05014e
parent600c29b086ba5e814f9bc912980dbaea9cccce12 (diff)
downloadfluxbox_lack-9991ce9ff431e242b300403a89ee05a91f855433.zip
fluxbox_lack-9991ce9ff431e242b300403a89ee05a91f855433.tar.bz2
setLineAttributes, patch from Mathias Gumz
-rw-r--r--src/FbTk/GContext.hh16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/FbTk/GContext.hh b/src/FbTk/GContext.hh
index 6d71cd1..57a467e 100644
--- a/src/FbTk/GContext.hh
+++ b/src/FbTk/GContext.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: GContext.hh,v 1.8 2004/01/11 12:53:46 fluxgen Exp $ 22// $Id: GContext.hh,v 1.9 2004/03/22 20:56:15 fluxgen Exp $
23 23
24#ifndef FBTK_GCONTEXT_HH 24#ifndef FBTK_GCONTEXT_HH
25#define FBTK_GCONTEXT_HH 25#define FBTK_GCONTEXT_HH
@@ -37,6 +37,11 @@ class Font;
37/// wrapper for X GC 37/// wrapper for X GC
38class GContext { 38class GContext {
39public: 39public:
40
41 typedef enum JoinStyle { JOINMITER= JoinMiter, JOINROUND= JoinRound, JOINBEVEL= JoinBevel };
42 typedef enum LineStyle { LINESOLID= LineSolid, LINEONOFFDASH= LineOnOffDash, LINEDOUBLEDASH= LineDoubleDash };
43 typedef enum CapStyle { CAPNOTLAST= CapNotLast, CAPBUTT= CapButt, CAPROUND= CapRound, CAPPROJECTING= CapProjecting };
44
40 /// for FbTk drawable 45 /// for FbTk drawable
41 explicit GContext(const FbTk::FbDrawable &drawable); 46 explicit GContext(const FbTk::FbDrawable &drawable);
42 /// for X drawable 47 /// for X drawable
@@ -95,6 +100,15 @@ public:
95 XSetFillRule(m_display, m_gc, rule); 100 XSetFillRule(m_display, m_gc, rule);
96 } 101 }
97 102
103 inline void setLineAttributes(unsigned int width,
104 int line_style,
105 int cap_style,
106 int join_style) {
107
108 XSetLineAttributes(m_display, m_gc, width, line_style, cap_style, join_style);
109 }
110
111
98 void copy(GC gc); 112 void copy(GC gc);
99 void copy(const GContext &gc); 113 void copy(const GContext &gc);
100 inline GContext &operator = (const GContext &copy_gc) { copy(copy_gc); return *this; } 114 inline GContext &operator = (const GContext &copy_gc) { copy(copy_gc); return *this; }