本文整理汇总了C++中LKSurface::InvertRect方法的典型用法代码示例。如果您正苦于以下问题:C++ LKSurface::InvertRect方法的具体用法?C++ LKSurface::InvertRect怎么用?C++ LKSurface::InvertRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LKSurface
的用法示例。
在下文中一共展示了LKSurface::InvertRect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawAspNearest
//.........这里部分代码省略.........
// AIRSPACE FLAGS
//
TCHAR aspflags[5];
_stprintf(aspflags,_T("%s%s%s%s"),
LKAirspaces[rli].Selected ? _T("S") : _T(""),
LKAirspaces[rli].Flyzone ? _T("F") : _T(" "),
LKAirspaces[rli].Enabled ? _T("E") : _T("D"), s_trailspace);
if (!ScreenLandscape && usetwolines) _stprintf(Buffer5[i][curpage], TEXT("*%s"), aspflags);
else _stprintf(Buffer5[i][curpage], TEXT("%s"), aspflags);
} else {
_stprintf(Buffer1[i][curpage], _T("----------------------------")); // max 30
Buffer1[i][curpage][s_maxnlname+7]='\0'; // some more dashes
_stprintf(Buffer2[i][curpage],_T("----"));
_stprintf(Buffer3[i][curpage],_T("----"));
_stprintf(Buffer4[i][curpage],_T("----"));
_stprintf(Buffer5[i][curpage],_T(" "));
}
KeepOldValues:
if ( ValidAirspace(rli) ) {
drawn_items_onpage++;
switch(LKAirspaces[rli].WarningLevel) {
case awYellow:
rcolor=RGB_LIGHTYELLOW;
Surface.SelectObject(LK8InfoBigItalicFont);
break;
case awRed:
rcolor=RGB_LIGHTRED;
Surface.SelectObject(LK8InfoBigItalicFont);
break;
case awNone:
default:
rcolor=RGB_WHITE;
Surface.SelectObject(LK8InfoBigFont);
break;
}
} else {
rcolor=RGB_GREY;
}
if (ScreenLandscape || !usetwolines) {
LKWriteText(Surface, Buffer1[i][curpage], Column1, iRaw , 0, WTMODE_NORMAL, WTALIGN_LEFT, rcolor, false);
LKWriteText(Surface, Buffer2[i][curpage], Column2, iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
LKWriteText(Surface, Buffer3[i][curpage], Column3, iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
LKWriteText(Surface, Buffer4[i][curpage], Column4, iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
LKWriteText(Surface, Buffer5[i][curpage], Column5, iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
} else {
LKWriteText(Surface, Buffer1[i][curpage], Column1, iRaw , 0, WTMODE_NORMAL, WTALIGN_LEFT, rcolor, false);
LKWriteText(Surface, Buffer2[i][curpage], Column5, iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
iRaw+=s_rawspace;
unsigned int iCol=ScreenSizeX/3;
LKWriteText(Surface, Buffer3[i][curpage], iCol, iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
LKWriteText(Surface, Buffer4[i][curpage], iCol*2, iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
LKWriteText(Surface, Buffer5[i][curpage], right-IBLSCALE(2), iRaw , 0, WTMODE_NORMAL, WTALIGN_RIGHT, rcolor, false);
}
}
if (LKevent==LKEVENT_NEWRUN || LKevent==LKEVENT_NEWPAGE ) {
LKevent=LKEVENT_NONE;
return;
}
if (drawn_items_onpage>0) {
if (SelectedRaw[curmapspace] <0 || SelectedRaw[curmapspace]>(AspNumraws-1)) {
return;
}
if (SelectedRaw[curmapspace] >= drawn_items_onpage) {
if (LKevent==LKEVENT_DOWN) SelectedRaw[curmapspace]=0;
else
if (LKevent==LKEVENT_UP) SelectedRaw[curmapspace]=drawn_items_onpage-1;
else {
// DoStatusMessage(_T("Cant find valid raw")); not needed anymore
SelectedRaw[curmapspace]=0;
}
}
invsel.left=left;
invsel.right=right;
if (!ScreenLandscape && usetwolines) invsel.top=TopSize+(s_rawspace*SelectedRaw[curmapspace]*lincr);
else invsel.top=TopSize+(s_rawspace*SelectedRaw[curmapspace])+NIBLSCALE(2);
invsel.bottom=TopSize+(s_rawspace*(SelectedRaw[curmapspace]*lincr+1))-NIBLSCALE(1);
if (!ScreenLandscape && usetwolines) invsel.bottom+=s_rawspace;
Surface.InvertRect(invsel);
}
LKevent=LKEVENT_NONE;
return;
}