fixed minor bug
This commit is contained in:
parent
5bb98e0875
commit
c213fb6ca2
2 changed files with 13 additions and 9 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: FbPixmap.cc,v 1.11 2004/07/05 23:51:57 fluxgen Exp $
|
// $Id: FbPixmap.cc,v 1.12 2004/07/06 10:47:36 fluxgen Exp $
|
||||||
|
|
||||||
#include "FbPixmap.hh"
|
#include "FbPixmap.hh"
|
||||||
#include "App.hh"
|
#include "App.hh"
|
||||||
|
@ -253,19 +253,19 @@ void FbPixmap::tile(unsigned int dest_width, unsigned int dest_height) {
|
||||||
(dest_width == width() && dest_height == height()))
|
(dest_width == width() && dest_height == height()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Display *dpy = FbTk::App::instance()->display();
|
|
||||||
|
|
||||||
FbPixmap new_pm(drawable(), width(), height(), depth());
|
FbPixmap new_pm(drawable(), width(), height(), depth());
|
||||||
|
|
||||||
new_pm.copy(m_pm);
|
new_pm.copy(m_pm);
|
||||||
|
|
||||||
resize(dest_width,dest_height);
|
resize(dest_width, dest_height);
|
||||||
|
|
||||||
GC gc = XCreateGC(dpy, drawable(), 0, NULL);
|
FbTk::GContext gc(*this);
|
||||||
|
|
||||||
|
gc.setTile(new_pm);
|
||||||
|
gc.setFillStyle(FillTiled);
|
||||||
|
|
||||||
XSetTile(dpy,gc,new_pm.release());
|
fillRectangle(gc.gc(), 0, 0, dest_width, dest_height);
|
||||||
XSetFillStyle(dpy, gc, FillTiled);
|
|
||||||
XFillRectangle(dpy,drawable(),gc, 0, 0, dest_width, dest_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: GContext.hh,v 1.9 2004/03/22 20:56:15 fluxgen Exp $
|
// $Id: GContext.hh,v 1.10 2004/07/06 10:47:36 fluxgen Exp $
|
||||||
|
|
||||||
#ifndef FBTK_GCONTEXT_HH
|
#ifndef FBTK_GCONTEXT_HH
|
||||||
#define FBTK_GCONTEXT_HH
|
#define FBTK_GCONTEXT_HH
|
||||||
|
@ -66,6 +66,10 @@ public:
|
||||||
XSetBackground(m_display, m_gc, pixel_value);
|
XSetBackground(m_display, m_gc, pixel_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void setTile(const FbTk::FbPixmap &draw) {
|
||||||
|
XSetTile(m_display, m_gc, draw.drawable());
|
||||||
|
}
|
||||||
|
|
||||||
/// not implemented
|
/// not implemented
|
||||||
inline void setFont(const FbTk::Font &) {}
|
inline void setFont(const FbTk::Font &) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue