|
[code] resbuf result;
acedGetVar(_T("VIEWCTR"), &result);
AcGePoint3d center(result.resval.rpoint[X], result.resval.rpoint[Y], result.resval.rpoint[Z]);
acedGetVar(_T("VIEWSIZE"), &result);
double height = result.resval.rreal;
acedGetVar(_T("SCREENSIZE"), &result);
double width = height * result.resval.rpoint[X] / result.resval.rpoint[Y];
matrix.entry[1][1] = -1;
matrix.entry[0][3] = center.x - (width / 2);
matrix.entry[1][3] = center.y + (height / 2);
[/code] |
|