color.h File Reference

Color Class Implementation. More...

#include <math.h>
#include <cassert>
#include "gamma.h"
#include <synfig/string.h>
#include "angle.h"

Go to the source code of this file.

Namespaces

namespace  synfig

Classes

class  synfig::Color

Defines

#define use_colorspace_gamma()   App::use_colorspace_gamma
#define colorspace_gamma()   (2.2f)
#define gamma_in(x)   ((x>=0) ? pow((float)x,1.0f/colorspace_gamma()) : -pow((float)-x,1.0f/colorspace_gamma()))
#define gamma_out(x)   ((x>=0) ? pow((float)x, colorspace_gamma()) : -pow((float)-x, colorspace_gamma()))
#define FLAGS(x, y)   (((x)&(y))==(y))

Typedefs

typedef float synfig::ColorReal
typedef Color synfig::ColorAccumulator

Enumerations

enum  synfig::PixelFormat {
  synfig::PF_RGB = 0, synfig::PF_GRAY = (1<<0), synfig::PF_A = (1<<1), synfig::PF_Z = (1<<2),
  synfig::PF_BGR = (1<<3), synfig::PF_A_START = (1<<4), synfig::PF_Z_START = (1<<5), synfig::PF_ZA = (1<<6),
  synfig::PF_A_INV = (1<<7), synfig::PF_Z_INV = (1<<8), synfig::PF_RAW_COLOR = (1<<9)+(1<<1)
}

Functions

PixelFormat synfig::operator| (PixelFormat lhs, PixelFormat rhs)
PixelFormat synfig::operator & (PixelFormat lhs, PixelFormat rhs)
int synfig::channels (PixelFormat x)
 Returns the number of channels that the given PixelFormat calls for.
unsigned char * synfig::Color2PixelFormat (const Color &color, const PixelFormat &pf, unsigned char *out, const Gamma &gamma)
void synfig::convert_color_format (unsigned char *dest, const Color *src, int w, PixelFormat pf, const Gamma &gamma)
const unsigned char * synfig::PixelFormat2Color (Color &color, const PixelFormat &pf, const unsigned char *out)

Variables

static const float synfig::EncodeYUV [3][3]
static const float synfig::DecodeYUV [3][3]


Detailed Description

Color Class Implementation.

$Id$


Define Documentation

 
#define use_colorspace_gamma (  )     App::use_colorspace_gamma

 
#define colorspace_gamma (  )     (2.2f)

#define gamma_in (  )     ((x>=0) ? pow((float)x,1.0f/colorspace_gamma()) : -pow((float)-x,1.0f/colorspace_gamma()))

#define gamma_out (  )     ((x>=0) ? pow((float)x, colorspace_gamma()) : -pow((float)-x, colorspace_gamma()))

#define FLAGS ( x,
 )     (((x)&(y))==(y))


Generated on Fri Jul 31 00:01:56 2009 for synfig-core by  doxygen 1.5.6