本文整理汇总了C++中MapBlock::MoveTo方法的典型用法代码示例。如果您正苦于以下问题:C++ MapBlock::MoveTo方法的具体用法?C++ MapBlock::MoveTo怎么用?C++ MapBlock::MoveTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapBlock
的用法示例。
在下文中一共展示了MapBlock::MoveTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ScreenPosition
void TMissionEditor::DrawDrag(MapBlock& block)
{
if (dragline.b1.x!=int(0x80000000))
{
CurrCanvas->Pen(psSolid,(TColor)0xFF0000,1);
int x1,x2,x3,w,y1,y2,y3,h;
x2=dragline.b1.x;
y2=dragline.b1.y;
ScreenPosition(x2,y2);
x1=dragline.a.x;
y1=dragline.a.y;
if (x1!=int(0x80000000))
{
ScreenPosition(x1,y1);
block.MoveTo(x2,y2);
block.DragLineTo(x1,y1);
}
x3=dragline.c.x;
y3=dragline.c.y;
if (x3!=int(0x80000000))
{
ScreenPosition(x3,y3);
block.MoveTo(x3,y3);
block.DragLineTo(x2,y2);
}
w=dragline.bw.x;
h=dragline.bw.y;
if (w!=int(0x80000000))
{
w/=cmpixscale;
h/=cmpixscale;
block.Rectangle(x2-w,y2-h,x2+w,y2+h);
}
CurrCanvas->Pen(psSolid,(TColor)0x0000FF,1);
x2=dragline.b2.x;
y2=dragline.b2.y;
if (x2!=int(0x80000000))
{
ScreenPosition(x2,y2);
if (x1!=int(0x80000000))
{
block.MoveTo(x1,y1);
block.DragLineTo(x2,y2);
}
if (x3!=int(0x80000000))
{
block.MoveTo(x3,y3);
block.DragLineTo(x2,y2);
}
if (w!=int(0x80000000))
{
block.Rectangle(x2-w,y2-h,x2+w,y2+h);
}
}
}
}