Subject: Mulit Image Postscript Print
From: Andy Richardson (andy@promethium.chem.ucl.ac.uk)
Date: Tue Feb 15 2000 - 14:47:49 CST
Change:
cvs/abi/src/af/xap/unix/xap_UnixPSGraphics.cpp line 820 should read
// translate for quadrant 2, so Y values are negative; land us at
// lower left of image (baseline), which is twice the height
+ sprintf(buf, "%d %d translate\n", xDest, m_iRasterPosition - yDest -
iDestHeight);
- sprintf(buf, "%d %d translate\n", xDest, (yDest * -1) - iDestHeight);
m_ps->writeBytes(buf);
cvs/abi/src/af/xap/unix/xap_UnixPSGraphics.cpp line 890 should read
// translate for quadrant 2, so Y values are negative; land us at
// lower left of image (baseline), which is twice the height
+ sprintf(buf, "%d %d translate\n", xDest, m_iRasterPosition - yDest -
iDestHeight);
- sprintf(buf, "%d %d translate\n", (yDest * -1) - iDestHeight);
m_ps->writeBytes(buf);
cvs/abi/src/af/gr/xp/gr_Graphics.h at line 169 insert
virtual void setColor3D(GR_Color3D c) = 0;
virtual void fillRect(GR_Color3D c, UT_sint32 x, UT_sint32 y,
UT_sint32 w, UT_sint32 h) = 0;
virtual void fillRect(GR_Color3D c, UT_Rect &r) = 0;
+ // Postscript context positions graphics wrt top of current PAGE, NOT
+ // wrt top of document. The screen graphics engine, though positions
+ // graphics wrt the top of the document, therefore if we are printing
+ // page 5 we need to adjust the vertical position of the graphic in the
+ // postscript image printing routine by (current_page_number-1) *
page_height
+ // I'm going to call this variable m_iRasterPosition, for want of a
better name,
+ // it's not acutally a rasterposition --- any better names would be a
good idea,
+ // I jusy can't think of one right now.
+ UT_uint32 m_iRasterPosition;
protected:
virtual UT_uint32 _getResolution(void) const = 0;
cvs/abi/src/wp/ap/xp/ap_EditMethods.cpp line 3646 insert
{
for (j=1; (j <= nCopies); j++)
for (k=nFromPage; (k <= nToPage); k++)
{
+ // NB we will need a better way to calc
+ // pGraphics->m_iRasterPosition when
+ // iHeight is allowed to vary page to page
+ pGraphics->m_iRasterPosition = (k-1)*iHeight;
pGraphics->startPage(pDocName, k, UT_TRUE, iWidth, iHeight);
pPrintView->draw(k-1, &da);
}
cvs/abi/src/wp/ap/xp/ap_EditMethods.cpp line 3655 insert
for (k=nFromPage; (k <= nToPage); k++)
for (j=1; (j <= nCopies); j++)
{
+ // NB we will need a better way to calc
+ // pGraphics->m_iRasterPosition when
+ // iHeight is allowed to vary page to page
+ pGraphics->m_iRasterPosition = (k-1)*iHeight;
pGraphics->startPage(pDocName, k, UT_TRUE, iWidth, iHeight);
pPrintView->draw(k-1, &da);
}
--\\\|/// \\ - - // ( @ @ ) +---------------o00o----(_)----o00o-------------------------------------+ |Andy Richardson Dept. of Chemistry | |t(w): +44 171 380 (7465) University college London | |t(h): +44 181 352 (0848) Gordon street | |e: andy@promethium.chem.ucl.ac.uk London WC1E 6BT UK | +------------------------------0ooo-------------------------------------+ ooo0 ( ) ( ) ) / \ ( (_/ \_)
This archive was generated by hypermail 2b25 : Tue Feb 15 2000 - 14:41:47 CST