bool ossimGpkgTileMatrixRecord::init( ossim_int32 zoom_level,
                                      const ossimIpt& matrixSize,
                                      const ossimIpt& tileSize,
                                      const ossimDpt& gsd )
{
   bool status = false;

   if ( (matrixSize.hasNans() == false) && (tileSize.hasNans() == false) &&
        (gsd.hasNans() == false) )
   {
      m_table_name = "tiles";
      m_zoom_level = zoom_level;
      m_matrix_width = matrixSize.x;
      m_matrix_height = matrixSize.y;
      m_tile_width = tileSize.x;
      m_tile_height = tileSize.y;
      m_pixel_x_size = gsd.x;
      m_pixel_y_size = gsd.y;
      
      status = true;
   }
   
   return status;
   
} // End: ossimGpkgTileMatrixRecord::init( zoom_level, ... )
void ossimQtScrollingImageWidget::setInputInformation(const ossimIpt& pt)
{
   theBackingStoreCache.flush();
   ossimIrect cacheRect;
   cacheRect.makeNan();
   theBoundingRect = computeBoundingRect();
   theSceneBoundingRect = theBoundingRect;
   if(!theBoundingRect.hasNans())
   {
      theBoundingRect.stretchToTileBoundary(theTileSize);
   }
   
   theShiftToZeroZero = ossimIpt(0,0) - theBoundingRect.ul();
   
   ossimIpt aCenter = theBoundingRect.midPoint() + theShiftToZeroZero;
   if(!theBoundingRect.hasNans())
   {
      resizeContents(theBoundingRect.width(), theBoundingRect.height());
      if(pt.hasNans())
      {
         center(aCenter.x, aCenter.y);
      }
      else
      {
         ossimIpt newPoint = pt + theShiftToZeroZero;
         center(newPoint.x, newPoint.y);
      }
   }    
   else	
   {
      resizeContents(0, 0);
   }
}
Exemple #3
0
//*******************************************************************
// Public Constructor:
//*******************************************************************
ossimFpt::ossimFpt(const ossimIpt& pt)
   :
      x(pt.x), y(pt.y)
{
   if(pt.hasNans())
   {
      makeNan();
   }
}