Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Corretta conversione coordinate di clipping. Toglieva un pixel in basso destra ad ogni iterazione! git-svn-id: svn://10.65.10.50/trunk@19939 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0b89a851d9
commit
897b6eeff6
@ -143,7 +143,7 @@ void xvt_app_create(int argc, char** argv, unsigned long WXUNUSED(flags),
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef __WXMSW__
|
||||
style |= wxMAXIMIZE;
|
||||
#else
|
||||
style &= ~wxMAXIMIZE;
|
||||
@ -2398,7 +2398,7 @@ BOOLEAN xvt_rect_intersect(RCT *drctp, const RCT *rctp1, const RCT *rctp2)
|
||||
drctp->bottom = min(rect1.GetBottom(), rect2.GetBottom())+1;
|
||||
*/
|
||||
const wxRect rect0 = rect1.Intersect(rect2);
|
||||
xvt_rect_set(drctp, rect0.x, rect0.y, rect0.GetRight(), rect0.GetBottom());
|
||||
NormalizeRect(rect0, drctp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3819,7 +3819,7 @@ RCT* xvt_vobj_get_outer_rect(WINDOW win, RCT *rctp)
|
||||
{
|
||||
CAST_WIN(win, w);
|
||||
const wxRect rct = w.GetRect();
|
||||
xvt_rect_set(rctp, rct.x, rct.y, rct.GetRight(), rct.GetBottom());
|
||||
NormalizeRect(rct, rctp);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -33,6 +33,14 @@ wxRect NormalizeRCT(const RCT* prct)
|
||||
return rct;
|
||||
}
|
||||
|
||||
bool NormalizeRect(const wxRect& r, RCT* rct)
|
||||
{
|
||||
const bool ok = rct != NULL;
|
||||
if (ok)
|
||||
xvt_rect_set(rct, r.x, r.y, r.GetRight()+1, r.GetBottom()+1);
|
||||
return ok;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Caret emulation
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -367,8 +375,7 @@ void TDC::SetClippingBox(const RCT* pRct)
|
||||
if (pRct != NULL)
|
||||
{
|
||||
const wxRect rct = NormalizeRCT(pRct);
|
||||
_clip.left = rct.x; _clip.top = rct.y;
|
||||
_clip.right = rct.GetRight(); _clip.bottom = rct.GetBottom();
|
||||
NormalizeRect(rct, &_clip);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -745,11 +752,7 @@ void TwxWindow::OnPaint(wxPaintEvent& WXUNUSED(evt))
|
||||
const wxRect rctDamaged = GetUpdateRegion().GetBox();
|
||||
|
||||
XVT_EVENT e(E_UPDATE);
|
||||
RCT& rct = e.v.update.rct;
|
||||
rct.left = rctDamaged.x;
|
||||
rct.top = rctDamaged.y;
|
||||
rct.right = rctDamaged.GetRight()+1;
|
||||
rct.bottom = rctDamaged.GetBottom()+1;
|
||||
NormalizeRect(rctDamaged, &e.v.update.rct);
|
||||
|
||||
TDC& tdc = GetTDCMapper().GetTDC((WINDOW)this);
|
||||
tdc.GetDC(true); // Forza la creazione di un wxPaintDC
|
||||
@ -1022,13 +1025,8 @@ void TTaskWin::OnPaint(wxPaintEvent& WXUNUSED(evt))
|
||||
const wxRect rctDamaged = GetUpdateRegion().GetBox();
|
||||
|
||||
XVT_EVENT e(E_UPDATE);
|
||||
RCT& rct = e.v.update.rct;
|
||||
rct.left = rctDamaged.x;
|
||||
rct.top = rctDamaged.y;
|
||||
rct.right = rctDamaged.GetRight();
|
||||
rct.bottom = rctDamaged.GetBottom();
|
||||
xvt_rect_inflate(&rct, 1, 1);
|
||||
|
||||
NormalizeRect(rctDamaged, &e.v.update.rct);
|
||||
|
||||
TDC& dc = GetTDCMapper().GetTDC((WINDOW)this);
|
||||
dc.GetDC(true); // Forza la creazione di un wxPaintDC
|
||||
_task_win_handler((WINDOW)this, &e);
|
||||
|
@ -240,6 +240,7 @@ const wxString& _GetAppTitle();
|
||||
#define CAST_COLOR(xc, wc) wxColour wc((xc>>16)&0xFF, (xc>>8)&0xFF, xc&0xFF)
|
||||
#define MAKE_XVT_COLOR(wc) XVT_MAKE_COLOR(wc.Red(), wc.Green(), wc.Blue())
|
||||
wxRect NormalizeRCT(const RCT* prct);
|
||||
bool NormalizeRect(const wxRect& rect, RCT* rct);
|
||||
|
||||
#ifdef XVTWIN_CPP
|
||||
#define extern
|
||||
|
Loading…
x
Reference in New Issue
Block a user