-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_bitmap.cpp
** \brief Template Header
**
** $Id: layer_bitmap.cpp,v 1.2 2005/01/24 03:08:18 darco Exp $
**
** \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
*/
/* ========================================================================= */
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === M E T H O D S ======================================================= */
-sinfg::Layer_Bitmap::Layer_Bitmap():
+synfig::Layer_Bitmap::Layer_Bitmap():
Layer_Composite (1.0,Color::BLEND_COMPOSITE),
tl (-0.5,0.5),
br (0.5,-0.5),
}
bool
-sinfg::Layer_Bitmap::set_param(const String & param, ValueBase value)
+synfig::Layer_Bitmap::set_param(const String & param, ValueBase value)
{
IMPORT(tl);
IMPORT(br);
}
ValueBase
-sinfg::Layer_Bitmap::get_param(const String & param)const
+synfig::Layer_Bitmap::get_param(const String & param)const
{
EXPORT(tl);
EXPORT(br);
return ret;
}
-sinfg::Layer::Handle
-Layer_Bitmap::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Layer_Bitmap::hit_check(synfig::Context context, const synfig::Point &pos)const
{
Point surface_pos;
surface_pos=pos-tl;
inline
const Color&
-sinfg::Layer_Bitmap::filter(const Color& c)const
+synfig::Layer_Bitmap::filter(const Color& c)const
{
if(gamma_adjust==1.0)
return c;
}
Color
-sinfg::Layer_Bitmap::get_color(Context context, const Point &pos)const
+synfig::Layer_Bitmap::get_color(Context context, const Point &pos)const
{
Point surface_pos;
//perhaps use a DDA algorithm... if faster...
// will still want pixel fractions to be floating point since colors are
- //sinfg::info("xstart:%d ystart:%d xend:%d yend:%d",x_start,y_start,x_end,y_end);
+ //synfig::info("xstart:%d ystart:%d xend:%d yend:%d",x_start,y_start,x_end,y_end);
//start drawing at the start of the bitmap (either origin or corner of input...)
//and get other info
if(indx > 1.7 || indy > 1.7)
{
- /*sinfg::info("Decided to downsample? ratios - (%f,%f) -> (%d,%d)",
+ /*synfig::info("Decided to downsample? ratios - (%f,%f) -> (%d,%d)",
indx, indy, multw, multh); */
//use sample rect here...
}
//Color c = (*out_surface)[0][0];
- //sinfg::info("ValueBase of first pixel = (%f,%f,%f,%f)",c.get_r(),c.get_g(),c.get_b(),c.get_a());
+ //synfig::info("ValueBase of first pixel = (%f,%f,%f,%f)",c.get_r(),c.get_g(),c.get_b(),c.get_a());
return true;
}
//perform normal interpolation
if(interp==0)
{
- //sinfg::info("Decided to do nearest neighbor");
+ //synfig::info("Decided to do nearest neighbor");
float iny, inx;
int x,y;