1 /*---------------------------------------------------------------------------*\
5 * Copyright 2000-2002 by OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
13 * This library is free software; you can redistribute it and/or modify it *
14 * under the terms of the GNU Library General Public License as published *
15 * by the Free Software Foundation, version 2. *
17 * This library is distributed in the hope that it will be useful, but *
18 * WITHOUT ANY WARRANTY; without even the implied warranty of *
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
20 * Library General Public License for more details. *
22 * You should have received a copy of the GNU Library General Public *
23 * License along with this library; if not, write to the Free Software *
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
39 /*------------------------------- size ----------------------------------*/
41 /*! Calculate the width of the viewport in Pixel.
45 Int32 Viewport::calcPixelWidth(void) const
47 return calcPixelRight() - calcPixelLeft() + 1;
50 /*! Calculate the height of the viewport in Pixel.
54 Int32 Viewport::calcPixelHeight(void) const
56 return calcPixelTop() - calcPixelBottom() + 1;
61 Int32 Viewport::getPixelLeft(void) const
63 return calcPixelLeft();
67 Int32 Viewport::getPixelRight(void) const
69 return calcPixelRight();
73 Int32 Viewport::getPixelBottom(void) const
75 return calcPixelBottom();
79 Int32 Viewport::getPixelTop(void) const
81 return calcPixelTop();
85 Int32 Viewport::getPixelWidth(void) const
87 return calcPixelWidth();
91 Int32 Viewport::getPixelHeight(void) const
93 return calcPixelHeight();
97 bool Viewport::isFullWindow(void) const
99 return calcIsFullWindow();
104 void Viewport::getNormalizedCoordinates( Real32 &normX,
107 const Int32 vpY ) const
109 return calcNormalizedCoordinates(normX, normY, vpX, vpY);
113 /*---------------------------- properties ---------------------------------*/