/******************************************************************************
** Copyright (C) 2001, University of Alabama in Huntsville. All rights 
** reserved.
**
** File   : Drawable.cpp
**
** Author : Satish Hota
**
** Description:
**    This file provides implementation for CDrawable class.
**
** History:
** 28-Nov-01 Satish Hota
**     File Created.  There existed a class by the same name earlier and it
**     renamed to CDrawableElement.  Some of the common methods and member
**     variables have been pulled out of CDrawableElement and have been 
**     included in the CDrawable class.  This class now serves as a super-class
**     for CDrawableElement class and CDrawableComposite class.
** 30-Nov-01 Satish Hota
**     Initialized member variables in the constructor.
******************************************************************************/

#include "stdafx.h"
#include "ConGraT.h"
#include "Drawable.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CDrawable::CDrawable()
{
    m_nFromX = 0;
    m_nFromY = 0;
    m_nToX = 0;
    m_nToY = 0;
}

CDrawable::~CDrawable()
{

}

/*******************************************************************
** Name: CDrawable::Draw
**
** Description:
** This method is used to draw the CGConstructs.  However, it is defined
** as a virtual method in this class and will be implemented in its
** sub-classes.
**
** Arguments:
**     None
**
** Returns:
**   CG_S_OK : Success
**
** Exceptions:
**   None
********************************************************************/
long CDrawable::Draw()
{
    return CG_S_OK;
}

void CDrawable::GetFromLocation(int *pnFromX, int *pnFromY)
{
    *pnFromX = m_nFromX;
    *pnFromY = m_nFromY;
}

void CDrawable::GetToLocation(int *pnToX, int *pnToY)
{
    *pnToX = m_nToX;
    *pnToY = m_nToY;
}

