~ubuntu-branches/ubuntu/trusty/qgis/trusty

« back to all changes in this revision

Viewing changes to src/core/raster/qgsrasterviewport.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                        qgsrasterviewport.h  -  description
 
3
                              -------------------
 
4
 begin                : Fri Jun 28 2002
 
5
 copyright            : (C) 2005 by T.Sutton
 
6
 email                : tim@linfiniti.com
 
7
***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
/* $Id: qgsrasterlayer.h 4380 2005-12-26 23:37:50Z timlinux $ */
 
18
#ifndef QGSRASTERVIEWPORT_H
 
19
#define QGSRASTERVIEWPORT_H
 
20
 
 
21
#include <qgspoint.h>
 
22
 
 
23
/** \ingroup core
 
24
 *  This class provides details of the viewable area that a raster will
 
25
 *  be rendered into.
 
26
 *
 
27
 *  The qgsrasterviewport class sets up a viewport / area of interest to be used
 
28
 *  by rasterlayer draw functions at the point of drawing to the screen.
 
29
 */
 
30
 
 
31
struct QgsRasterViewPort
 
32
{
 
33
  /** \brief  The offset from the left hand edge of the raster for the rectangle that will be drawn to screen.
 
34
   * TODO Check this explanation is correc!*/
 
35
  int   rectXOffset;
 
36
  float rectXOffsetFloat;
 
37
  /** \brief  The offset from the bottom edge of the raster for the rectangle that will be drawn to screen.
 
38
   * TODO Check this explanation is correc!*/
 
39
  int   rectYOffset;
 
40
  float rectYOffsetFloat;
 
41
  /** \brief Lower left X dimension of clipped raster image in raster pixel space.
 
42
   *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
 
43
   *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
 
44
   *  whatever the screen coordinates are (e.g. a 600x800 display window) */
 
45
  double clippedXMin;
 
46
  /** \brief Top Right X dimension of clipped raster image in raster pixel space.
 
47
   *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
 
48
   *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
 
49
   *  whatever the screen coordinates are (e.g. a 600x800 display window) */
 
50
  double clippedXMax;
 
51
  /** \brief Lower left Y dimension of clipped raster image in raster pixel space.
 
52
   *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
 
53
   *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
 
54
   *  whatever the screen coordinates are (e.g. a 600x800 display window) */
 
55
  double clippedYMin;
 
56
  /** \brief Top Right X dimension of clipped raster image in raster pixel space.
 
57
   *  RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
 
58
   *  be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
 
59
   *  whatever the screen coordinates are (e.g. a 600x800 display window) */
 
60
  double clippedYMax;
 
61
  /** \brief  Distance in pixels from clippedXMin to clippedXMax. */
 
62
  int clippedWidth;
 
63
  /** \brief Distance in pixels from clippedYMin to clippedYMax  */
 
64
  int clippedHeight;
 
65
  /** \brief Coordinate (in geographic coordinate system) of top left corner of the part of the raster that
 
66
   * is to be rendered.*/
 
67
  QgsPoint topLeftPoint;
 
68
  /** \brief Coordinate (in geographic coordinate system) of bottom right corner of the part of the raster that
 
69
   * is to be rendered.*/
 
70
  QgsPoint bottomRightPoint;
 
71
  /** \brief Distance in map units from left edge to right edge for the part of the raster that
 
72
   * is to be rendered.*/
 
73
  int drawableAreaXDim;
 
74
  /** \brief Distance in map units from bottom edge to top edge for the part of the raster that
 
75
   * is to be rendered.*/
 
76
  int drawableAreaYDim;
 
77
};
 
78
 
 
79
#endif //QGSRASTERVIEWPORT_H