aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/GContext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/GContext.cc')
-rw-r--r--src/FbTk/GContext.cc26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/FbTk/GContext.cc b/src/FbTk/GContext.cc
index 6b41726..e0f66a4 100644
--- a/src/FbTk/GContext.cc
+++ b/src/FbTk/GContext.cc
@@ -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.cc,v 1.4 2003/10/09 16:48:09 rathnor Exp $ 22// $Id: GContext.cc,v 1.5 2003/11/28 22:50:55 fluxgen Exp $
23 23
24#include "GContext.hh" 24#include "GContext.hh"
25 25
@@ -43,9 +43,17 @@ GContext::GContext(Drawable drawable):
43 m_display(FbTk::App::instance()->display()), 43 m_display(FbTk::App::instance()->display()),
44 m_gc(XCreateGC(m_display, 44 m_gc(XCreateGC(m_display,
45 drawable, 45 drawable,
46 0, 0)) 46 0, 0)) {
47{ 47 setGraphicsExposure(false);
48}
49
50GContext::GContext(Drawable d, const GContext &gc):
51 m_display(FbTk::App::instance()->display()),
52 m_gc(XCreateGC(m_display,
53 d,
54 0, 0)) {
48 setGraphicsExposure(false); 55 setGraphicsExposure(false);
56 copy(gc);
49} 57}
50 58
51GContext::~GContext() { 59GContext::~GContext() {
@@ -57,5 +65,17 @@ GContext::~GContext() {
57//void GContext::setFont(const FbTk::Font &font) { 65//void GContext::setFont(const FbTk::Font &font) {
58 //!! TODO 66 //!! TODO
59//} 67//}
68void GContext::copy(GC gc) {
69 // copy gc with mask: all
70 XCopyGC(m_display, gc, ~0, m_gc);
71}
72
73void GContext::copy(const GContext &gc) {
74 // copy X gc
75 copy(gc.gc());
76
77 //!! TODO: copy our extended gcontext
78
79}
60 80
61} // end namespace FbTk 81} // end namespace FbTk