[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Problems using bitBlt
From: Daniel <dadecal () teleline ! es>
Date: 2000-03-08 14:12:14
[Download RAW message or body]
I use a bitBlt inside a paintEvent to show a QPixmap buffer in to which
I draw, but nothing is shown on the view.
Could somebody please check the code to see what's wrong?
Thank's a lot for your help
Daniel de losReyes
dadecal@arq.upv.es
bool KonStructDoc::importDxf(const char *filename, const char *format
/*=0*/)
{
QFileInfo fileInfo(filename);
title=fileInfo.fileName();
absFilePath=fileInfo.absFilePath();
QFile importfile(filename);
if (importfile.open(IO_ReadOnly)){
evaluateDxfFile(importfile);
importfile.close();
size=QSize(300,300);
buffer.resize(size);
buffer.fill(black);
QPainter paint;
paint.begin(&buffer);
paint.scale(1,-1);
paint.translate(0,-300);
paint.setPen(blue);
paint.setWindow(0,0,300,300);
KonElement *el;
for (el=element->first();el !=0; el=element->next())
el->draw(paint);
paint.end();
return true;
}
else return false;
}
void KonGraphic::paintEvent(QPaintEvent *e){
QFrame::paintEvent(e);
QRect r = e->rect();
bitBlt(this,r.x(),r.y(),&getDocument()->buffer,r.x(),r.y(),r.width(),r.height());
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic