[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    bitBlt - what's the secret ?
From:       Thorsten Westheider <twesthei () phya1 ! physik ! uni-bielefeld ! de>
Date:       1998-02-06 20:17:04
[Download RAW message or body]

Greetings,

just coding some graphics stuff for kISDN that I want to
be flicker-free updated. The problem starts with constructing
the object,

ScanMeter::ScanMeter(QWidget *parent, const char *name):QWidget(parent, name)
{  
  setFixedSize(280, 110);

  QPixmap Temp(280, 110);
  Temp.fill(QColor::QColor(black));

  bitBlt(this, 0, 0, &Temp);
  ...
}	

My intention is clear, I'd like to display a black area of
280x110 pixels -- when constructor is called, nothing happens :-(

Same with updating (on a signal from another object),

void ScanMeter::slotDrawScanLine(void)
{
  QPixmap Temp(280, 110);
  bitBlt(&Temp, 0, 0, this, 1, 0, 279, 110, CopyROP);
  
  QPainter p;
  p.begin(&Temp);
  p.setPen(QColor::QColor(green));
  p.drawLine(279, 109-dummy1, 279, 109-dummy2);
  ...
  p.end();
  bitBlt(this, 2, 2, &Temp, 0, 0, 280, 110, CopyROP);
}

Well, the problem can be solved if ScanMeter inherits
QLabel (using setPixmap(...)), but in that case the
display starts to flicker.
Apologies in advance for this (simple?) question, but at
the moment I'm stuck ;-)


	cu
	  Thorsten
	
===========================================================
Thorsten Westheider                 / /  (_)__  __ ____  __    
Im Schlingen 15                    / /__/ / _ \/ // /\ \/ /   
32120 Hiddenhausen -- Germany     /____/_/_//_/\_,_/ /_/\_\ 
					             2.0.33
http://www.physik.uni-bielefeld.de/~twesthei						     
mailto:twesthei@phya1.physik.uni-bielefeld.de 
===========================================================

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic