Пример #1
0
NRectangle::NRectangle(const NPoint &position, const NSize &size)
{
	NPoint *p = (NPoint *)&position;
	NSize *s = (NSize *)&size;
	x = p->GetX();
	y = p->GetY();
	width = s->GetWidth();
	height = s->GetHeight();
}
Пример #2
0
bool NRectangle::Contains(const NPoint &p)
{
	NPoint *pp = (NPoint *)&p;
	return Contains(pp->GetX(), pp->GetY());
}
Пример #3
0
GraphicsPatternRadial::GraphicsPatternRadial(const NPoint &a, double radiusa, const NPoint &b, double radiusb)
{
	NPoint *aa = (NPoint *)&a;
	NPoint *bb = (NPoint *)&b;
	pattern = cairo_pattern_create_radial(aa->GetX(), aa->GetY(), radiusa, bb->GetX(), bb->GetY(), radiusb);
}