-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file surface.h
** \brief Surface and Pen Definitions
**
-** $Id: surface.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
+** $Id$
**
** \legal
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
**
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package 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
+** General Public License for more details.
** \endlegal
*/
/* ========================================================================= */
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SURFACE_H
-#define __SINFG_SURFACE_H
+#ifndef __SYNFIG_SURFACE_H
+#define __SYNFIG_SURFACE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Target;
class Target_Scanline;
{
if(!x.get_a())
return Color::alpha();
-
+
const float a(1.0f/x.get_a());
-
+
x.set_r(x.get_r()*a);
x.set_g(x.get_g()*a);
x.set_b(x.get_b()*a);
alpha_pen(const etl::alpha_pen< etl::generic_pen<Color, ColorAccumulator>, Color::value_type, _BlendFunc > &x):
etl::alpha_pen< etl::generic_pen<Color, ColorAccumulator>, Color::value_type, _BlendFunc >(x)
{ }
-
+
alpha_pen(const etl::generic_pen<Color, ColorAccumulator>& pen, const Color::value_type &a = 1, const _BlendFunc &func = _BlendFunc()):
etl::alpha_pen< etl::generic_pen<Color, ColorAccumulator>, Color::value_type, _BlendFunc >(pen,a,func)
{ }
//! Creates a target that will render to \a surface
etl::handle<Target_Scanline> surface_target(Surface *surface);
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */