summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-05 20:42:47 (GMT)
committerfluxgen <fluxgen>2003-09-05 20:42:47 (GMT)
commit215bfdd38dd9a1f139edb335f70e33abcf335ace (patch)
treeba4cb43f36b1e623e3b370a0d7983839e69c2339 /src
parenta8e70c3e25ba93fd16c9129fc38927cb55565e94 (diff)
downloadfluxbox_lack-215bfdd38dd9a1f139edb335f70e33abcf335ace.zip
fluxbox_lack-215bfdd38dd9a1f139edb335f70e33abcf335ace.tar.bz2
using FbTk GContext
Diffstat (limited to 'src')
-rw-r--r--src/Shape.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Shape.cc b/src/Shape.cc
index efc47fd..a7457f9 100644
--- a/src/Shape.cc
+++ b/src/Shape.cc
@@ -19,11 +19,12 @@
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: Shape.cc,v 1.4 2003/08/24 15:37:12 fluxgen Exp $ 22// $Id: Shape.cc,v 1.5 2003/09/05 20:42:47 fluxgen Exp $
23 23
24#include "Shape.hh" 24#include "Shape.hh"
25#include "FbWindow.hh" 25#include "FbTk/FbWindow.hh"
26#include "App.hh" 26#include "FbTk/App.hh"
27#include "FbTk/GContext.hh"
27 28
28#include <cstring> 29#include <cstring>
29 30
@@ -110,18 +111,14 @@ Pixmap createShape(FbTk::FbWindow &win, int place) {
110 XPutPixel(ximage, 0, y, 1); 111 XPutPixel(ximage, 0, y, 1);
111 } 112 }
112 113
113 XGCValues values; 114
114 values.foreground = 1;
115 values.background = 0;
116 Pixmap pm = XCreatePixmap(disp, win.window(), win_width, win_height, 1); 115 Pixmap pm = XCreatePixmap(disp, win.window(), win_width, win_height, 1);
117 GC gc = XCreateGC(disp, pm,
118 GCForeground | GCBackground, &values);
119 116
117 FbTk::GContext gc(pm);
120 118
121 XPutImage(disp, pm, gc, ximage, 0, 0, 0, 0, 119 XPutImage(disp, pm, gc.gc(), ximage, 0, 0, 0, 0,
122 win_width, win_height); 120 win_width, win_height);
123 121
124 XFreeGC(disp, gc);
125 XDestroyImage(ximage); 122 XDestroyImage(ximage);
126 123
127 return pm; 124 return pm;