projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid a warning from g++ 4.3.
[synfig.git]
/
synfig-core
/
trunk
/
src
/
modules
/
lyr_std
/
sphere_distort.cpp
diff --git
a/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp
b/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp
index
40ee9c7
..
7c1024a
100644
(file)
--- a/
synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp
+++ b/
synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp
@@
-1,6
+1,6
@@
/* === S Y N F I G ========================================================= */
/*! \file sphere_distort.cpp
/* === S Y N F I G ========================================================= */
/*! \file sphere_distort.cpp
-** \brief
Sphere Distort File
+** \brief
Implementation of the "Spherize" layer
**
** $Id$
**
**
** $Id$
**
@@
-81,8
+81,7
@@
SYNFIG_LAYER_SET_CVS_ID(Layer_SphereDistort,"$Id$");
/* === E N T R Y P O I N T ================================================= */
Layer_SphereDistort::Layer_SphereDistort()
/* === E N T R Y P O I N T ================================================= */
Layer_SphereDistort::Layer_SphereDistort()
-:Layer_Composite(1.0,Color::BLEND_STRAIGHT),
-center(0,0),
+:center(0,0),
radius(1),
percent(1.0),
type(TYPE_NORMAL),
radius(1),
percent(1.0),
type(TYPE_NORMAL),
@@
-350,7
+349,14
@@
bool Layer_SphereDistort::accelerated_render(Context context,Surface *surface,in
(type == TYPE_DISTV && (sphr.miny >= windr.maxy || windr.miny >= sphr.maxy)) )
{
//synfig::warning("Spherize: Bounding box reject");
(type == TYPE_DISTV && (sphr.miny >= windr.maxy || windr.miny >= sphr.maxy)) )
{
//synfig::warning("Spherize: Bounding box reject");
- return context.accelerated_render(surface,quality,renddesc,cb);
+ if (clip)
+ {
+ surface->set_wh(renddesc.get_w(), renddesc.get_h());
+ surface->clear();
+ return true;
+ }
+ else
+ return context.accelerated_render(surface,quality,renddesc,cb);
}
//synfig::warning("Spherize: Bounding box accept");
}
//synfig::warning("Spherize: Bounding box accept");
@@
-548,6
+554,10
@@
Rect
Layer_SphereDistort::get_bounding_rect()const
{
Rect bounds(Rect::full_plane());
Layer_SphereDistort::get_bounding_rect()const
{
Rect bounds(Rect::full_plane());
+
+ if (clip)
+ return bounds;
+
switch(type)
{
case TYPE_NORMAL:
switch(type)
{
case TYPE_NORMAL: