本文整理汇总了C++中Video_Win::draw_rect方法的典型用法代码示例。如果您正苦于以下问题:C++ Video_Win::draw_rect方法的具体用法?C++ Video_Win::draw_rect怎么用?C++ Video_Win::draw_rect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video_Win
的用法示例。
在下文中一共展示了Video_Win::draw_rect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Show
void cElHJaFacette::Show(REAL aDirH,INT aCoul,bool WithBox)
{
Video_Win aW = *(mPlan->W());
aW.hach(mVPt,Pt2dr::FromPolar(1.0,aDirH),3.0,aW.pdisc()(aCoul));
if (WithBox)
{
aW.draw_rect(mBox._p0,mBox._p1,aW.pdisc()(aCoul));
}
}
示例2: ComputeSubset
void cASAMG::ComputeSubset(int aNbPts,cResumNuage & aRN)
{
Video_Win * aW = mAppli->Param().VisuLowPts().Val() ? TheWinIm() : 0;
double aSzCel = sqrt(double(mSz.x*mSz.y)/aNbPts);
Pt2di aNb2C = round_up(Pt2dr(mSz)/aSzCel);
Pt2di aPK;
Im2D_U_INT1 anImDist(mSz.x,mSz.y);
TIm2D<U_INT1,INT> aTDist(anImDist);
ELISE_COPY(mMasqN.all_pts(),mMasqN.in(),anImDist.out());
Chamfer::d32.im_dist(anImDist);
if (aW)
{
ELISE_COPY(anImDist.all_pts(),mStdN->ImDef().in()!=0,aW->odisc());
ELISE_COPY(select(anImDist.all_pts(),anImDist.in()>0),P8COL::blue,aW->odisc());
ELISE_COPY(select(anImDist.all_pts(),anImDist.in()>10),P8COL::yellow,aW->odisc());
}
int aNbSomTot = 0;
std::vector<Pt2di> aVPts;
std::vector<int> aVNb;
for (aPK.x=0 ; aPK.x<aNb2C.x ; aPK.x++)
{
Pt2di aP0,aP1;
aP0.x = (aPK.x*mSz.x) / aNb2C.x;
aP1.x = ((aPK.x+1)*mSz.x) / aNb2C.x;
for (aPK.y=0 ; aPK.y<aNb2C.y ; aPK.y++)
{
aP0.y = (aPK.y*mSz.y) / aNb2C.y;
aP1.y = ((aPK.y+1)*mSz.y) / aNb2C.y;
Pt2di aP;
Pt2dr aPMoy(0,0);
int aNbSom=0;
if (aW)
{
aW->draw_rect(Pt2dr(aP0),Pt2dr(aP1),Line_St(aW->pdisc()(P8COL::green)));
}
for (aP.x=aP0.x; aP.x<aP1.x ; aP.x++)
{
for (aP.y=aP0.y; aP.y<aP1.y ; aP.y++)
{
if (mTMasqN.get(aP))
{
aPMoy = aPMoy + Pt2dr(aP);
aNbSom++;
}
}
}
if (aNbSom>0)
{
aPMoy = aPMoy/double(aNbSom);
double aDBest = 1e10;
Pt2di aPBest(0,0);
for (aP.x=aP0.x; aP.x<aP1.x ; aP.x++)
{
for (aP.y=aP0.y; aP.y<aP1.y ; aP.y++)
{
if (mTMasqN.get(aP))
{
double aDist = euclid(Pt2dr(aP),aPMoy) - std::min(6,aTDist.get(aP))/1.8;
if (aDist<aDBest)
{
aDBest = aDist;
aPBest = aP;
}
}
}
}
aVPts.push_back(aPBest);
aVNb.push_back(aNbSom);
/*
cLinkPtFuNu aPF(aPBest.x,aPBest.y,aNbSom);
aVPTR.push_back(aPF);
*/
aNbSomTot += aNbSom;
if (aW)
{
aW->draw_circle_abs(Pt2dr(aPBest),3.0,aW->pdisc()(P8COL::red));
}
}
}
}
aRN.Reset(aVPts.size());
aRN.mNbSom = aNbSomTot;
for (int aK=0 ; aK<int(aVPts.size()); aK++)
{
aRN.mVX.push_back(aVPts[aK].x);
aRN.mVY.push_back(aVPts[aK].y);
aRN.mVNb.push_back(aVNb[aK]);
}
if (aW)
//.........这里部分代码省略.........