//-----------------------------------------------------------------------------
Acad::ErrorStatus VertexPointMonitor::monitorInputPoint (
bool &appendToTooltipStr,
ACHAR *&additionalTooltipString,
AcGiViewportDraw *drawContext,
AcApDocument *document,
bool pointComputed,
int history,
const AcGePoint3d &lastPoint,
const AcGePoint3d &rawPoint,
const AcGePoint3d &grippedPoint,
const AcGePoint3d &cartesianSnappedPoint,
const AcGePoint3d &osnappedPoint,
AcDb::OsnapMask osnapMask,
const AcArray<AcDbCustomOsnapMode *> &customOsnapModes,
AcDb::OsnapMask osnapOverrides,
const AcArray<AcDbCustomOsnapMode *> &customOsnapOverrides,
const AcArray<AcDbObjectId> &apertureEntities,
const AcArray<AcDbObjectIdArray, AcArrayObjectCopyReallocator<AcDbObjectIdArray> > &nestedApertureEntities,
const AcArray<int> &gsSelectionMark,
const AcArray<AcDbObjectId> &keyPointEntities,
const AcArray<AcDbObjectIdArray, AcArrayObjectCopyReallocator<AcDbObjectIdArray> > &nestedKeyPointEntities,
const AcArray<int> &keyPointGsSelectionMark,
const AcArray<AcGeCurve3d *> &alignmentPaths,
const AcGePoint3d &computedPoint,
const ACHAR *tooltipString
) {
appendToTooltipStr =false ;
if (drawContext != NULL) {
resbuf rbGripSize; acedGetVar(L"GRIPSIZE",&rbGripSize);
resbuf rbSreensize; acedGetVar(L"SCREENSIZE",&rbSreensize);
resbuf rbViewSize; acedGetVar(L"VIEWSIZE",&rbViewSize);
int color = getvar(L"GRIPHOT",1);
double rad = rbViewSize.resval.rreal / rbSreensize.resval.rpoint[Y] * (rbGripSize.resval.rint*2);
drawContext->subEntityTraits().setColor(color);
drawContext->subEntityTraits().setFillType(kAcGiFillAlways);
AcGePoint3d pts[4] = {
pVertex + AcGeVector3d(-rad,-rad,0),
pVertex + AcGeVector3d(-rad,+rad,0),
pVertex + AcGeVector3d(+rad,+rad,0),
pVertex + AcGeVector3d(+rad,-rad,0)
};
drawContext->geometry().polygon(4,pts);
}
return (Acad::eOk) ;
}