/*  $Id: surface_generic.h,v 1.15 2004/04/20 13:36:27 sphair Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/

#ifndef header_surface_generic
#define header_surface_generic

#if _MSC_VER > 1000
#pragma once
#endif

#include "API/Core/Math/origin.h"
#include "API/Display/blend_func.h"
#include "API/Core/Math/point.h"

class CL_Surface_Target;

class CL_Surface_Generic
{
//! Construction:
public:
	CL_Surface_Generic(CL_Surface_Target *target);

	virtual ~CL_Surface_Generic();

//! Attributes:
public:
	//: Shared data object between surfaces.
	CL_Surface_Target *target;

	float angle, angle_pitch, angle_yaw;

	float scale_x, scale_y;

	float red, green, blue, alpha;

	CL_BlendFunc blend_src;
	
	CL_BlendFunc blend_dest;

	CL_Pointf translation_hotspot;

	CL_Pointf rotation_hotspot;

	CL_Origin translation_origin;

	CL_Origin rotation_origin;

//! Operations:
public:
	//: Copy assignment operator.
	CL_Surface_Generic &operator =(const CL_Surface_Generic &copy);

	CL_Surface_Generic *copy_on_write();

	void release_ref();

	void add_ref();

//! Implementation:
private:
	int ref_count;
};

#endif
