本文整理汇总了C++中Transformer::Rotated方法的典型用法代码示例。如果您正苦于以下问题:C++ Transformer::Rotated方法的具体用法?C++ Transformer::Rotated怎么用?C++ Transformer::Rotated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transformer
的用法示例。
在下文中一共展示了Transformer::Rotated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: intersects
bool RasterRect::intersects (BoxObj& userb, Graphic* gs) {
Transformer* t = gs->GetTransformer();
Coord xmax = _raster->Width();
Coord ymax = _raster->Height();
Coord tx0, ty0, tx1, ty1;
if (t != nil && t->Rotated()) {
Coord x[4], tx[5];
Coord y[4], ty[5];
x[0] = x[3] = y[0] = y[1] = 0;
x[2] = x[1] = xmax;
y[2] = y[3] = ymax;
transformList(x, y, 4, tx, ty, gs);
tx[4] = tx[0];
ty[4] = ty[0];
FillPolygonObj fp (tx, ty, 5);
return fp.Intersects(userb);
} else if (t != nil) {
t->Transform(0, 0, tx0, ty0);
t->Transform(xmax, ymax, tx1, ty1);
BoxObj b1 (tx0, ty0, tx1, ty1);
return b1.Intersects(userb);
} else {
BoxObj b2 (0, 0, xmax, ymax);
return b2.Intersects(userb);
}
}
示例2: intersects
boolean TextGraphic::intersects (BoxObj& userb, Graphic* gs) {
Transformer* t = gs->GetTransformer();
boolean intersects;
if (t != nil && t->Rotated()) {
intersects = RotatedIntersects(userb, gs);
} else if (t != nil) {
intersects = TransformedIntersects(userb, gs);
} else {
intersects = UntransformedIntersects(userb, gs);
}
return intersects;
}