|
MeteoTools::GetPoliLines
defined as
myPoliLines
void IsoLines& GetPoliLines();
Return Value
This returned a IsoLines, an
Array of ISOLINES structures.
A
IsoLines is a
CArray-Objekt
and is defined in
BMSD_Defs.h
Remarks
This get an Array of ISOLINES
structures,
and it is needed in order to receive the pointer for the
CArray objekt IsoLines.
In the
MeteoTools.cpp is this
funktion defined as myPoliLines.
#define myPoliLines GetPoliLines()
Example
In the
CodePage you can find
DrawingTools.cpp for more detail.
And an other Example you can fin in
GetColorMatrix.
// GetCoordinates returned a Array of COORDIANTE
// it is defined as myCoordinates
// GetIsoPlanes returned a Array of ISOPLANE
// it is defined as myIsoPlanes
// GetPoliLines returned a Array of ISOLINES
// it is defined as myPoliLines
//type: the plane type of lines of a poligon -
PLANE_PRESS, see BMSD_Defs.h
//Screen_.. my limit cordinates of the Screen
void DrawPlaneLine(CDC* pDC,
int type, COLORREF col)
{
int i,end,start;
if(!myIsoLines.GetSize())
return;
if(!myCoordinates.GetSize())
return;
if(type>(myIsoPlanes.GetSize()-1))
return;
end=myIsoPlanes[type].start+myIsoPlanes[type].len;
if(end>myIsoLines.GetSize()) end=myIsoLines.GetSize();
start=myIsoPlanes[type].start;
for(i=start; i<end; i++)
{
if(myIsoLines[i].type==type)
{
if( myIsoLines[i].ymax <
Screen_ymin) continue;
if((myIsoLines[i].xmax <
Screen_xmin)
||(myIsoLines[i].xmin >
Screen_xmax)) continue;
if( myIsoLines[i].ymin > Screen_ymax)
continue;
DrawIsoLine(pDC,&myCoordinates[myIsoLines[i].start]
,myIsoLines[i].len,col);
}
}
// center point of Screen
// sx = Screen.cx / 2; sy = Screen.cy / 2;
// xoff,yoff,xscale,yscale --> see
DrawSeaData
struct LinePoint
{
short x;
short y;
};
typedef CArray<POINT,POINT&> PolyPoints;
void DrawIsoLine(CDC* pDC, COORDIANTE *point,
int count, COLORREF col)
{
if(count<1) return;
int i;
CPen Pen(PS_SOLID, 1, col);
CPen *pOldPen=pDC->SelectObject(&Pen);
if(count<1) return;
PolyPoints mPoints;
mPoints.SetSize(count);
for (i=0; i<count; i++)
{
mPoints[i].x=(int)((double)(((double)point[i].x +
xoff)/xscale))+sx;
mPoints[i].y=(int)((double)(((double)point[i].y +
yoff)/yscale))+sy;
}
pDC->Polyline(mPoints.GetData(),count);
pDC->SelectObject(pOldPen);
}
See Also GetCoordinates,
GetIsoPlanes
,
GetColorMatrix |