X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fsurface.h;h=265d8d7955e9f75ea832da2e79240d7fce482d27;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=e99771651a6447c6dddb59fdc141f866273a515f;hpb=28f28705612902c15cd0702cc891fba35bf2d2df;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/surface.h b/synfig-core/trunk/src/synfig/surface.h index e997716..265d8d7 100644 --- a/synfig-core/trunk/src/synfig/surface.h +++ b/synfig-core/trunk/src/synfig/surface.h @@ -2,19 +2,20 @@ /*! \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 */ /* ========================================================================= */ @@ -57,9 +58,9 @@ public: { 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); @@ -136,7 +137,7 @@ public: alpha_pen(const etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc > &x): etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc >(x) { } - + alpha_pen(const etl::generic_pen& pen, const Color::value_type &a = 1, const _BlendFunc &func = _BlendFunc()): etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc >(pen,a,func) { }