char *buffer;
std::string ret;
int i=vasprintf(&buffer,format,args);
- if (i>-1)
+ if (i>-1)
{
ret=buffer;
free(buffer);
// If we could not find ourselves a better
// clock description, go ahead and use the
-// standard clock() implementation.
+// standard clock() implementation.
// (Better than nothing...)
#include "_clock_system.h"
#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
#else
#warning No realtime clock description found.
#endif
-
+
#else
class clock : public _ETL::clock_base<ETL_CLOCK_DEFAULT_DESC_CLASS> { };
#ifdef ETL_CLOCK_PROCTIME_DESC_CLASS
// <ref_count> -*- C++ -*-
/*! ========================================================================
** Extended Template and Library
-**
+**
** $Id$
**
** Copyright (c) 2002 Robert B. Quattlebaum Jr.
* This include file contains common declarations for the forward and
* inverse DCT modules. These declarations are private to the DCT managers
* (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
- * The individual DCT algorithms are kept in separate files to ease
+ * The individual DCT algorithms are kept in separate files to ease
* machine-dependent tuning (e.g., assembly coding).
*/
/* The decompressor output side may not use these variables. */
int dc_tbl_no; /* DC entropy table selector (0..3) */
int ac_tbl_no; /* AC entropy table selector (0..3) */
-
+
/* Remaining fields should be treated as private by applications. */
-
+
/* These values are computed during compression or decompression startup: */
/* Component's size in DCT blocks.
* Any dummy blocks added to complete an MCU are not counted; therefore
jpeg_component_info * comp_info;
/* comp_info[i] describes component that appears i'th in SOF */
-
+
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
/* ptrs to coefficient quantization tables, or NULL if not defined */
-
+
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
/* ptrs to Huffman coding tables, or NULL if not defined */
-
+
UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
UINT16 X_density; /* Horizontal pixel density */
UINT16 Y_density; /* Vertical pixel density */
boolean write_Adobe_marker; /* should an Adobe marker be written? */
-
+
/* State variable: index of next scanline to be written to
* jpeg_write_scanlines(). Application may use this to control its
* processing loop, e.g., "while (next_scanline < image_height)".
* There are v_samp_factor * DCTSIZE sample rows of each component in an
* "iMCU" (interleaved MCU) row.
*/
-
+
/*
* These fields are valid during any one scan.
* They describe the components and MCUs actually appearing in the scan.
int comps_in_scan; /* # of JPEG components in this scan */
jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
/* *cur_comp_info[i] describes component that appears i'th in SOS */
-
+
JDIMENSION MCUs_per_row; /* # of MCUs across the image */
JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */
-
+
int blocks_in_MCU; /* # of DCT blocks per MCU */
int MCU_membership[C_MAX_BLOCKS_IN_MCU];
/* MCU_membership[i] is index in cur_comp_info of component owning */
#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */
/* Reset error state variables at start of a new image */
JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
-
+
/* The message ID code and any parameters are saved here.
* A message can have one string parameter or up to 8 int parameters.
*/
int i[8];
char s[JMSG_STR_PARM_MAX];
} msg_parm;
-
+
/* Standard state variables for error facility */
-
+
int trace_level; /* max msg_level that will be displayed */
-
+
/* For recoverable corrupt-data errors, we emit a warning message,
* but keep going unless emit_message chooses to abort. emit_message
* should count warnings in num_warnings. The surrounding application
/* Short forms of external names for systems with brain-damaged linkers.
* We shorten external names to be unique in the first six letters, which
* is good enough for all known systems.
- * (If your compiler itself needs names to be unique in less than 15
+ * (If your compiler itself needs names to be unique in less than 15
* characters, you are out of luck. Get a better compiler.)
*/
BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ;
BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ;
-BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
+BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor);
BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
int iWidth, int iHeight, png_color BkgColor);
use, see the copyright/license/disclaimer notice in png.h
As a PNG .dll demo VisualPng is finished. More features would only hinder
-the program's objective. However, further extensions (like support for other
-graphics formats) are in development. To get these, or for pre-compiled
+the program's objective. However, further extensions (like support for other
+graphics formats) are in development. To get these, or for pre-compiled
binaries, go to "http://www.schaik.com/png/visualpng.html".
------------------------------------------------------------------------
#define IDM_HELP_ABOUT 40008
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 113
* 'Cygwin' defines/defaults:
* PNG_BUILD_DLL -- (ignored) building the dll
* (no define) -- (ignored) building an application, linking to the dll
- * PNG_STATIC -- (ignored) building the static lib, or building an
+ * PNG_STATIC -- (ignored) building the static lib, or building an
* application that links to the static lib.
- * ALL_STATIC -- (ignored) building various static libs, or building an
+ * ALL_STATIC -- (ignored) building various static libs, or building an
* application that links to the static libs.
* Thus,
* a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
* PNG_BUILD_DLL
* PNG_STATIC
* (nothing) == PNG_USE_DLL
- *
+ *
* CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
- * of auto-import in binutils, we no longer need to worry about
+ * of auto-import in binutils, we no longer need to worry about
* __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
* we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
- * to __declspec() stuff. However, we DO need to worry about
+ * to __declspec() stuff. However, we DO need to worry about
* PNG_BUILD_DLL and PNG_STATIC because those change some defaults
* such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
*/
# if !defined(PNG_DLL)
# define PNG_DLL
# endif
-# endif
-# endif
+# endif
+# endif
# endif
#endif
# define PNG_EASY_ACCESS_SUPPORTED
#endif
-/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
+/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
# define PNGAPI __cdecl
# undef PNG_IMPEXP
# define PNG_IMPEXP
-#endif
+#endif
/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
* you may get warnings regarding the linkage of png_zalloc and png_zfree.
# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
#endif
#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
-# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
+# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
#endif
/* Set this in the makefile for VC++ on Pentium, not here. */
return 1;
}
//---------------------------------------------------------------------------
-
\ No newline at end of file
return 1;
}
//---------------------------------------------------------------------------
-
\ No newline at end of file
0) On the main menu, select "File | Open Workspace" and then
select "libpng.dsw".
-1) On the main menu Select "Build | Set Active configuration".
- Among the configurations beginning with "libpng" select the
+1) On the main menu Select "Build | Set Active configuration".
+ Among the configurations beginning with "libpng" select the
one you wish to build (the corresponding "zlib" configuration
will be built automatically).
libpng13b.dll (C + Assembler debug version)
libpng13d.dll (C code debug version)
libpng13vb.dll (version for VB, uses "stdcall" protocol)
- libpng13[c,e-m].dll (reserved for official versions)
+ libpng13[c,e-m].dll (reserved for official versions)
libpng13[n-z].dll (available for private versions)
zlib.dll (default version, currently C code only)
zlibd.dll (debug version)
If you change anything in libpng, or select different compiler settings,
please change the library name to an unreserved name, and define
DLLFNAME_POSTFIX and (PRIVATEBUILD or SPECIALBUILD) accordingly. DLLFNAME_POSTFIX
-should correspond to a string in the range of "N" to "Z" depending on the letter
+should correspond to a string in the range of "N" to "Z" depending on the letter
you choose for your private version.
All DLLs built by this project use the Microsoft dynamic C runtime library
MSVCRT.DLL (MSVCRTD.DLL for debug versions). If you distribute any of the
above mentioned libraries you should also include this DLL in your package.
For a list of files that are redistributable in Visual C++ 6.0, see
-Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CDs.
+Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CDs.
5) For an example workspace that builds an application using the resulting
DLLs, go to Libpng's contrib\msvctest directory and use it to build
Sampling - samples a texture map as part of the color calc process.
Behind - use result(s) below to calculate color.
- Internal -
+ Internal -
Functions/Inputs - CPU generated internal texture maps (uniform)
Dependent - GPU generated texture maps (unknown use...)
Varying - pixel coordinate (in canv-space), texture coordinates for samplers, etc.
For optimized stuff:
- For layer constants that aren't simple calculations (i.e. changing the blend type),
+ For layer constants that aren't simple calculations (i.e. changing the blend type),
we can use global constants (however since OpenGL doesn't allow you to define those
manually, we can probably do it with #defines or the like)... Just in time compiling
(optimized by caching these changes of course) would allow us to operate in an optimal
Coverage Map Based: outline,polygon,region,star,text
and Internal Samplers: import, noise
- - would require CPU side computation of the coverage map/color map
+ - would require CPU side computation of the coverage map/color map
(tiling would be a little more difficult... we'll see how effective it would be...)
Modifiers (algorithmic w/ direct below sample): clamp,colorcorrect (blend also classifies as this)
fclose(file);
return true;
}
-
+
/* === C L A S S E S & S T R U C T S ======================================= */
namespace synfig {
-
+
struct BITMAPFILEHEADER
{
unsigned char bfType[2];
#if defined(WIN32_PIPE_TO_PROCESSES)
string command;
-
+
if(wide_aspect)
command=strprintf("encodedv -w 1 - > \"%s\"\n",filename.c_str());
else
#elif defined(UNIX_PIPE_TO_PROCESSES)
int p[2];
-
+
if (pipe(p)) {
synfig::error(_("Unable to open pipe to encodedv"));
return false;
};
-
+
pid_t pid = fork();
-
+
if (pid == -1) {
synfig::error(_("Unable to open pipe to encodedv"));
return false;
}
-
+
if (pid == 0){
// Child process
// Close pipeout, not needed
synfig::error(_("Unable to open pipe to encodedv"));
return false;
}
-
+
if(wide_aspect)
execlp("encodedv", "encodedv", "-w", "1", "-", (const char *)NULL);
else
#if defined(WIN32_PIPE_TO_PROCESSES)
string command;
-
+
command=strprintf("ffmpeg -ss 00:00:00.%d -i \"%s\" -an -f image2pipe -vcodec ppm -\n",frame,filename.c_str());
-
+
file=popen(command.c_str(),POPEN_BINARY_READ_TYPE);
#elif defined(UNIX_PIPE_TO_PROCESSES)
int p[2];
-
+
if (pipe(p)) {
cerr<<"Unable to open pipe to ffmpeg"<<endl;
return false;
};
-
+
pid = fork();
-
+
if (pid == -1) {
cerr<<"Unable to open pipe to ffmpeg"<<endl;
return false;
}
-
+
if (pid == 0){
// Child process
// Close pipein, not needed
command=strprintf("ffmpeg -f image2pipe -vcodec ppm -an -r %f -i pipe: -loop -hq -title \"%s\" -vcodec mpeg1video -y -- \"%s\"\n",desc.get_frame_rate(),get_canvas()->get_name().c_str(),filename.c_str());
else
command=strprintf("ffmpeg -f image2pipe -vcodec ppm -an -r %f -i pipe: -loop -hq -title \"%s\" -vcodec mpeg1video -y \"%s\"\n",desc.get_frame_rate(),get_canvas()->get_name().c_str(),filename.c_str());
-
+
file=popen(command.c_str(),POPEN_BINARY_WRITE_TYPE);
#elif defined(UNIX_PIPE_TO_PROCESSES)
int p[2];
-
+
if (pipe(p)) {
synfig::error(_("Unable to open pipe to ffmpeg"));
return false;
};
-
+
pid = fork();
-
+
if (pid == -1) {
synfig::error(_("Unable to open pipe to ffmpeg"));
return false;
}
-
+
if (pid == 0){
// Child process
// Close pipeout, not needed
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
** Copyright (c) 2008 Chris Moore
-**
+**
** 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
synfig::warning(string("Outline::sync():")+N_("No vertices in outline " + string("\"") + get_description() + string("\"")));
return;
}
-
+
try {
#if 1
pclose(file);
string command;
-
+
if(filename.find("psd")!=String::npos)
command=strprintf("convert \"%s\" -flatten \"png32:%s\"\n",filename.c_str(),temp_file.c_str());
else
string output="png32:"+temp_file;
pid_t pid = fork();
-
+
if (pid == -1) {
return false;
}
-
+
if (pid == 0){
// Child process
if(filename.find("psd")!=String::npos)
return true;
#else
-
+
#error This code contains tempfile and arbitrary shell command execution vulnerabilities
-
+
if(file)
pclose(file);
#elif defined(UNIX_PIPE_TO_PROCESSES)
int p[2];
-
+
if (pipe(p)) {
if(cb) cb->error(N_(msg));
else synfig::error(N_(msg));
return false;
};
-
+
pid = fork();
-
+
if (pid == -1) {
if(cb) cb->error(N_(msg));
else synfig::error(N_(msg));
return false;
}
-
+
if (pid == 0){
// Child process
// Close pipeout, not needed
context->width, context->height, context->pix_fmt,
SWS_BICUBIC, NULL, NULL, NULL);
- sws_scale(img_convert_ctx, pict->data, pict->linesize,
-
+ sws_scale(img_convert_ctx, pict->data, pict->linesize,
+
0, context->height, encodable->data,
encodable->linesize);
class magickpp_trgt : public synfig::Target_Scanline
{
SYNFIG_TARGET_MODULE_EXT
-
+
private:
-
+
int width, height;
synfig::String filename;
std::vector<Magick::Image> images;
public:
-
+
magickpp_trgt(const char *filename) : filename(filename) { }
virtual ~magickpp_trgt();
{
file=NULL;
buffer=NULL;
- color_buffer=NULL;
- zbuffer=NULL;
+ color_buffer=NULL;
+ zbuffer=NULL;
zbuffer_len=0;
ready=false;
}
bool
mng_trgt::init()
{
- // synfig::info("%s:%d mng_trgt::init()", __FILE__, __LINE__);
+ // synfig::info("%s:%d mng_trgt::init()", __FILE__, __LINE__);
int frame_rate, num_frames, play_time;
int num_layers = 1;
color_buffer=new Color[w];
if (color_buffer == NULL) goto cleanup_on_error;
return true;
-
+
cleanup_on_error:
ready=false;
if (mng != MNG_NULL)
mng_int32 extra2;
mng_pchar errortext;
mng_getlasterror (mng, &severity, &chunkname, &chunkseq, &extra1,&extra2, &errortext);
- synfig::error("mng_trgt: libmng: %s",errortext);
+ synfig::error("mng_trgt: libmng: %s",errortext);
mng_cleanup (&mng);
}
color_buffer = NULL;
}
- return false;
+ return false;
}
void
mng_trgt::end_frame()
{
- // synfig::info("%s:%d mng_trgt::end_frame()", __FILE__, __LINE__);
+ // synfig::info("%s:%d mng_trgt::end_frame()", __FILE__, __LINE__);
if (deflate(&zstream,Z_FINISH) != Z_STREAM_END)
{
bool
mng_trgt::start_frame(synfig::ProgressCallback *callback __attribute__ ((unused)))
{
- // synfig::info("%s:%d mng_trgt::start_frame()", __FILE__, __LINE__);
+ // synfig::info("%s:%d mng_trgt::start_frame()", __FILE__, __LINE__);
if (mng == MNG_NULL)
{
synfig::error("%s:%d mng_putchunk_ihdr()", __FILE__, __LINE__);
return false;
}
-
+
zstream.zalloc = Z_NULL;
zstream.zfree = Z_NULL;
zstream.opaque = Z_NULL;
class mng_trgt : public synfig::Target_Scanline
{
SYNFIG_TARGET_MODULE_EXT
-
+
private:
-
+
FILE *file;
int w,h;
mng_handle mng;
unsigned int zbuffer_len;
public:
-
+
mng_trgt(const char *filename);
virtual ~mng_trgt();
orig_height = height;
trimmed_x = min_x;
trimmed_y = min_y;
-
+
width=max_x-min_x+1;
height=max_y-min_y+1;
synfig::Surface tmp_buffer;
// when loading a version 0.1 canvas, modify constant angle
// waypoints to that they are within 180 degrees of the previous
// waypoint's value
- if (type == ValueBase::TYPE_ANGLE)
+ if (type == ValueBase::TYPE_ANGLE)
{
if (canvas->get_version() == "0.1")
{
// synfig::info("Module::subsys_stop()");
// Module::subsys_stop();
// synfig::info("Exiting");
-
+
#if defined(HAVE_SIGNAL_H) && defined(SIGPIPE)
signal(SIGPIPE, SIG_DFL);
#endif
/* === S Y N F I G ========================================================= */
/*! \file matrix.h
** \brief Matrix definitions for 2D affine transformations
-**
+**
** $Id$
**
** \legal
private:
//! The matrix array
- value_type m00, m01, m02;
- value_type m10, m11, m12;
- value_type m20, m21, m22;
+ value_type m00, m01, m02;
+ value_type m10, m11, m12;
+ value_type m20, m21, m22;
// Index convention
- // 00 01 02
+ // 00 01 02
// 10 11 12
// 20 21 22
// vectors are premultiplied when the matrix transformation is applied
// we consider the vectors as [1]x[3] arrays.
// [1]x[3] * [3]x[3] = [1]x[3]
// vector * matrix = vector
- // In affine transformation matrixes the values of
+ // In affine transformation matrixes the values of
// m02=0, m12=0 and m22=1 for non projective transformations.
public:
//!Deafult constructor makes a identity matrix
- Matrix() {
+ Matrix() {
m00=1.0; m01=0.0; m02=0.0;
m10=0.0; m11=1.0; m12=0.0;
m20=0.0; m21=0.0; m22=1.0;
(*this).set_rotate(a);
}
//!set_identity member. Set an identity matrix
- Matrix &
- set_identity(){
+ Matrix &
+ set_identity(){
m00=1.0; m01=0.0; m02=0.0;
m10=0.0; m11=1.0; m12=0.0;
m20=0.0; m21=0.0; m22=1.0;
//! @param sx Scale by X axis
//! @param sy Scale by Y axis
//! @return A matrix reference filled with the sx, sy values
- Matrix &
+ Matrix &
set_scale(const value_type &sx, const value_type &sy){
m00=sx; m01=0.0; m02=0.0;
m10=0.0; m11=sy; m12=0.0;
//!set_rotate member function. Sets a rotate matrix
//! @param a Rotation angle counterclock wise
//! @return A matrix reference filled with the proper rotation parameters
- Matrix &
+ Matrix &
set_rotate(const Angle &a){
value_type c(Angle::cos(a).get());
value_type s(Angle::sin(a).get());
//!traslate member function. Sets a translate matrix
//! @param t Vector that defines the translation
//! @return A matrix reference filled with the proper translation parameters
- Matrix &
+ Matrix &
set_translate(const Vector &t){
m00=1.0; m01=0.0; m02=0.0;
m10=0.0; m11=1.0; m12=0.0;
m20=t[0]; m21=t[1]; m22=1.0;
return (*this);
}
-
+
//!get_transformed member function.
//! @param v 2D Vector to transform
//! @return The Vector result
- Vector
+ Vector
get_transformed(const Vector &v){
- return Vector(v[0]*m00+v[1]*m10+m20,v[0]*m01+v[1]*m11+m21);
+ return Vector(v[0]*m00+v[1]*m10+m20,v[0]*m01+v[1]*m11+m21);
}
-
+
//! operator *. Multiplication of one matrix by other
//! @param rhs the right hand side of the multiplication operation
//! @return the resulting multiplication matrix
Matrix ret;
ret.m00=m00*rhs.m00 + m01*rhs.m10 + m02*rhs.m20;
ret.m01=m00*rhs.m01 + m01*rhs.m11 + m02*rhs.m21;
- ret.m02=m00*rhs.m02 + m01*rhs.m12 + m02*rhs.m22;
-
+ ret.m02=m00*rhs.m02 + m01*rhs.m12 + m02*rhs.m22;
+
ret.m10=m10*rhs.m00 + m11*rhs.m10 + m12*rhs.m20;
ret.m11=m10*rhs.m01 + m11*rhs.m11 + m12*rhs.m21;
- ret.m12=m10*rhs.m02 + m11*rhs.m12 + m12*rhs.m22;
-
+ ret.m12=m10*rhs.m02 + m11*rhs.m12 + m12*rhs.m22;
+
ret.m20=m20*rhs.m00 + m21*rhs.m10 + m22*rhs.m20;
ret.m21=m20*rhs.m01 + m21*rhs.m11 + m22*rhs.m21;
- ret.m22=m20*rhs.m02 + m21*rhs.m12 + m22*rhs.m22;
+ ret.m22=m20*rhs.m02 + m21*rhs.m12 + m22*rhs.m22;
return ret;
}
-
+
//! operator *=. Multiplication and assign of one matrix by a number
//! @param rhs the number to multiply by
//! @return the modifed resulting multiplicated by number matrix
m00*=rhs;
m01*=rhs;
m02*=rhs;
-
+
m10*=rhs;
m11*=rhs;
m12*=rhs;
-
+
m20*=rhs;
m21*=rhs;
m22*=rhs;
//! operator +=. Sum and assign of two matrixes
//! @param rhs the matrix to sum
- //! @return modified matrix with the summed matrix
+ //! @return modified matrix with the summed matrix
Matrix
operator +=(const Matrix &rhs){
m00+=rhs.m00;
m01+=rhs.m01;
m02+=rhs.m02;
-
+
m10+=rhs.m10;
m11+=rhs.m11;
m12+=rhs.m12;
-
+
m20+=rhs.m20;
m21+=rhs.m21;
m22+=rhs.m22;
return *this;
}
-
+
//! operator *. Multiplication of one matrix by a number
//! @param rhs the number to multiply by
//! @return the resulting multiplicated by number matrix
//! operator +=. Sum and assign of two matrixes
//! @param rhs the matrix to sum
- //! @return modified matrix with the summed matrix
+ //! @return modified matrix with the summed matrix
Matrix
operator +(const Matrix &rhs){
return Matrix(*this)+=rhs;
}
-
+
};
}; // END of namespace synfig
PX_DEFINE_FUNC0(signal_changed, sigc::signal<void>)
PX_DEFINE_FUNC0(signal_deleted, sigc::signal<void>)
-
+
PX_DEFINE_FUNC_CONST0(get_parents, NodeList)
PX_DEFINE_FUNC_CONST0(get_children, NodeList)
case TYPE_COLOR: return strprintf("Color (%s)", get(Color()).get_string().c_str());
case TYPE_SEGMENT: return strprintf("Segment ((%f, %f) to (%f, %f))", get(Segment()).p1[0], get(Segment()).p1[1], get(Segment()).p2[0], get(Segment()).p2[1]);
case TYPE_BLINEPOINT: return strprintf("BLinePoint (%s)", get(BLinePoint()).get_vertex()[0], get(BLinePoint()).get_vertex()[1]);
-
+
// All types after this point require construction/destruction
case TYPE_LIST: return strprintf("List (%d elements)", get(list_type()).size());
Real amount = (best_index + best_time + loop_adjust) / (size + loop_adjust);
return amount;
}
-
+
return 0.0;
}
Real epsilon(0.000001);
value = exp(value);
-
+
set_link("link", ValueNode_Const::create(Real(value)));
set_link("epsilon", ValueNode_Const::create(Real(epsilon)));
set_link("infinite", ValueNode_Const::create(Real(infinity)));
return type==ValueBase::TYPE_REAL;
}
-
+
void (*notify) (void *arg, void *data),
void *notify_data);
-extern Bool DRIDestroySurface(ScreenPtr pScreen,
+extern Bool DRIDestroySurface(ScreenPtr pScreen,
Drawable id,
DrawablePtr pDrawable,
void (*notify) (void *arg, void *data),
artists.push_back("Chris Norman (pixelgeek)");
artists.push_back("Daniel Hornung (rubikcube)");
artists.push_back("Franco Iacomella (Yaco)");
-
+
set_artists(artists);
// TRANSLATORS: change this to your name, separate multiple names with \n
#ifdef SHOW_EXTRA_INFO
string extra_info = get_comments() + "\n";
-
+
#ifdef DEVEL_VERSION
extra_info += strprintf(_("\nDevelopment version:\n%s\n"),DEVEL_VERSION);
#endif
-
+
extra_info += "\n";
-
+
extra_info += strprintf(_("Built on %s" /* at %s */ "\n"), __DATE__ /* , __TIME__ */ );
extra_info += "\n";
/* === C L A S S E S & S T R U C T S ======================================= */
-#
+#
namespace studio {
void close(int);
void on_link_clicked(Gtk::AboutDialog&, const Glib::ustring &url);
};
-
+
}; // END of namespace studio
/* === E N D =============================================================== */
value=strprintf("%s",App::predefined_size.c_str());
return true;
}
-
+
return synfigapp::Settings::get_value(key,value);
}
ret.push_back("custom_filename_prefix");
ret.push_back("preferred_x_size");
ret.push_back("preferred_y_size");
- ret.push_back("predefined_size");
+ ret.push_back("predefined_size");
return ret;
}
};
delete auto_recover;
delete about;
-
+
toolbox->hide();
// studio::App::iteration(false);
try { Glib::spawn_async(".", command_line, Glib::SPAWN_SEARCH_PATH); }
// Failed, move on to the next one
catch(Glib::SpawnError& exception){ continue; }
- return true; // No exception means we succeeded!
+ return true; // No exception means we succeeded!
}
}
if (warnings != "")
dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str()));
-
+
if (as.find(custom_filename_prefix.c_str()) != 0)
add_recent_file(as);
toggle_resize_imported_images(_("Scale New Imported Images to Fit Canvas")),
adj_pref_x_size(480,1,10000,1,10,0),
adj_pref_y_size(270,1,10000,1,10,0)
-
+
{
// Setup the buttons
// Document - New Document X size
Gtk::SpinButton* pref_x_size_spinbutton(manage(new Gtk::SpinButton(adj_pref_x_size,1,0)));
attach_label(document_table,_("New Document X size"),1, xpadding, ypadding);
- document_table->attach(*pref_x_size_spinbutton, 1, 2, 1, 2,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding);
+ document_table->attach(*pref_x_size_spinbutton, 1, 2, 1, 2,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding);
tooltips_.set_tip(*pref_x_size_spinbutton,_("Width in pixels of the new created document"));
-
+
// Document - New Document Y size
Gtk::SpinButton* pref_y_size_spinbutton(manage(new Gtk::SpinButton(adj_pref_y_size,1,0)));
attach_label(document_table,_("New Document Y size"),2, xpadding, ypadding);
- document_table->attach(*pref_y_size_spinbutton, 1, 2, 2, 3,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding);
+ document_table->attach(*pref_y_size_spinbutton, 1, 2, 2, 3,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding);
tooltips_.set_tip(*pref_y_size_spinbutton,_("High in pixels of the new created document"));
//Document - Template for predefined sizes of canvases.
// Set the preferred new Document Y dimension
App::preferred_y_size=int(adj_pref_y_size.get_value());
-
+
// Set the preferred Predefined size
App::predefined_size=size_template_combo->get_active_text();
Dialog_Setup::on_size_template_combo_change()
{
String selection(size_template_combo->get_active_text());
- if(selection==DEFAULT_PREDEFINED_SIZE)
+ if(selection==DEFAULT_PREDEFINED_SIZE)
{
return;
}
// Refresh the preferred new Document X dimension
adj_pref_x_size.set_value(App::preferred_x_size);
-
+
// Refresh the preferred new Document Y dimension
adj_pref_y_size.set_value(App::preferred_y_size);
-
+
// Refresh the preferred Predefined size
size_template_combo->set_active_text(App::predefined_size);
}
Gtk::CheckButton toggle_resize_imported_images;
Gtk::Entry textbox_browser_command;
-
+
Gtk::ComboBoxText* size_template_combo;
Gtk::Entry textbox_custom_filename_prefix;
Gtk::Adjustment adj_pref_x_size;
row_height = atoi(getenv("SYNFIG_TIMETRACK_ROW_HEIGHT"));
if (row_height < 3)
row_height = 18;
-
+
cellrenderer_time_track->set_fixed_size(-1,row_height);
}
}
{
//// debug actions
// synfig::info("%s:%d process_action: '%s'", __FILE__, __LINE__, name.c_str());
-
+
assert(synfigapp::Action::book().count(name));
synfigapp::Action::BookEntry entry(synfigapp::Action::book().find(name)->second);
// button_duplicate->signal_clicked().connect(sigc::mem_fun(*this, &studio::LayerTree::on_duplicate_pressed));
// button_encapsulate->signal_clicked().connect(sigc::mem_fun(*this, &studio::LayerTree::on_encapsulate_pressed));
// button_delete->signal_clicked().connect(sigc::mem_fun(*this, &studio::LayerTree::on_delete_pressed));
-
+
button_raise->set_sensitive(false);
button_lower->set_sensitive(false);
button_duplicate->set_sensitive(false);
// synfig::info(__FILE__":%d: value_prev 0x%08X:%d",__LINE__,value_prev.get_parent_value_node().get(),value_prev.get_index());
// synfig::info(__FILE__":%d: value_desc 0x%08X:%d",__LINE__,value_desc.get_parent_value_node().get(),value_desc.get_index());
// synfig::info(__FILE__":%d: value_next 0x%08X:%d",__LINE__,value_next.get_parent_value_node().get(),value_next.get_index());
-
+
/*
if(value_prev.parent_is_value_node() && value_desc.parent_is_value_node() && value_next.parent_is_value_node())
{
// (*(value_desc.get_parent_value_node()))(get_time()).get_loop()
// // value_desc.get_value_node().get_loop(),
// );
- //
+ //
// // Fill in missing vertices
// // \todo take loops into account: seeing (15, 2, 3, 4) probably means that (0, 1) is missing, not 14 through 3
// if(value_desc.get_index()<value_next.get_index()-1)
set_value_(canvas);
return;
}
-
+
Canvas::Handle new_canvas;
try
{
} else {
x = float(event->button.x);
}
-
+
float pos(x/width);
if(pos<0 || x<=0)pos=0;
if(pos>1)pos=1;
else
{
adj_timescale->set_lower(start - (orig_t-t));
- adj_timescale->set_upper(start - (orig_t-t) + (end-start));
+ adj_timescale->set_upper(start - (orig_t-t) + (end-start));
}
}
}
drawing_area->queue_draw_area( 0, 0, 1, maxy);
drawing_area->queue_draw_area(maxx-dx, 0, maxx-dx, maxy);
}
- else if (dx < 0)
+ else if (dx < 0)
{
drawing_area->queue_draw_area( maxx, 0, maxx, maxy);
drawing_area->queue_draw_area( -dx, 0, -dx, maxy);
drawing_area->queue_draw_area(0, 0, maxx, 1);
drawing_area->queue_draw_area(0, maxy-dy, maxx, maxy-dy);
}
- else if (dy < 0)
+ else if (dy < 0)
{
drawing_area->queue_draw_area(0, maxy, maxx, maxy);
drawing_area->queue_draw_area(0, -dy, maxx, -dy);
//synfig::info("queue_render_preview(): (re)queuing...");
//render_idle_func_id=g_idle_add_full(G_PRIORITY_DEFAULT,__render_preview,this,NULL);
render_idle_func_id=g_timeout_add_full(
- G_PRIORITY_DEFAULT, // priority -
+ G_PRIORITY_DEFAULT, // priority -
queue_time, // interval - the time between calls to the function, in milliseconds (1/1000ths of a second)
__render_preview, // function - function to call
this, // data - data to pass to function
{
//// debug actions
// synfig::info("%s:%d perform_action: '%s'", __FILE__, __LINE__, action->get_name().c_str());
-
+
handle<UIInterface> uim(get_ui_interface());
assert(action);
// synfig::info("%s:%d no export because exported value node", __FILE__, __LINE__);
// else if (value_desc.get_value_type()==ValueBase::TYPE_CANVAS && !value_desc.get_value().get(Canvas::Handle())->is_inline())
// synfig::info("%s:%d no export because canvas isn't inline", __FILE__, __LINE__);
-
+
return false;
}
return true;
// // so only one algorithm needed for left, middle, or right
// df = (f1 -f2*2 + f3)*(1/2.0f);
// }
-//
+//
// // WARNING -- totally broken
// template < class T >
// inline void FivePointddt(T &df, const T &f1, const T &f2, const T &f3, int bias)
// }*/
// //side ones don't work, use 3 point
// }
-//
+//
// //implement an arbitrary derivative
// //dumb algorithm
// template < class T >
// {
// /*
// Lj(x) = PI_i!=j (x - xi) / PI_i!=j (xj - xi)
-//
+//
// so Lj'(x) = SUM_k PI_i!=j|k (x - xi) / PI_i!=j (xj - xi)
// */
-//
+//
// unsigned int i,j,k,i0,i1;
-//
+//
// Real Lpj,mult,div,tj;
// Real tval = t[indexval];
-//
+//
// //sum k
// for(j=0;j<npoints;++j)
// {
// Lpj = 0;
// div = 1;
// tj = t[j];
-//
+//
// for(k=0;k<npoints;++k)
// {
// if(k != j) //because there is no summand for k == j, since that term is missing from the original equation
// mult *= tval - t[i];
// }
// }
-//
+//
// Lpj += mult; //add into the summation
-//
+//
// //since the ks follow the exact pattern we need for the divisor (use that too)
// div *= tj - t[k];
// }
// }
-//
+//
// //get the actual coefficient
// Lpj /= div;
-//
+//
// //add it in to the equation
// df += f[j]*Lpj;
// }
// Wondering whether the modification of the deriv vector
// using a char* pointer and pointer arithmetric was safe,
// I looked it up...
- //
+ //
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2369.pdf tells me:
- //
+ //
// 23.2.5 Class template vector [vector]
- //
+ //
// [...] The elements of a vector are stored contiguously,
// meaning that if v is a vector<T,Allocator> where T is
// some type other than bool, then it obeys the identity
// &v[n] == &v[0] + n for all 0 <= n < v.size().
- //
+ //
GetFirstDerivatives(ftemp,0,size,(char*)&deriv[0],sizeof(deriv[0]));
//GetSimpleDerivatives(ftemp,0,size,deriv,0,cum_dist);