summaryrefslogtreecommitdiffstats
path: root/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp')
-rw-r--r--kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp
index f384ce97..acba10f2 100644
--- a/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp
+++ b/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp
@@ -91,7 +91,7 @@ namespace DJVU {
//// DJVUIMAGE: CONSTRUCTION
DjVuImage::DjVuImage(void)
-: rotate_count(-1),relayout_sent(false)
+: rotate_count(-1),retqlayout_sent(false)
{
}
@@ -423,13 +423,13 @@ DjVuImage::get_long_description() const
void
DjVuImage::notify_chunk_done(const DjVuPort *, const GUTF8String & name)
{
- if (!relayout_sent &&
+ if (!retqlayout_sent &&
( !name.cmp("INFO", 4) ||
!name.cmp("PMxx", 2) ||
!name.cmp("BMxx", 2) ) )
{
- DjVuPort::get_portcaster()->notify_relayout(this);
- relayout_sent=true;
+ DjVuPort::get_portcaster()->notify_retqlayout(this);
+ retqlayout_sent=true;
}
else if (!name.cmp("Sxxx", 1) ||
!name.cmp("BGxx", 2) ||
@@ -461,7 +461,7 @@ public:
GP<DataPool> request_data(const DjVuPort *src, const GURL & url);
void notify_chunk_done(const DjVuPort *, const GUTF8String &name);
void notify_redisplay(const class DjVuImage * source);
- void notify_relayout(const class DjVuImage * source);
+ void notify_retqlayout(const class DjVuImage * source);
};
DjVuImageNotifier::DjVuImageNotifier(DjVuInterface *notifier)
@@ -485,10 +485,10 @@ DjVuImageNotifier::notify_redisplay(const class DjVuImage * source)
}
void
-DjVuImageNotifier::notify_relayout(const class DjVuImage * source)
+DjVuImageNotifier::notify_retqlayout(const class DjVuImage * source)
{
if (notifier)
- notifier->notify_relayout();
+ notifier->notify_retqlayout();
}
void
@@ -848,17 +848,17 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect,
for (int blitno = 0; blitno < jimg->get_blit_count(); blitno++)
{
const JB2Blit *pblit = jimg->get_blit(blitno);
- const JB2Shape &pshape = jimg->get_shape(pblit->shapeno);
- if (pshape.bits &&
+ const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno);
+ if (ptqshape.bits &&
pblit->left <= rect.xmax * subsample &&
pblit->bottom <= rect.ymax * subsample &&
- pblit->left + (int)pshape.bits->columns() >= rect.xmin * subsample &&
- pblit->bottom + (int)pshape.bits->rows() >= rect.ymin * subsample )
+ pblit->left + (int)ptqshape.bits->columns() >= rect.xmin * subsample &&
+ pblit->bottom + (int)ptqshape.bits->rows() >= rect.ymin * subsample )
{
// Record component list
if (fgbc) components.append(blitno);
// Blit
- bm->blit(pshape.bits,
+ bm->blit(ptqshape.bits,
pblit->left - rxmin, pblit->bottom - rymin,
subsample);
}
@@ -902,9 +902,9 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect,
lastx = pblit->left;
if (fg->colordata[blitno] == colorindex)
{
- const JB2Shape &pshape = jimg->get_shape(pblit->shapeno);
+ const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno);
GRect rect(pblit->left, pblit->bottom,
- pshape.bits->columns(), pshape.bits->rows());
+ ptqshape.bits->columns(), ptqshape.bits->rows());
comprect.recthull(comprect, rect);
compset.insert_before(nullpos, components, pos);
continue;
@@ -927,8 +927,8 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect,
{
int blitno = compset[pos];
const JB2Blit *pblit = jimg->get_blit(blitno);
- const JB2Shape &pshape = jimg->get_shape(pblit->shapeno);
- bm->blit(pshape.bits,
+ const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno);
+ bm->blit(ptqshape.bits,
pblit->left - rxmin, pblit->bottom - rymin,
subsample);
}
@@ -1085,8 +1085,8 @@ do_bitmap(const DjVuImage &dimg, BImager get,
///* rotate code ends
// Sanity
- if (! ( all.contains(rect.xmin, rect.ymin) &&
- all.contains(rect.xmax-1, rect.ymax-1) ))
+ if (! ( all.tqcontains(rect.xmin, rect.ymin) &&
+ all.tqcontains(rect.xmax-1, rect.ymax-1) ))
G_THROW( ERR_MSG("DjVuImage.bad_rect") );
// Check for integral reduction
int red;
@@ -1151,8 +1151,8 @@ do_pixmap(const DjVuImage &dimg, PImager get,
///* rotate code ends
// Sanity
- if (! ( all.contains(rect.xmin, rect.ymin) &&
- all.contains(rect.xmax-1, rect.ymax-1) ))
+ if (! ( all.tqcontains(rect.xmin, rect.ymin) &&
+ all.tqcontains(rect.xmax-1, rect.ymax-1) ))
G_THROW( ERR_MSG("DjVuImage.bad_rect2") );
// Check for integral reduction
int red, w=0, h=0, rw=0, rh=0;