本文整理汇总了C++中LKSurface::DrawDashLine方法的典型用法代码示例。如果您正苦于以下问题:C++ LKSurface::DrawDashLine方法的具体用法?C++ LKSurface::DrawDashLine怎么用?C++ LKSurface::DrawDashLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LKSurface
的用法示例。
在下文中一共展示了LKSurface::DrawDashLine方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawSelectionFrame
void DrawSelectionFrame(LKSurface& Surface, const RECT& rc)
{
Surface.SetBkMode(TRANSPARENT);
RECT rci = rc;
#define SHRINK 1
rci.left +=1;
rci.top -=1;
rci.right -=2;
rci.bottom -=2;
int iSize = NIBLSCALE(2);
LKColor col = RGB_BLACK;
Surface.DrawLine (PEN_SOLID, iSize, (POINT) {rci.left,rci.top} ,(POINT) {rci.left,rci.bottom} , col, rci);
Surface.DrawLine (PEN_SOLID, iSize, (POINT) {rci.left,rci.bottom} ,(POINT) {rci.right,rci.bottom}, col, rci);
Surface.DrawLine (PEN_SOLID, iSize, (POINT) {rci.right,rci.bottom} ,(POINT) {rci.right,rci.top} , col, rci);
Surface.DrawLine (PEN_SOLID, iSize, (POINT) {rci.right,rci.top} ,(POINT) {rci.left,rci.top} , col, rci);
col = RGB_YELLOW;
Surface.DrawDashLine(iSize,(POINT) {rci.left,rci.top} ,(POINT) {rci.left,rci.bottom} , col, rci);
Surface.DrawDashLine(iSize,(POINT) {rci.left,rci.bottom} ,(POINT) {rci.right,rci.bottom}, col, rci);
Surface.DrawDashLine(iSize,(POINT) {rci.right,rci.bottom},(POINT) {rci.right,rci.top} , col, rci);
Surface.DrawDashLine(iSize,(POINT) {rci.right,rci.top} ,(POINT) {rci.left,rci.top} , col, rci);
}
示例2: SharedTopView
//.........这里部分代码省略.........
DrawTaskAAT(Surface, rct);
DrawTask(Surface, rct, _Proj, Orig_Aircraft);
}
if (IsMultimapWaypoints()) {
DrawWaypointsNew(Surface,rct);
}
if (Flags_DrawFAI)
DrawFAIOptimizer(Surface, rct, _Proj, Orig_Aircraft);
DeclutterMode=olddecluttermode; // set it back correctly
/* THIS STUFF DOES NOT WORK IN SHARED MAPS, YET
NEED FIXING LatLon2Screen for shared maps using Sideview
#ifdef GTL2
if (((FinalGlideTerrain == 2) || (FinalGlideTerrain == 4)) &&
DerivedDrawInfo.TerrainValid)
DrawTerrainAbove(hdc, rct);
#endif
*/
//
// Stuff for MAPTRK only (M1)
if (MapSpaceMode==MSM_MAPTRK) {
if(IsMultimapTerrain() || IsMultimapTopology() ) {
if (FinalGlideTerrain && DerivedDrawInfo.TerrainValid)
DrawGlideThroughTerrain(Surface, rct, _Proj);
}
if (extGPSCONNECT)
DrawBearing(Surface, rct, _Proj);
// Wind arrow
if (IsMultimapOverlaysGauges())
DrawWindAtAircraft2(Surface, Orig_Aircraft, rct);
}
if (MapSpaceMode==MSM_MAPWPT) {
if (extGPSCONNECT)
DrawBearing(Surface, rct, _Proj);
}
switch(GetMMNorthUp(getsideviewpage)) {
case NORTHUP:
default:
DrawCompass( Surface, rct, 0);
break;
case TRACKUP:
if(getsideviewpage == IM_HEADING || getsideviewpage == IM_VISUALGLIDE)
DrawCompass( Surface, rct, DrawInfo.TrackBearing-90.0);
else
DrawCompass( Surface, rct, DisplayAngle);
break;
}
/****************************************************************************************************
* draw vertical line
****************************************************************************************************/
POINT line[2];
line[0].x = rct.left;
line[0].y = Orig_Aircraft.y-1;
line[1].x = rct.right;
line[1].y = line[0].y;
switch(GetMMNorthUp(getsideviewpage))
{
case TRACKUP:
// Are we are not topview fullscreen?
if (Current_Multimap_SizeY<SIZE4 && !(MapSpaceMode==MSM_VISUALGLIDE)) {
Surface.DrawDashLine(NIBLSCALE(1), line[0], line[1], Sideview_TextColor, rct);
} else {
if (TrackBar) {
DrawHeadUpLine(Surface, Orig, rct, psDia->fXMin ,psDia->fXMax);
if (ISGAAIRCRAFT) DrawFuturePos(Surface, Orig, rct, true);
}
}
break;
case NORTHUP:
default:
if (TrackBar) {
DrawHeadUpLine(Surface, Orig, rct, psDia->fXMin ,psDia->fXMax);
if (ISGAAIRCRAFT) DrawFuturePos(Surface, Orig, rct, true);
}
break;
}
DrawAircraft(Surface, Orig_Aircraft);
// M3 has sideview always on, so wont apply here, and no need to check
if (Current_Multimap_SizeY==SIZE4) {
DrawMapScale(Surface,rct,0);
}
MapWindow::zoom.RequestedScale(fOldScale);
EnableThermalLocator = iOldLocator;
DisplayOrientation = iOldDisplayOrientation;
Surface.SelectObject(hfOld);
return 0;
}
示例3: RenderNearAirspace
//.........这里部分代码省略.........
Surface.SelectObject(hfOld2);
Surface.SetBkMode(TRANSPARENT);
Surface.SelectObject(hfOld);
Surface.SetTextColor(GROUND_TEXT_COLOUR);
if(bInvCol)
if(sDia.fYMin > GC_SEA_LEVEL_TOLERANCE)
Surface.SetTextColor(INV_GROUND_TEXT_COLOUR);
/****************************************************************************************************/
/****************************************************************************************************/
/****************************************************************************************************
* draw distances to next airspace
****************************************************************************************************/
/****************************************************************************************************/
/****************************************************************************************************/
if (bValid)
{
/****************************************************************************************************
* draw horizontal distance to next airspace
****************************************************************************************************/
Surface.SetTextColor(Sideview_TextColor);
Surface.SetBkMode(OPAQUE);
LKFont hfOldU = Surface.SelectObject(LK8InfoNormalFont);
// horizontal distance
line[0].x = CalcDistanceCoordinat(0, &sDia);
line[0].y = CalcHeightCoordinat( GPSalt, &sDia );
line[1].x = CalcDistanceCoordinat(iABS_AS_HorDistance, &sDia);
line[1].y = line[0].y;
Surface.DrawDashLine(THICK_LINE, line[0], line[1], Sideview_TextColor, rc);
if(iAS_HorDistance < 0)
{
line[0].y = CalcHeightCoordinat( GPSalt - (double)iAS_VertDistance, &sDia );
line[1].y = line[0].y;
Surface.DrawDashLine(THICK_LINE, line[0], line[1], Sideview_TextColor, rc);
}
bool bLeft = false;
if( line[0].x < line[1].x)
bLeft = false;
else
bLeft = true;
Units::FormatUserDistance(iABS_AS_HorDistance, buffer, 7);
_stprintf(text,_T(" %s"),buffer);
Surface.GetTextSize(text, _tcslen(text), &tsize);
if((GPSalt- sDia.fYMin /*-calc_terrainalt */) < 300)
TxXPt.y = CalcHeightCoordinat( GPSalt, &sDia ) - tsize.cy;
else
TxXPt.y = CalcHeightCoordinat( GPSalt, &sDia ) + NIBLSCALE(3);
if(tsize.cx > (line[1].x - line[0].x) )
TxXPt.x = CalcDistanceCoordinat( iABS_AS_HorDistance ,&sDia) -tsize.cx- NIBLSCALE(3);
else
TxXPt.x = CalcDistanceCoordinat( iABS_AS_HorDistance / 2.0, &sDia) -tsize.cx/2;
Surface.DrawText(TxXPt.x, TxXPt.y, text, _tcslen(text));