Author: Diego Barrios Romero <eldr...@eldruin.com>
Date:   Thu Mar 15 20:55:07 2012 +0100

Pixel format color transformation correction

The methods SetZ and GetZ don't exist and haven't ever existed as far as
the repository history goes.
Whoever corrected the lines forgot to delete the pointer in the increments

---

 synfig-core/src/synfig/color.h |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/synfig-core/src/synfig/color.h b/synfig-core/src/synfig/color.h
index 82657d9..6ec369a 100644
--- a/synfig-core/src/synfig/color.h
+++ b/synfig-core/src/synfig/color.h
@@ -781,7 +781,7 @@ Color2PixelFormat(const Color &color, const PixelFormat 
&pf, unsigned char *out,
        if(FLAGS(pf,PF_ZA|PF_A_START|PF_Z_START))
        {
                if(FLAGS(pf,PF_Z_START))
-                       *out++/*=(unsigned char)(color.GetZ()*255.0f)*/;
+                       out++;
                if(FLAGS(pf,PF_A_START))
                        *out++=static_cast<unsigned char>(alpha);
        }
@@ -790,8 +790,7 @@ Color2PixelFormat(const Color &color, const PixelFormat 
&pf, unsigned char *out,
                if(FLAGS(pf,PF_A_START))
                        *out++=static_cast<unsigned char>(alpha);
                if(FLAGS(pf,PF_Z_START))
-                       *out++/*=(unsigned char)(color.GetZ()*255.0f)*/;
-
+                       out++;
        }
 
        if(FLAGS(pf,PF_GRAY))
@@ -815,14 +814,14 @@ Color2PixelFormat(const Color &color, const PixelFormat 
&pf, unsigned char *out,
        if(FLAGS(pf,PF_ZA))
        {
                if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z))
-                       out++;//*out++=(unsigned char)(color.GetZ()*255.0f);
+                       out++;
                if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A))
                        *out++=static_cast<unsigned char>(alpha);
        }
        else
        {
                if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z))
-                       out++;//*out++=(unsigned char)(color.GetZ()*255.0f);
+                       out++;
                if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A))
                        *out++=static_cast<unsigned char>(alpha);
        }
@@ -843,7 +842,7 @@ PixelFormat2Color(Color &color, const PixelFormat &pf,const 
unsigned char *out)
        if(FLAGS(pf,PF_ZA|PF_A_START|PF_Z_START))
        {
                if(FLAGS(pf,PF_Z_START))
-                       out++;//color.SetZ((Color::value_type)*out++/255.0f);
+                       out++;
                if(FLAGS(pf,PF_A_START))
                        color.set_a((float)*out++/255);
        }
@@ -852,7 +851,7 @@ PixelFormat2Color(Color &color, const PixelFormat &pf,const 
unsigned char *out)
                if(FLAGS(pf,PF_A_START))
                        color.set_a((float)*out++/255);
                if(FLAGS(pf,PF_Z_START))
-                       out++;//color.SetZ((Color::value_type)*out++/255.0f);
+                       out++;
        }
 
        if(FLAGS(pf,PF_GRAY))
@@ -876,7 +875,7 @@ PixelFormat2Color(Color &color, const PixelFormat &pf,const 
unsigned char *out)
        if(FLAGS(pf,PF_ZA))
        {
                if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z))
-                       out++;//color.SetZ((Color::value_type)*out++/255.0f);
+                       out++;
                if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A))
                        color.set_a((float)*out++/255);
        }
@@ -885,7 +884,7 @@ PixelFormat2Color(Color &color, const PixelFormat &pf,const 
unsigned char *out)
                if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A))
                        color.set_a((float)*out++/255);
                if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z))
-                       out++;//color.SetZ((Color::value_type)*out++/255.0f);
+                       out++;
        }
        return out;
 }


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to