Patch level : 4.0 858
Files correlati : ba8.exe ve1.exe Ricompilazione Demo : [ ] Commento : RIpristinato setClippingbox di default a 32000 era stato porato a 4096 che va vbeb solo per le anteprime a video (sbagliava la stampa dei documenti) git-svn-id: svn://10.65.10.50/trunk@16037 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d7a4ae7d6f
commit
7817e9135f
@ -12,6 +12,7 @@
|
|||||||
#include <statbar.h>
|
#include <statbar.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
#include <xvtility.h>
|
||||||
|
|
||||||
#include <bagn003.h>
|
#include <bagn003.h>
|
||||||
|
|
||||||
@ -94,28 +95,34 @@ void advanced_draw_text_line(TWindow& win, const char* text, const RCT& r, char
|
|||||||
case 'T': y = r.top + leading + ascent; break;
|
case 'T': y = r.top + leading + ascent; break;
|
||||||
default : y -= descent; break;
|
default : y -= descent; break;
|
||||||
}
|
}
|
||||||
|
bool can_draw = true;
|
||||||
RCT orig; xvt_dwin_get_clip(w, &orig);
|
RCT orig; xvt_dwin_get_clip(w, &orig);
|
||||||
const bool restore_clip = !xvt_rect_is_empty(&orig);
|
bool restore_clip = !xvt_rect_is_empty(&orig);
|
||||||
if (restore_clip)
|
|
||||||
|
if (restore_clip)
|
||||||
{
|
{
|
||||||
RCT clipper;
|
RCT clipper;
|
||||||
xvt_rect_intersect(&clipper, &orig, (RCT*)&r);
|
can_draw = xvt_rect_intersect(&clipper, &orig, (RCT*)&r);
|
||||||
xvt_dwin_set_clip(w, (RCT*)&clipper);
|
if (can_draw)
|
||||||
|
xvt_dwin_set_clip(w, (RCT*)&clipper);
|
||||||
|
else
|
||||||
|
restore_clip = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xvt_dwin_set_clip(w, (RCT*)&r);
|
xvt_dwin_set_clip(w, (RCT*)&r);
|
||||||
|
|
||||||
if (halign == 'J')
|
if (can_draw)
|
||||||
advanced_draw_justified_text_line(win, text, x, y, dx);
|
{
|
||||||
else
|
if (halign == 'J')
|
||||||
xvt_dwin_draw_text(w, x, y, text, -1);
|
advanced_draw_justified_text_line(win, text, x, y, dx);
|
||||||
|
else
|
||||||
|
xvt_dwin_draw_text(w, x, y, text, -1);
|
||||||
|
if (restore_clip)
|
||||||
|
xvt_dwin_set_clip(w, &orig);
|
||||||
|
// else
|
||||||
|
// xvt_dwin_set_clip(w, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (restore_clip)
|
|
||||||
xvt_dwin_set_clip(w, &orig);
|
|
||||||
else
|
|
||||||
xvt_dwin_set_clip(w, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool finisce_per_punto(const TString& str)
|
bool finisce_per_punto(const TString& str)
|
||||||
@ -741,6 +748,7 @@ TPreview_mask::TPreview_mask(TBook* book) : _book(book)
|
|||||||
class TWindow_printer : public TWindow
|
class TWindow_printer : public TWindow
|
||||||
{
|
{
|
||||||
long _pvr, _phr;
|
long _pvr, _phr;
|
||||||
|
long _ph, _pw;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool is_ok() const { return win() != NULL_WIN; }
|
bool is_ok() const { return win() != NULL_WIN; }
|
||||||
@ -760,6 +768,12 @@ PNT TWindow_printer::log2dev(long x, long y) const
|
|||||||
PNT ptdev;
|
PNT ptdev;
|
||||||
ptdev.h = short((x * _phr) / BOOKDPI);
|
ptdev.h = short((x * _phr) / BOOKDPI);
|
||||||
ptdev.v = short((y * _pvr) / BOOKDPI);
|
ptdev.v = short((y * _pvr) / BOOKDPI);
|
||||||
|
#ifdef DBG
|
||||||
|
if(ptdev.h < 0 || ptdev.h >= _pw)
|
||||||
|
xvtil_statbar_set("Coordinata X errata");
|
||||||
|
if(ptdev.v < 0 || ptdev.v >= _ph)
|
||||||
|
xvtil_statbar_set("Coordinata Y errata");
|
||||||
|
#endif
|
||||||
return ptdev;
|
return ptdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -780,12 +794,11 @@ bool TWindow_printer::print_doc(const TFilename& name)
|
|||||||
|
|
||||||
TWindow_printer::TWindow_printer(PRINT_RCD* rcd, const char* title)
|
TWindow_printer::TWindow_printer(PRINT_RCD* rcd, const char* title)
|
||||||
{
|
{
|
||||||
long ph, pw;
|
|
||||||
WINDOW prwin = xvt_print_create_win(rcd, title);
|
WINDOW prwin = xvt_print_create_win(rcd, title);
|
||||||
|
|
||||||
set_win(prwin);
|
set_win(prwin);
|
||||||
_pixmap = true;
|
_pixmap = true;
|
||||||
xvt_app_escape (XVT_ESC_GET_PRINTER_INFO, rcd, &ph, &pw, &_pvr, &_phr);
|
xvt_app_escape (XVT_ESC_GET_PRINTER_INFO, rcd, &_ph, &_pw, &_pvr, &_phr);
|
||||||
}
|
}
|
||||||
|
|
||||||
TWindow_printer::~TWindow_printer()
|
TWindow_printer::~TWindow_printer()
|
||||||
|
@ -2690,6 +2690,14 @@ BOOLEAN xvt_rect_intersect(RCT *drctp, RCT *rctp1, RCT *rctp2)
|
|||||||
drctp->right = min(rect1.GetRight(), rect2.GetRight())+1;
|
drctp->right = min(rect1.GetRight(), rect2.GetRight())+1;
|
||||||
drctp->bottom = min(rect1.GetBottom(), rect2.GetBottom())+1;
|
drctp->bottom = min(rect1.GetBottom(), rect2.GetBottom())+1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (drctp)
|
||||||
|
{
|
||||||
|
drctp->left = drctp->right = rect1.x;
|
||||||
|
drctp->top = drctp->bottom = rect1.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
return yes;
|
return yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ void TDC::SetClippingBox(const RCT* pRct)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_clip.left = _clip.top = 0;
|
_clip.left = _clip.top = 0;
|
||||||
_clip.right = _clip.bottom = 4096;
|
_clip.right = _clip.bottom = 32000; // 32000 serve per i TDC di stampa (aumentare quando possibile) per il video basterebbe 4096
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user