From 7610563f4ecca0c0a140ec96a60e15d5ee821e55 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 15 Sep 2002 13:08:05 +0000 Subject: updated to match new Texture and Color stuff --- util/Makefile.am | 5 +++-- util/bsetroot.cc | 17 +++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/util/Makefile.am b/util/Makefile.am index c5c4442..0997ad2 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -3,7 +3,8 @@ SUBDIRS = fbrun bin_SCRIPTS = bsetbg fluxbox-generate_menu bin_PROGRAMS = bsetroot bsetroot_SOURCES = bsetroot.cc bsetroot.hh -bsetroot_LDADD = ../src/BaseDisplay.o ../src/Timer.o ../src/Image.o ../src/i18n.o ../src/FbAtoms.o +bsetroot_LDADD = ../src/BaseDisplay.o ../src/Timer.o ../src/Image.o ../src/i18n.o ../src/FbAtoms.o \ + ../src/Color.o ../src/Texture.o ../src/StringUtil.o MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST=bsetbg @@ -12,5 +13,5 @@ distclean-local: rm -f *\~ bsetroot.o: bsetroot.cc ../config.h bsetroot.hh ../src/BaseDisplay.hh \ - ../src/Timer.hh ../src/Image.hh ../src/FbAtoms.hh + ../src/Timer.hh ../src/Image.hh ../src/FbAtoms.hh ../src/Color.hh ../src/Texture.hh diff --git a/util/bsetroot.cc b/util/bsetroot.cc index be7b69a..903efec 100644 --- a/util/bsetroot.cc +++ b/util/bsetroot.cc @@ -18,7 +18,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// $Id: bsetroot.cc,v 1.8 2002/08/18 09:47:03 fluxgen Exp $ +// $Id: bsetroot.cc,v 1.9 2002/09/15 13:08:05 fluxgen Exp $ #include "bsetroot.hh" @@ -214,7 +214,8 @@ void bsetroot::solid() { GC gc; XGCValues gcv; - img_ctrl[screen]->parseColor(&c, fore); + c.setFromString(fore, screen); + if (! c.isAllocated()) c.setPixel(BlackPixel(getXDisplay(), screen)); @@ -284,8 +285,8 @@ void bsetroot::modula(int x, int y) { getScreenInfo(screen)->getRootWindow(), 16, 16, getScreenInfo(screen)->getDepth()); - img_ctrl[screen]->parseColor(&f, fore); - img_ctrl[screen]->parseColor(&b, back); + f.setFromString(fore, screen); + b.setFromString(back, screen); if (! f.isAllocated()) f.setPixel(WhitePixel(getXDisplay(), screen)); @@ -342,10 +343,10 @@ void bsetroot::gradient(void) { GC gc; XGCValues gcv; - img_ctrl[screen]->parseTexture(&texture, grad); - img_ctrl[screen]->parseColor(&texture.color(), fore); - img_ctrl[screen]->parseColor(&texture.colorTo(), back); - + texture.setFromString(grad); + texture.color().setFromString(fore, screen); + texture.colorTo().setFromString(back, screen); + if (! texture.color().isAllocated()) texture.color().setPixel(WhitePixel(getXDisplay(), screen)); if (! texture.colorTo().isAllocated()) -- cgit v0.11.2