HOMEPAGE

Development Sites - Information for Software-Developers

Developer Platform
The first instructions
Installations
System param. structures
connect to MeteoCom
simple screen drawing
own data drawing
Picture service
File Management
EmailBulletin Service

MeteoTools::DrawSeaData 

void DrawSeaData(CDC* pDC, LPRECT rect, time_t reftime, int hour, int details,
                                   float
xscale, float yscale, float xoff, float yoff
);

Parameters

    pDC

    Points to the printer device context (see CDC)

    rect

    Points to a RECT structure that contains the logical coordinates of the screen rectangle
    to be filled with meteo data. You can also pass a
CRect object for this parameter

    reftime

    the meteo basis time reference as type time_t (see CTime)

    hour

    the hour step, will be added to the reftime  (hour * 3600)
   
if hour -1, that means you want synop data

    details

    A combination of Bonito DetailFlags

    xscale

    X, longitude scale of the full world x-resolution   (21600 / X-screen-resolution)
                  360 x-resolution in minutes = 21600

    yscale

    Y, latitude scale of the full world y-resolution   (10800 / Y-Screen-resolution)
                  180 x-resolution in minutes = 10800

    xoff

    x offset of the cordinate rectangle, in minutes
       the max range is from -10800 to +10800  (180W-180E)
       the refence point is the center of the screen

    yoff

    y offset, in minutes (0 = -90 = 90N)
       the max range is from -5400 to +5400  (90N-90S)
       the refence point is the center of the screen

Remarks

    draw the first step, the sea plane level in the screen area.
    In the
SourceCodes you can find DrawingTools.cpp for more details.

 Note:
     This initiates the internal data structures for all the next data accesses.

Example
 
//see in CView the routine OnDraw (CDC *pDC)
//PlottWorldBorder, PlottChart(pDC) - is your own chart drawing


#include "MeteoTools.h"
#include "MeteoToolsDefs.h"

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Bonito counted from left/top to bottom/right
// all the transfomations see the refence point on the center of the screen
// the world cordinates system that Bonito use:
//
// in minutes = 180W to 180E --> -10800 to 10800
//               90N to 90S  -->  -5400 to  5400

void CDataView::DrawData(CDC* pDC)
   {
   //my time slider position = 0,1,2,3,....,74
   int hour=TimePos;

   //only for synop: if hour==-1, then we get synop data
   //synop have no time-step (hour) - it is only a single data set

   if(synop) hour=-1;
   DrawSeaData(pDC,rect,reftime,hour,details,xscale,yscale,xoff,yoff);
   PlottChart(pDC);
   DrawSfcData(pDC,rect,reftime,hour,details,xscale,yscale,xoff,yoff);
   if(details&(LAY_PRESS|LAY_TEMP|LAY_RH|LAY_WTEMP|LAY_STEMP))
      {
      PlottWorldBorder(pDC); //draw the world border
      }
    if(hour == -1 && (synopdetails& SYNOP_ONOFF))
      {
      DrawSynData(pDC,rect,reftime,hour,synopdetails,xscale,yscale,xoff,yoff);
      }

See Also   DrawSfcData, DrawSynData,LoadScreenField

 
   Copyright 2006 Bonito Germany.   
www.bonito.net