本文整理汇总了C++中LKSurface::Segment方法的典型用法代码示例。如果您正苦于以下问题:C++ LKSurface::Segment方法的具体用法?C++ LKSurface::Segment怎么用?C++ LKSurface::Segment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LKSurface
的用法示例。
在下文中一共展示了LKSurface::Segment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderTask
//.........这里部分代码省略.........
x1 = (lon1-lon_c)*fastcosine(lat1);
y1 = (lat1-lat_c);
ScaleXFromValue(rc, x1*fXY_Scale);
ScaleYFromValue(rc, y1*fXY_Scale);
}
ScaleMakeSquare(rc);
// draw aat areas
if (AATEnabled)
{
for (i=MAXTASKPOINTS-1; i>0; i--)
{
if (ValidTaskPoint(i))
{
lat1 = WayPointList[Task[i-1].Index].Latitude;
lon1 = WayPointList[Task[i-1].Index].Longitude;
lat2 = WayPointList[Task[i].Index].Latitude;
lon2 = WayPointList[Task[i].Index].Longitude;
x1 = (lon1-lon_c)*fastcosine(lat1);
y1 = (lat1-lat_c);
x2 = (lon2-lon_c)*fastcosine(lat2);
y2 = (lat2-lat_c);
#ifdef HAVE_HATCHED_BRUSH
Surface.SelectObject(MapWindow::GetAirspaceBrushByClass(AATASK));
#else
Surface.SelectObject(LKBrush_Yellow);
#endif
Surface.SelectObject(LK_WHITE_PEN);
if (Task[i].AATType == SECTOR)
{
Surface.Segment((long)((x2-x_min)*xscale+rc.left+BORDER_X),(long)((y_max-y2)*yscale+rc.top),(long)(aatradius[i]*yscale),rc, Task[i].AATStartRadial, Task[i].AATFinishRadial);
}
else
{
Surface.DrawCircle((long)((x2-x_min)*xscale+rc.left+BORDER_X), (long)((y_max-y2)*yscale+rc.top), (long)(aatradius[i]*yscale), true);
}
}
}
}
if (!AATEnabled)
{
for (i=MAXTASKPOINTS-1; i>0; i--)
{
if (ValidTaskPoint(i) && ValidTaskPoint(i-1))
{
lat1 = WayPointList[Task[i-1].Index].Latitude;
lon1 = WayPointList[Task[i-1].Index].Longitude;
if (!ValidTaskPoint(1) ) {
lat2 = GPS_INFO.Latitude;
lon2 = GPS_INFO.Longitude;
}
else
{
lat2 = WayPointList[Task[i].Index].Latitude;
lon2 = WayPointList[Task[i].Index].Longitude;
}
x1 = (lon1-lon_c)*fastcosine(lat1);
y1 = (lat1-lat_c);
x2 = (lon2-lon_c)*fastcosine(lat2);
y2 = (lat2-lat_c);
// DrawLine(hdc, rc, x1, y1, x2, y2, STYLE_DASHGREEN);