https://github.com/root-project/root
Tip revision: 8096b12443b4f5e1d7eedab9aede1fcb47a8f17a authored by Unknown Author on 21 May 2001, 14:27:58 UTC
This commit was manufactured by cvs2svn to create tag 'v3-01-03'.
This commit was manufactured by cvs2svn to create tag 'v3-01-03'.
Tip revision: 8096b12
TPoint.h
/* @(#)root/base:$Name$:$Id$ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TPoint
#define ROOT_TPoint
//////////////////////////////////////////////////////////////////////////
// //
// TPoint //
// //
// TPoint implements a 2D screen (device) point (see also TPoints). //
// //
// Don't add in dictionary since that will add a virtual table pointer //
// and that will destroy the data layout of an array of TPoint's which //
// should match the layout of an array of XPoint's (so no extra copying //
// needs to be done in the X11 drawing routines). //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Gtypes
#include "Gtypes.h"
#endif
class TPoint {
public: // for easy access
#ifndef WIN32
SCoord_t fX; //X device coordinate
SCoord_t fY; //Y device coordinate
#else
long fX; //X device coordinate
long fY; //Y device coordinate
#endif
public:
TPoint() : fX(0), fY(0) { }
TPoint(SCoord_t xy) : fX(xy), fY(xy) { }
TPoint(SCoord_t x, SCoord_t y) : fX(x), fY(y) { }
~TPoint() { }
SCoord_t GetX() const { return (SCoord_t)fX; }
SCoord_t GetY() const { return (SCoord_t)fY; }
void SetX(SCoord_t x) { fX = x; }
void SetY(SCoord_t y) { fY = y; }
};
#endif