Hi, I'm trying to understand the scaling code in VNC, I'm trying to change it
so I can understand it, I'm doing the adjustement in the DoBlit function with
this code:
if (m_opts.m_scaling)
{
/*************************************************************************
**/
float n = m_opts->m_Numerator;
float d = m_opts->m_Denominator;
float right = ps.rcPaint.right;
float left = ps.rcPaint.left;
float top = ps.rcPaint.top;
float bottom = ps.rcPaint.bottom;
float fnewright = right * (d/n);
float fnewleft = left * (d/n);
float fnewtop = top * (d/n);
float fnewbottom = bottom * (d/n);
int inewright = fnewright;
int inewleft = fnewleft;
int inewtop = fnewtop;
int inewbottom = fnewbottom;
// This is supposed to give better results. I think my driver ignores it?
SetStretchBltMode(hdc,HALFTONE);//STRETCH_DELETESCANS
// The docs say that you should call SetBrushOrgEx after SetStretchBltMode,
// but not what the arguments should be.
SetBrushOrgEx(hdc, 0,0, NULL);
if (!StretchBlt
(
hdc,
ps.rcPaint.left,
ps.rcPaint.top,
ps.rcPaint.right-ps.rcPaint.left,
ps.rcPaint.bottom-ps.rcPaint.top,
m_hBitmapDC,
inewleft,
inewtop,
inewright-inewleft,
inewbottom-inewtop,
SRCCOPY)
)
{
MessageBox(m_hwnd,"!StretchBlt","DoBlit",MB_ICONERROR);
}
To see the changes of my remote PC, I have to move the mouse over the region
that is supposed to be updated. I'm passing the updated screen without
transforming the coordinates in ReadScreenUpdate. If I minimize the window and
maximize it again, it shows me the updated screen. Any idea why this is
hapenning? Tnx
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list