本文整理汇总了C++中Video_Win::draw_seg方法的典型用法代码示例。如果您正苦于以下问题:C++ Video_Win::draw_seg方法的具体用法?C++ Video_Win::draw_seg怎么用?C++ Video_Win::draw_seg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video_Win
的用法示例。
在下文中一共展示了Video_Win::draw_seg方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToLoc
std::vector<Pt2dr> cICL_Courbe::GetPoly(INT NbPtsMax,bool ForceLosange)
{
ELISE_ASSERT(pW!=0,"cICL_Courbe::GetPoly()");
static bool First = true;
if (! First)
pW->clik_in();
First = false;
pW->clear();
pW->draw_circle_loc
(
ToLoc(Pt2dr(0,0)),
mScale,
pW->pdisc()(P8COL::red)
);
std::vector<Pt2dr> aRes;
while (true)
{
Clik aCl = pW->clik_in();
Pt2dr aP = (Pt2dr(aCl._pt)-mP0) / mScale;
if (NbPtsMax-1 == INT(aRes.size()))
aCl._b = 3;
if (ForceLosange && (aRes.size()==3))
{
aP = aRes[0]+ aRes[2] - aRes[1];
aCl._b = 3;
}
pW->draw_circle_loc(ToLoc(aP),3.0,pW->pdisc()(P8COL::green));
if (! aRes.empty())
pW->draw_seg(ToLoc(aRes.back()),ToLoc(aP),pW->pdisc()(P8COL::green));
aRes.push_back(aP);
if (aCl._b == 3)
{
pW->draw_seg(ToLoc(aRes[0]),ToLoc(aP),pW->pdisc()(P8COL::green));
return aRes;
}
}
return aRes;
}
示例2: ShowCont
void cElHJaFacette::ShowCont(INT aCoul,Video_Win aW)
{
INT aNb = (int) mVPt.size();
for (INT aK=0 ; aK<aNb ; aK++)
aW.draw_seg(mVPt[aK],mVPt[(aK+1)%aNb],aW.pdisc()(aCoul));
}
示例3: aBoxW
void cElHJaPlan3D::Show
(
Video_Win aW,
INT aCoul,
bool ShowDroite,
bool ShowInterEmpr
)
{
if (aCoul >=0)
ELISE_COPY(aW.all_pts(),aCoul,aW.ogray());
Box2dr aBoxW(Pt2dr(0,0),Pt2dr(aW.sz()));
for (INT aK=0; aK<INT(mVInters.size()) ; aK++)
{
cElHJaDroite * aDr =mVInters[aK];
if (aDr)
{
ElSeg3D aSeg = aDr->Droite();
Pt3dr aQ0 = aSeg.P0();
Pt3dr aQ1 = aSeg.P1();
Pt2dr aP0(aQ0.x,aQ0.y);
Pt2dr aP1(aQ1.x,aQ1.y);
Seg2d aS(aP0,aP1);
Seg2d aSC = aS.clipDroite(aBoxW);
if (ShowDroite && (! aSC.empty()))
{
aW.draw_seg(aSC.p0(),aSC.p1(),aW.pdisc()(P8COL::magenta));
}
}
}
tFullSubGrPl aSGrFul;
if (ShowInterEmpr)
{
for (tItSomGrPl itS=mGr->begin(aSGrFul) ; itS.go_on() ; itS++)
{
aW.draw_circle_loc
(
(*itS).attr().Pt(),
4.0,
aW.pdisc()(P8COL::blue)
);
for (tItArcGrPl itA=(*itS).begin(aSGrFul) ; itA.go_on() ; itA++)
{
tSomGrPl &s1 = (*itA).s1();
tSomGrPl &s2 = (*itA).s2();
if (&s1 < &s2)
{
aW.draw_seg
(
s1.attr().Pt(),
s2.attr().Pt(),
aW.pdisc()(P8COL::black)
);
}
}
}
}
// for (INT aK=0 ; aK<INT(mFacOblig.size()) ; aK++)
// mFacOblig[aK]->Show(PI/2.0,P8COL::cyan,false);
}