no graphics exposure by default
This commit is contained in:
parent
dd0aad54c0
commit
6d9afb8453
2 changed files with 23 additions and 5 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: GContext.cc,v 1.1 2003/08/27 13:45:11 fluxgen Exp $
|
||||
// $Id: GContext.cc,v 1.2 2003/09/10 21:27:02 fluxgen Exp $
|
||||
|
||||
#include "GContext.hh"
|
||||
|
||||
|
@ -35,12 +35,14 @@ GContext::GContext(const FbTk::FbDrawable &drawable):
|
|||
m_gc(XCreateGC(FbTk::App::instance()->display(),
|
||||
drawable.drawable(),
|
||||
0, 0)) {
|
||||
setGraphicsExposure(false);
|
||||
}
|
||||
|
||||
GContext::GContext(Drawable drawable):
|
||||
m_gc(XCreateGC(FbTk::App::instance()->display(),
|
||||
drawable,
|
||||
0, 0)) {
|
||||
setGraphicsExposure(false);
|
||||
}
|
||||
|
||||
GContext::~GContext() {
|
||||
|
@ -49,13 +51,21 @@ GContext::~GContext() {
|
|||
}
|
||||
|
||||
void GContext::setForeground(const FbTk::Color &color) {
|
||||
setForeground(color.pixel());
|
||||
}
|
||||
|
||||
void GContext::setForeground(long pixel_value) {
|
||||
XSetForeground(FbTk::App::instance()->display(), m_gc,
|
||||
color.pixel());
|
||||
pixel_value);
|
||||
}
|
||||
|
||||
void GContext::setBackground(const FbTk::Color &color) {
|
||||
setBackground(color.pixel());
|
||||
}
|
||||
|
||||
void GContext::setBackground(long pixel_value) {
|
||||
XSetBackground(FbTk::App::instance()->display(), m_gc,
|
||||
color.pixel());
|
||||
pixel_value);
|
||||
}
|
||||
|
||||
/// not implemented!
|
||||
|
@ -73,4 +83,9 @@ void GContext::setClipOrigin(int x, int y) {
|
|||
x, y);
|
||||
}
|
||||
|
||||
void GContext::setGraphicsExposure(bool flag) {
|
||||
XSetGraphicsExposures(FbTk::App::instance()->display(), m_gc,
|
||||
flag);
|
||||
}
|
||||
|
||||
} // end namespace FbTk
|
||||
|
|
|
@ -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.1 2003/08/27 13:45:11 fluxgen Exp $
|
||||
// $Id: GContext.hh,v 1.2 2003/09/10 21:27:02 fluxgen Exp $
|
||||
|
||||
#ifndef FBTK_GCONTEXT_HH
|
||||
#define FBTK_GCONTEXT_HH
|
||||
|
@ -44,11 +44,14 @@ public:
|
|||
virtual ~GContext();
|
||||
|
||||
void setForeground(const FbTk::Color &color);
|
||||
void setForeground(long pixel_value);
|
||||
void setBackground(const FbTk::Color &color);
|
||||
void setBackground(long pixel_value);
|
||||
void setFont(const FbTk::Font &font);
|
||||
void setClipMask(const FbTk::FbPixmap &pm);
|
||||
void setClipOrigin(int x, int y);
|
||||
|
||||
void setGraphicsExposure(bool value);
|
||||
|
||||
GC gc() const { return m_gc; }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue