git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improve ber progressbar value faking
[enigma2.git]
/
lib
/
gdi
/
grc.cpp
diff --git
a/lib/gdi/grc.cpp
b/lib/gdi/grc.cpp
index 55d266c0359b2a59dbbffc0b094e3e1e5d95bc47..f54f1604ca1d5b352f8ebe05c2abd208737bcda4 100644
(file)
--- a/
lib/gdi/grc.cpp
+++ b/
lib/gdi/grc.cpp
@@
-1,5
+1,5
@@
// for debugging use:
// for debugging use:
-
//
#define SYNC_PAINT
+ #define SYNC_PAINT
#include <unistd.h>
#ifndef SYNC_PAINT
#include <pthread.h>
#include <unistd.h>
#ifndef SYNC_PAINT
#include <pthread.h>
@@
-227,6
+227,8
@@
void gPainter::blit(gPixmap *pixmap, ePoint pos, const eRect &clip, int flags)
{
gOpcode o;
{
gOpcode o;
+ ASSERT(pixmap);
+
o.opcode=gOpcode::blit;
o.dc = m_dc.grabRef();
pixmap->AddRef();
o.opcode=gOpcode::blit;
o.dc = m_dc.grabRef();
pixmap->AddRef();
@@
-442,7
+444,9
@@
void gDC::exec(gOpcode *o)
if (o->parm.renderText->flags & gPainter::RT_VALIGN_CENTER)
{
eRect bbox = para->getBoundBox();
if (o->parm.renderText->flags & gPainter::RT_VALIGN_CENTER)
{
eRect bbox = para->getBoundBox();
- offset += ePoint(0, (o->parm.renderText->area.height() - bbox.height()) / 2);
+ int vcentered_top = (o->parm.renderText->area.height() - bbox.height()) / 2;
+ int correction = vcentered_top - bbox.top();
+ offset += ePoint(0, correction);
}
para->blit(*this, offset, getRGB(m_background_color), getRGB(m_foreground_color));
delete o->parm.renderText;
}
para->blit(*this, offset, getRGB(m_background_color), getRGB(m_foreground_color));
delete o->parm.renderText;