当前位置: 首页>>代码示例>>C++>>正文


C++ BoxObj::Contains方法代码示例

本文整理汇总了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;
}
开发者ID:PNCG,项目名称:neuron,代码行数:26,代码来源:picture.cpp

示例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);
}
开发者ID:neurodebian,项目名称:iv-hines,代码行数:8,代码来源:ulabel.cpp

示例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);
}
开发者ID:neurodebian,项目名称:iv-hines,代码行数:8,代码来源:ustencil.cpp

示例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;
}
开发者ID:barak,项目名称:ivtools-cvs,代码行数:12,代码来源:lines.c

示例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;
}
开发者ID:barak,项目名称:ivtools-cvs,代码行数:12,代码来源:lines.c

示例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;
}
开发者ID:PNCG,项目名称:neuron,代码行数:13,代码来源:splines.cpp

示例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;
}
开发者ID:PNCG,项目名称:neuron,代码行数:13,代码来源:splines.cpp

示例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;
}
开发者ID:barak,项目名称:ivtools-cvs,代码行数:15,代码来源:geomobjs.c

示例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;
}
开发者ID:axelmuhr,项目名称:Helios-NG,代码行数:16,代码来源:slsplines.c

示例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);
}
开发者ID:PNCG,项目名称:neuron,代码行数:19,代码来源:splines.cpp

示例11: contains

boolean Graphic::contains (PointObj& po, Graphic* gs) {
    BoxObj b;

    getBox(b, gs);
    return b.Contains(po);
}
开发者ID:neurodebian,项目名称:iv-hines,代码行数:6,代码来源:graphic.cpp

示例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);
}
开发者ID:PNCG,项目名称:neuron,代码行数:6,代码来源:rasterrect.cpp

示例13: intersects

boolean Point::intersects (BoxObj& b, Graphic* gs) {
    PointObj pt (_x, _y);
        
    transform(pt._x, pt._y, gs);
    return b.Contains(pt);
}
开发者ID:barak,项目名称:ivtools-cvs,代码行数:6,代码来源:lines.c


注:本文中的BoxObj::Contains方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。