本文整理汇总了C++中BoxObj::Contains方法的典型用法代码示例。如果您正苦于以下问题:C++ BoxObj::Contains方法的具体用法?C++ BoxObj::Contains怎么用?C++ BoxObj::Contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoxObj
的用法示例。
在下文中一共展示了BoxObj::Contains方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: contains
bool Picture::contains (PointObj& po, Graphic* gs) {
if (!IsEmpty()) {
Iterator i;
FullGraphic gstemp;
Transformer ttemp;
BoxObj b;
getBox(b, gs);
if (b.Contains(po)) {
gstemp.SetTransformer(&ttemp);
for (First(i); !Done(i); Next(i)) {
Graphic* gr = GetGraphic(i);
concatGraphic(gr, gr, gs, &gstemp);
if (containsGraphic(gr, po, &gstemp)) {
gstemp.SetTransformer(nil);
return true;
}
}
gstemp.SetTransformer(nil); /* to avoid deleting ttemp explicitly*/
}
}
return false;
}
示例2: contains
boolean ULabel::contains (PointObj& po, Graphic* gs) {
PointObj pt (&po);
PSFont* f = gs->GetFont();
invTransform(pt._x, pt._y, gs);
BoxObj b (0, 0, f->Width(_string), f->Height());
return b.Contains(pt);
}
示例3: contains
boolean UStencil::contains (PointObj& po, Graphic* gs) {
Bitmap* bitmap = (_mask == nil) ? _image : _mask;
PointObj pt (&po);
invTransform(pt._x, pt._y, gs);
BoxObj b (0, 0, bitmap->Width(), bitmap->Height());
return b.Contains(pt);
}
示例4: f_contains
boolean MultiLine::f_contains (PointObj& po, Graphic* gs) {
BoxObj b;
PointObj pt (&po);
getBox(b, gs);
if (b.Contains(pt)) {
FillPolygonObj fp (x(), y(), count());
invTransform(pt._x, pt._y, gs);
return fp.Contains(pt);
}
return false;
}
示例5: s_contains
boolean MultiLine::s_contains (PointObj& po, Graphic* gs) {
MultiLineObj &ml = *_pts;
PointObj pt (&po);
BoxObj b;
getBox(b, gs);
if (b.Contains(po)) {
invTransform(pt._x, pt._y, gs);
return ml.Contains(pt);
}
return false;
}
示例6: f_contains
bool OpenBSpline::f_contains (PointObj& po, Graphic* gs) {
PointObj pt (&po);
BoxObj b;
getBox(b, gs);
if (b.Contains(pt)) {
invTransform(pt._x, pt._y, gs);
FillPolygonObj fp;
fp.ClosedSplineToPolygon(_x, _y, _count);
return fp.Contains(pt);
}
return false;
}
示例7: s_contains
bool OpenBSpline::s_contains (PointObj& po, Graphic* gs) {
PointObj pt (&po);
BoxObj b;
getBox(b, gs);
if (b.Contains(pt)) {
invTransform(pt._x, pt._y, gs);
MultiLineObj ml;
ml.SplineToMultiLine(_x, _y, _count);
return ml.Contains(pt);
}
return false;
}
示例8: Contains
boolean MultiLineObj::Contains (PointObj& p) {
register int i;
BoxObj b;
GetBox(b);
if (b.Contains(p)) {
for (i = 1; i < _count; ++i) {
LineObj l (_x[i-1], _y[i-1], _x[i], _y[i]);
if (l.Contains(p)) {
return true;
}
}
}
return false;
}
示例9: contains
boolean BSplineSelection::contains (PointObj& po, Graphic* gs) {
BoxObj b;
getBox(b, gs);
if (b.Contains(po)) {
if (containsGraphic(ifillbspline, po, gs)) {
return true;
} else if (containsGraphic(bspline, po, gs)) {
return true;
} else if (LeftAcont(lx0, ly0, lx1, ly1, po, gs)) {
return true;
} else if (RightAcont(rx0, ry0, rx1, ry1, po, gs)) {
return true;
}
}
return false;
}
示例10: intersects
bool SFH_ClosedBSpline::intersects (BoxObj& userb, Graphic* gs) {
PointObj po;
const Coord *x, *y;
int count = GetOriginal(x, y);
Transformer* t = gs->GetTransformer();
for (int i = 0; i < count; i++) {
po._x = x[i];
po._y = y[i];
if (t != nil) {
t->Transform(po._x, po._y);
}
if (userb.Contains(po)) {
return true;
}
}
return SF_ClosedBSpline::intersects(userb, gs);
}
示例11: contains
boolean Graphic::contains (PointObj& po, Graphic* gs) {
BoxObj b;
getBox(b, gs);
return b.Contains(po);
}
示例12: contains
bool RasterRect::contains (PointObj& po, Graphic* gs) {
PointObj pt (&po);
invTransform(pt._x, pt._y, gs);
BoxObj b (0, 0, _raster->Width(), _raster->Height());
return b.Contains(pt);
}
示例13: intersects
boolean Point::intersects (BoxObj& b, Graphic* gs) {
PointObj pt (_x, _y);
transform(pt._x, pt._y, gs);
return b.Contains(pt);
}