Enable missing-declarations warning (#643)

Finish ensuring symbols use headers correctly
This commit is contained in:
Campbell Barton 2016-07-22 14:38:33 +10:00 committed by Shinya Kitaoka
parent 0f12b3ee16
commit 8c6c57f1b4
78 changed files with 334 additions and 262 deletions

View file

@ -336,9 +336,11 @@ set(CXX_WARNINGS)
if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_WRITE_STRINGS -Wwrite-strings)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEF -Wundef)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_DECLARATIONS -Wmissing-declarations)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_WRITE_STRINGS -Wwrite-strings)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_DECLARATIONS -Wmissing-declarations)
endif()

View file

@ -661,7 +661,7 @@ double ShadowStyle2::getParamValue(TColorStyle::double_tag, int index) const {
//-----------------------------------------------------------------------------
int nbDiffVerts(const std::vector<TPointD> &pv) {
static int nbDiffVerts(const std::vector<TPointD> &pv) {
std::vector<TPointD> lpv;
bool isMissing[4] = {true, true, true, true};
if (pv.size() == 0) return 0;

View file

@ -23,9 +23,9 @@
#include "tgrammar.h"
const double PI = 4 * atan(1.0);
const double toDeg(double rad) { return rad * 180.0 / PI; }
const double toRad(double deg) { return deg / 180.0 * PI; }
static const double PI = 4 * atan(1.0);
static const double toDeg(double rad) { return rad * 180.0 / PI; }
static const double toRad(double deg) { return deg / 180.0 * PI; }
namespace TSyntax {

View file

@ -41,7 +41,7 @@ void readKey(FILE *f, struct dictentry *parent, TPSDLayerInfo *li);
void readLayer16(FILE *f, struct dictentry *parent, TPSDLayerInfo *li);
//----end forward declarations
char swapByte(unsigned char src) {
static char swapByte(unsigned char src) {
unsigned char out = 0;
for (int i = 0; i < 8; ++i) {
out = out << 1;

View file

@ -744,7 +744,7 @@ void RangeQualifier::fetch(int index, int &argc, char *argv[]) {
}
}
std::ostream &operator<<(std::ostream &out, const RangeQualifier &range) {
static std::ostream &operator<<(std::ostream &out, const RangeQualifier &range) {
return out << "[" << range.getFrom() << ", " << range.getTo() << "]";
}

View file

@ -456,7 +456,7 @@ assert(areAlmostEqual(a*v*v*v+b*v*v+c*v+d, 0.0));
//------------------------------------------------------------------------------
void clusterize(ClusterContainer &clusters, int clustersCount) {
static void clusterize(ClusterContainer &clusters, int clustersCount) {
unsigned int clustersSize = clusters.size();
assert(clustersSize >= 1);
@ -737,8 +737,8 @@ void Cluster::getMeanAxis(KEYER_FLOAT axis[3]) {
//#define METODO_USATO_SU_TOONZ46
void buildPaletteForBlendedImages(std::set<TPixel32> &palette,
const TRaster32P &raster, int maxColorCount) {
static void buildPaletteForBlendedImages(std::set<TPixel32> &palette,
const TRaster32P &raster, int maxColorCount) {
int lx = raster->getLx();
int ly = raster->getLy();

View file

@ -47,17 +47,17 @@ const TPixelGR8 TPixelGR8::Black(0);
const TPixelGR16 TPixelGR16::White(maxChannelValue);
const TPixelGR16 TPixelGR16::Black(0);
std::ostream &operator<<(std::ostream &out, const TPixel32 &pixel) {
static std::ostream &operator<<(std::ostream &out, const TPixel32 &pixel) {
return out << "PixRGBM32(" << (int)pixel.r << ", " << (int)pixel.g << ", "
<< (int)pixel.b << ", " << (int)pixel.m << ")";
}
std::ostream &operator<<(std::ostream &out, const TPixel64 &pixel) {
static std::ostream &operator<<(std::ostream &out, const TPixel64 &pixel) {
return out << "PixRGBM64(" << pixel.r << ", " << pixel.g << ", " << pixel.b
<< ", " << pixel.m << ")";
}
std::ostream &operator<<(std::ostream &out, const TPixelD &pixel) {
static std::ostream &operator<<(std::ostream &out, const TPixelD &pixel) {
return out << "PixD(" << pixel.r << ", " << pixel.g << ", " << pixel.b << ", "
<< pixel.m << ")";
}

View file

@ -83,7 +83,7 @@ inline QString getStr(const TFrameId &id) {
const QString Fmt = "dd MMM yy hh:mm";
QString getLine(int counter, const QDateTime &date,
static QString getLine(int counter, const QDateTime &date,
const set<TFrameId> &frames) {
static QString user;
static QString machine;
@ -127,7 +127,7 @@ QString getLine(int counter, const QDateTime &date,
//--------------------------------------------------------------------
int getCurrentCount(const QString &str) {
static int getCurrentCount(const QString &str) {
if (str == "") return 0;
int from = str.lastIndexOf('#') + 1;

View file

@ -29,9 +29,11 @@ const std::string Tiio::JpgWriterProperties::QUALITY("Quality");
//=========================================================
extern "C" void tnz_error_exit(j_common_ptr cinfo) {
extern "C" {
static void tnz_error_exit(j_common_ptr cinfo) {
// throw "merda";
}
}
#ifdef CICCIO
JMETHOD(void, error_exit, (j_common_ptr cinfo));

View file

@ -527,7 +527,7 @@ void TImageWriter::setProperties(const TPropertyGroup *g) {
//-----------------------------------------------------------
void convertForWriting(TRasterP &ras, const TRasterP &rin, int bpp) {
static void convertForWriting(TRasterP &ras, const TRasterP &rin, int bpp) {
switch (bpp) {
case 1:
case 8:

View file

@ -34,7 +34,7 @@ static TTextureMeshP cloneMesh_(const TTextureMeshP &other) {
return TTextureMeshP(new TTextureMesh(*other));
}
void static_check() {
static void static_check() {
/* input iterator */
static_assert(
std::is_same<std::iterator_traits<

View file

@ -103,8 +103,8 @@ inline double getLinearValue(const TActualDoubleKeyframe &k0,
//---------------------------------------------------------
void truncateSpeeds(double aFrame, double bFrame, TPointD &aSpeedTrunc,
TPointD &bSpeedTrunc) {
static void truncateSpeeds(double aFrame, double bFrame, TPointD &aSpeedTrunc,
TPointD &bSpeedTrunc) {
double deltaX = bFrame - aFrame;
if (aSpeedTrunc.x < 0) aSpeedTrunc.x = 0;
if (bSpeedTrunc.x > 0) bSpeedTrunc.x = 0;

View file

@ -50,7 +50,7 @@ TToneCurveParam::TToneCurveParam() : TParam() {
//---------------------------------------------------------
TParamSetP getClonedParamSet(TParamSetP srcParamSet) {
static TParamSetP getClonedParamSet(TParamSetP srcParamSet) {
TParamSetP dstParamSet = new TParamSet(srcParamSet->getName());
int i;
for (i = 0; i < srcParamSet->getParamCount(); i++) {

View file

@ -3,6 +3,7 @@
#include "trop.h"
#include "loop_macros.h"
#include "tpixelutils.h"
#include "quickputP.h"
#ifndef TNZCORE_LIGHT
#include "tpalette.h"

View file

@ -11,6 +11,11 @@ void quickPut(const TRasterP &dn, const TRasterP &up, const TAffine &aff,
bool doPremultiply = false, bool whiteTransp = false,
bool firstColumn = false, bool doRasterDarkenBlendedView = false);
void quickPut(const TRasterP &dn, const TRasterP &up, const TAffine &aff,
TRop::ResampleFilterType filterType, const TPixel32 &colorScale,
bool doPremultiply, bool whiteTransp, bool firstColumn,
bool doRasterDarkenBlendedView);
void quickResample(const TRasterP &dn, const TRasterP &up, const TAffine &aff,
TRop::ResampleFilterType filterType);

View file

@ -11,7 +11,7 @@
// Conversion functions
//******************************************************************
void do_convert(const TRaster64P &dst, const TRaster32P &src) {
static void do_convert(const TRaster64P &dst, const TRaster32P &src) {
assert(dst->getSize() == src->getSize());
int lx = src->getLx();
for (int y = 0; y < src->getLy(); y++) {
@ -29,7 +29,7 @@ void do_convert(const TRaster64P &dst, const TRaster32P &src) {
//-----------------------------------------------------------------------------
void do_convert(const TRasterGR8P &dst, const TRaster32P &src) {
static void do_convert(const TRasterGR8P &dst, const TRaster32P &src) {
assert(dst->getSize() == src->getSize());
int lx = src->getLx();
@ -45,7 +45,7 @@ void do_convert(const TRasterGR8P &dst, const TRaster32P &src) {
//-----------------------------------------------------------------------------
void do_convert(const TRasterGR16P &dst, const TRaster32P &src) {
static void do_convert(const TRasterGR16P &dst, const TRaster32P &src) {
assert(dst->getSize() == src->getSize());
int lx = src->getLx();
@ -62,7 +62,7 @@ void do_convert(const TRasterGR16P &dst, const TRaster32P &src) {
//-----------------------------------------------------------------------------
void do_convert(const TRasterGR16P &dst, const TRaster64P &src) {
static void do_convert(const TRasterGR16P &dst, const TRaster64P &src) {
assert(dst->getSize() == src->getSize());
int lx = src->getLx();
for (int y = 0; y < src->getLy(); y++) {
@ -79,7 +79,7 @@ void do_convert(const TRasterGR16P &dst, const TRaster64P &src) {
//-----------------------------------------------------------------------------
void do_convert(const TRaster32P &dst, const TRasterGR8P &src) {
static void do_convert(const TRaster32P &dst, const TRasterGR8P &src) {
assert(dst->getSize() == src->getSize());
int lx = src->getLx();
for (int y = 0; y < src->getLy(); y++) {
@ -150,7 +150,7 @@ inline void ditherConvert(TRaster64P inRas, TRaster32P outRas) {
// Obsolete conversion functions
//******************************************************************
void do_convert(const TRasterCM32P &dst, const TRasterGR8P &src) {
static void do_convert(const TRasterCM32P &dst, const TRasterGR8P &src) {
assert(dst->getSize() == src->getSize());
TPixelCM32 bg = TPixelCM32(0, 0, TPixelCM32::getMaxTone());
@ -169,7 +169,7 @@ void do_convert(const TRasterCM32P &dst, const TRasterGR8P &src) {
//-----------------------------------------------------------------------------
void do_convert(const TRasterCM32P &dst, const TRaster32P &src) {
static void do_convert(const TRasterCM32P &dst, const TRaster32P &src) {
assert(dst->getSize() == src->getSize());
TPixelCM32 bg = TPixelCM32(0, 0, TPixelCM32::getMaxTone());
@ -220,7 +220,7 @@ void do_convert(const TRasterCM32P &dst, const TRaster32P &src) {
//-----------------------------------------------------------------------------
void do_convert(const TRasterYUV422P &dst, const TRaster32P &src) {
static void do_convert(const TRasterYUV422P &dst, const TRaster32P &src) {
assert(src->getLx() & 0);
long y1, y2, u, v, u1, u2, v1, v2;
TPixel32 *pix = (TPixel32 *)src->pixels();
@ -271,7 +271,7 @@ void do_convert(const TRasterYUV422P &dst, const TRaster32P &src) {
//-----------------------------------------------------------------------------
void do_convert(const TRaster32P &dst, const TRasterYUV422P &src) {
static void do_convert(const TRaster32P &dst, const TRasterYUV422P &src) {
int long r, g, b, y1, y2, u, v;
TPixel32 *buf = dst->pixels();
const UCHAR *in = src->getRawData();

View file

@ -444,8 +444,8 @@ void doDespeckleGR(const TRasterPT<PIXEL> &ras, int sizeThreshold) {
//----------------------------------------------------
void doDespeckleCM32(const TRasterPT<TPixelCM32> &ras, int sizeThreshold,
bool check) {
static void doDespeckleCM32(const TRasterPT<TPixelCM32> &ras, int sizeThreshold,
bool check) {
TRasterCM32P rasCM(ras);
rasCM->lock();

View file

@ -250,7 +250,7 @@ void do_over(TRasterGR8P rout, const TRaster32P &rup) {
//-----------------------------------------------------------------------------
void do_over(TRaster32P rout, const TRasterGR8P &rup, const TPixel32 &color) {
static void do_over(TRaster32P rout, const TRasterGR8P &rup, const TPixel32 &color) {
assert(rout->getSize() == rup->getSize());
for (int y = rout->getLy(); --y >= 0;) {
TPixel32 *out_pix = rout->pixels(y);

View file

@ -212,8 +212,8 @@ paints[i] = TPixelFloat(paints2[i]);
//-----------------------------------------------------------------------------------------------
void do_convert(const TTile &dst, const TTile &src, const TPaletteP palette,
bool transparencyCheck, bool applyFx) {
static void do_convert(const TTile &dst, const TTile &src, const TPaletteP palette,
bool transparencyCheck, bool applyFx) {
// assert(palette);
// assert(_rasOut && _rasIn);
// assert(rasOut->getSize() == rasIn->getSize());

View file

@ -107,7 +107,7 @@ public:
extern "C" {
void sdl_fill_audio(void *udata, Uint8 *stream, int len) {
static void sdl_fill_audio(void *udata, Uint8 *stream, int len) {
TSoundOutputDeviceImp *_this = (TSoundOutputDeviceImp *)udata;
MyData *myData = _this->m_data;

View file

@ -24,7 +24,7 @@ double VerticalCameraFldUnitConverter::m_factor = 1;
namespace UnitParameters {
std::pair<double, double> dummyCurrentDpiGetter() {
static std::pair<double, double> dummyCurrentDpiGetter() {
return std::make_pair<double, double>(72, 72);
}

View file

@ -1,6 +1,7 @@
#include "tgeometry.h"
#include "cornerdetector.h"
//======================================================================
@ -39,8 +40,8 @@ public:
};
//! Definisce l'operatore meno tra due AlgorithmPointI
AlgorithmPointI operator-(const AlgorithmPointI &op1,
const AlgorithmPointI &op2) {
static AlgorithmPointI operator-(const AlgorithmPointI &op1,
const AlgorithmPointI &op2) {
return AlgorithmPointI(op1.operator-(op2), 0);
}
@ -75,7 +76,7 @@ point_container gPoints;
\param points Vettore di T3DPoints
*/
bool interpolate(const std::vector<T3DPointD> &points) {
static bool interpolate(const std::vector<T3DPointD> &points) {
unsigned int curr, next;
TPointI currStep, xStep, yStep, guideLine;
@ -193,7 +194,7 @@ inline bool isAdmissibleCorner(int currIndex, int precIndex, int nextIndex) {
//----------------------------------------------------------------------
//! Trova i possibili angoli tra i punti di gPoints
void findCornerCandidates() {
static void findCornerCandidates() {
unsigned int curr, prec, next;
curr = gMaxDist;
@ -229,7 +230,7 @@ void findCornerCandidates() {
//----------------------------------------------------------------------
//! Trova gli angoli tra i punti di gPoints
void findCorners(int neighborLimit, std::vector<int> &cornerIndexes) {
static void findCorners(int neighborLimit, std::vector<int> &cornerIndexes) {
unsigned int curr, prec, next;
curr = gMaxDist;

View file

@ -0,0 +1,10 @@
#pragma once
#ifndef CORNERDETECTOR_H
#define CORNERDETECTOR_H
void detectCorners(const std::vector<T3DPointD> &inputPoints, int minSampleNum,
int minDist, int maxDist, double maxAngle,
std::vector<int> &cornerIndexes);
#endif // CORNERDETECTOR_H

View file

@ -537,8 +537,8 @@ void drawQuadratic(const TQuadratic &quad, double pixelSize) {
//-----------------------------------------------------------------------------
void makeOutline(const TStroke *stroke, int startQuad, int endQuad,
outlineBoundary &ob, double error2) {
static void makeOutline(const TStroke *stroke, int startQuad, int endQuad,
outlineBoundary &ob, double error2) {
// std::ofstream cout("c:\\temp\\outline.txt");
assert(stroke);
@ -628,7 +628,7 @@ void makeOutline(const TStroke *stroke, int startQuad, int endQuad,
//-----------------------------------------------------------------------------
void drawOutline(const outlineBoundary &ob, double pixelSize) {
static void drawOutline(const outlineBoundary &ob, double pixelSize) {
for (UINT i = 0; i < ob.size(); ++i) {
drawQuadratic(*ob[i].first, pixelSize);
drawQuadratic(*ob[i].second, pixelSize);

View file

@ -14,6 +14,7 @@
#include "tdebugmessage.h"
#include "tthreadmessage.h"
#include "tl2lautocloser.h"
#include "tcomputeregions.h"
#include <vector>
#include "tcurveutil.h"
@ -46,7 +47,7 @@ inline TThickPoint myRound(const TThickPoint &p) {
return TThickPoint(myRound(p.x), myRound(p.y), p.thick);
}
void roundStroke(TStroke *s) {
static void roundStroke(TStroke *s) {
int size = s->getControlPointCount();
for (int j = 0; j < (int)s->getControlPointCount(); j++) {
@ -411,13 +412,13 @@ void addIntersection(IntersectionData &intData, const vector<VIStroke *> &s,
//-----------------------------------------------------------------------------
bool sortBBox(const TStroke *s1, const TStroke *s2) {
static bool sortBBox(const TStroke *s1, const TStroke *s2) {
return s1->getBBox().x0 < s2->getBBox().x0;
}
//-----------------------------------------------------------------------------
void cleanIntersectionMarks(const VIList<Intersection> &interList) {
static void cleanIntersectionMarks(const VIList<Intersection> &interList) {
Intersection *p;
IntersectedStroke *q;
for (p = interList.first(); p; p = p->next())
@ -435,7 +436,7 @@ void cleanIntersectionMarks(const VIList<Intersection> &interList) {
//-----------------------------------------------------------------------------
void cleanNextIntersection(const VIList<Intersection> &interList, TStroke *s) {
static void cleanNextIntersection(const VIList<Intersection> &interList, TStroke *s) {
Intersection *p;
IntersectedStroke *q;
@ -903,7 +904,7 @@ void TVectorImage::Imp::eraseIntersection(int index) {
}
//-----------------------------------------------------------------------------
void findNearestIntersection(VIList<Intersection> &interList) {
static void findNearestIntersection(VIList<Intersection> &interList) {
Intersection *p1;
IntersectedStroke *p2;
@ -1026,7 +1027,7 @@ void markDeadIntersections(VIList<Intersection> &intList, Intersection *p) {
// se cross val era 0, cerco di spostarmi un po' su w per vedere come sono
// orientate le tangenti agli stroke...
double nearCrossVal(TStroke *s0, double w0, TStroke *s1, double w1) {
static double nearCrossVal(TStroke *s0, double w0, TStroke *s1, double w1) {
double ltot0 = s0->getLength();
double ltot1 = s1->getLength();
double dl = std::min(ltot1, ltot0) / 1000;
@ -1066,7 +1067,7 @@ inline void insertBranch(Intersection &in, IntersectedStroke &item,
//-----------------------------------------------------------------------------
double getAngle(const TPointD &p0, const TPointD &p1) {
static double getAngle(const TPointD &p0, const TPointD &p1) {
double angle1 = atan2(p0.x, p0.y) * M_180_PI;
double angle2 = atan2(p1.x, p1.y) * M_180_PI;
@ -1079,8 +1080,8 @@ double getAngle(const TPointD &p0, const TPointD &p1) {
//-----------------------------------------------------------------------------
// nel caso l'angolo tra due stroke in un certo w sia nullo,
// si va un po' avanti per vedere come sono orientate....
double getNearAngle(const TStroke *s1, double w1, bool out1, const TStroke *s2,
double w2, bool out2) {
static double getNearAngle(const TStroke *s1, double w1, bool out1, const TStroke *s2,
double w2, bool out2) {
bool verse1 = (out1 && w1 < 1) || (!out1 && w1 == 0);
bool verse2 = (out2 && w2 < 1) || (!out2 && w2 == 0);
double ltot1 = s1->getLength();
@ -1105,10 +1106,10 @@ double getNearAngle(const TStroke *s1, double w1, bool out1, const TStroke *s2,
//-----------------------------------------------------------------------------
bool makeEdgeIntersection(Intersection &interList, IntersectedStroke &item1,
IntersectedStroke &item2, const TPointD &p1a,
const TPointD &p1b, const TPointD &p2a,
const TPointD &p2b) {
static bool makeEdgeIntersection(Intersection &interList, IntersectedStroke &item1,
IntersectedStroke &item2, const TPointD &p1a,
const TPointD &p1b, const TPointD &p2a,
const TPointD &p2b) {
double angle1 = getAngle(p1a, p1b);
double angle2 = getAngle(p1a, p2a);
double angle3 = getAngle(p1a, p2b);
@ -1215,9 +1216,9 @@ bool makeEdgeIntersection(Intersection &interList, IntersectedStroke &item1,
//-----------------------------------------------------------------------------
bool makeIntersection(IntersectionData &intData, const vector<VIStroke *> &s,
int ii, int jj, DoublePair inter, int strokeSize,
Intersection &interList) {
static bool makeIntersection(IntersectionData &intData, const vector<VIStroke *> &s,
int ii, int jj, DoublePair inter, int strokeSize,
Intersection &interList) {
IntersectedStroke item1, item2;
interList.m_intersection = s[ii]->m_s->getPoint(inter.first);
@ -1336,9 +1337,9 @@ areAlmostEqual(q->getP2(), p->getP0(), 1e-2))
*/
//-----------------------------------------------------------------------------
bool addAutocloseIntersection(IntersectionData &intData, vector<VIStroke *> &s,
int ii, int jj, double w0, double w1,
int strokeSize, bool isVectorized) {
static bool addAutocloseIntersection(IntersectionData &intData, vector<VIStroke *> &s,
int ii, int jj, double w0, double w1,
int strokeSize, bool isVectorized) {
assert(s[ii]->m_groupId == s[jj]->m_groupId);
Intersection *rp = intData.m_intList.last();
@ -1418,8 +1419,8 @@ bool addAutocloseIntersection(IntersectionData &intData, vector<VIStroke *> &s,
// double g_autocloseTolerance = c_newAutocloseTolerance;
bool isCloseEnoughP2P(double facMin, double facMax, TStroke *s1, double w0,
TStroke *s2, double w1) {
static bool isCloseEnoughP2P(double facMin, double facMax, TStroke *s1, double w0,
TStroke *s2, double w1) {
double autoDistMin, autoDistMax;
TThickPoint p0 = s1->getThickPoint(w0);
@ -1495,9 +1496,9 @@ return false;
*/
//-----------------------------------------------------------------------------
double getCurlW(TStroke *s, bool isBegin) // trova il punto di split su una
// stroke, in prossimita di un
// ricciolo;
static double getCurlW(TStroke *s, bool isBegin) // trova il punto di split su una
// stroke, in prossimita di un
// ricciolo;
// un ricciolo c'e' se la curva ha un min o max relativo su x seguito da uno su
// y, o viceversa.
{
@ -1570,8 +1571,8 @@ return -1;
#endif
//-----------------------------------------------------------------------------
bool isCloseEnoughP2L(double facMin, double facMax, TStroke *s1, double w1,
TStroke *s2, double &w) {
static bool isCloseEnoughP2L(double facMin, double facMax, TStroke *s1, double w1,
TStroke *s2, double &w) {
if (s1->isSelfLoop()) return false;
TThickPoint p0 = s1->getThickPoint(w1);
@ -1880,10 +1881,10 @@ void getClosingPoints(const TRectD &rect, double fac, const TVectorImageP &vi,
//-------------------------------------------------------------------------------------------------------
void autoclose(double factor, vector<VIStroke *> &s, int ii, int jj,
IntersectionData &IntData, int strokeSize,
TL2LAutocloser &l2lautocloser, vector<DoublePair> *intersections,
bool isVectorized) {
static void autoclose(double factor, vector<VIStroke *> &s, int ii, int jj,
IntersectionData &IntData, int strokeSize,
TL2LAutocloser &l2lautocloser, vector<DoublePair> *intersections,
bool isVectorized) {
vector<std::pair<double, double>> segments;
getClosingSegments(l2lautocloser, 0, factor, s[ii]->m_s, s[jj]->m_s,
intersections, segments);
@ -1938,9 +1939,9 @@ TPointD inline getTangent(const IntersectedStroke &item) {
//-----------------------------------------------------------------------------
void addBranch(IntersectionData &intData, VIList<IntersectedStroke> &strokeList,
const vector<VIStroke *> &s, int ii, double w, int strokeSize,
bool gettingOut) {
static void addBranch(IntersectionData &intData, VIList<IntersectedStroke> &strokeList,
const vector<VIStroke *> &s, int ii, double w, int strokeSize,
bool gettingOut) {
IntersectedStroke *p1, *p2;
TPointD tanRef, lastTan;
@ -2055,9 +2056,9 @@ return;
//-----------------------------------------------------------------------------
void addBranches(IntersectionData &intData, Intersection &intersection,
const vector<VIStroke *> &s, int ii, int jj,
DoublePair intersectionPair, int strokeSize) {
static void addBranches(IntersectionData &intData, Intersection &intersection,
const vector<VIStroke *> &s, int ii, int jj,
DoublePair intersectionPair, int strokeSize) {
bool foundS1 = false, foundS2 = false;
IntersectedStroke *p;
@ -2127,9 +2128,9 @@ IntersectedStroke app;
//-----------------------------------------------------------------------------
void addIntersections(IntersectionData &intData, const vector<VIStroke *> &s,
int ii, int jj, vector<DoublePair> &intersections,
int strokeSize, bool isVectorized) {
static void addIntersections(IntersectionData &intData, const vector<VIStroke *> &s,
int ii, int jj, vector<DoublePair> &intersections,
int strokeSize, bool isVectorized) {
for (int k = 0; k < (int)intersections.size(); k++) {
if (ii >= strokeSize && (areAlmostEqual(intersections[k].first, 0.0) ||
areAlmostEqual(intersections[k].first, 1.0)))
@ -2446,8 +2447,8 @@ if (tdistance2(p01, p11)< 2*0.06*0.06)
//-----------------------------------------------------------------------------
// Trova una possibile regione data una lista di punti di intersezione
TRegion *findRegion(VIList<Intersection> &intList, Intersection *p1,
IntersectedStroke *p2, bool minimizeEdges) {
static TRegion *findRegion(VIList<Intersection> &intList, Intersection *p1,
IntersectedStroke *p2, bool minimizeEdges) {
TRegion *r = new TRegion();
int currStyle = 0;
@ -2662,7 +2663,7 @@ void computeRegionFeature(const TRegion &r, TRegionFeatureFormula &formula) {
//----------------------------------------------------------------------------------
bool isValidArea(const TRegion &r) {
static bool isValidArea(const TRegion &r) {
TRegionClockWiseFormula formula;
computeRegionFeature(r, formula);
return formula.isClockwise();
@ -2759,7 +2760,7 @@ void transferColors(const list<TEdge *> &oldList, const list<TEdge *> &newList,
bool isStrokeChanged, bool isFlipped, bool overwriteColor);
//-----------------------------------------------------------------------------
void printStrokes1(vector<VIStroke *> &v, int size) {
static void printStrokes1(vector<VIStroke *> &v, int size) {
UINT i = 0;
ofstream of("C:\\temp\\strokes.txt");

View file

@ -0,0 +1,9 @@
#pragma once
#ifndef T_COMPUTEREGIONS_H
#define T_COMPUTEREGIONS_H
void invalidateRegionPropAndBBox(TRegion *reg);
#endif // T_COMPUTEREGIONS_H

View file

@ -34,7 +34,7 @@ void foo()
//=============================================================================
bool compareEdge(const TEdge &a, const TEdge &b) { return a.m_s == b.m_s; }
static bool compareEdge(const TEdge &a, const TEdge &b) { return a.m_s == b.m_s; }
//-----------------------------------------------------------------------------
@ -527,7 +527,7 @@ void TRegion::draw(const TVectorRenderData &rd)
//-----------------------------------------------------------------------------
void checkPolyline(const std::vector<T3DPointD> &p) {
static void checkPolyline(const std::vector<T3DPointD> &p) {
int ret;
if (p.size() < 3) return;

View file

@ -8,6 +8,7 @@
#include "tbezier.h"
#include "tzerofinder.h"
#include "tcurveutil.h"
#include "cornerdetector.h"
#include <limits>
@ -32,10 +33,6 @@ typedef std::vector<TThickQuadratic *> QuadStrokeChunkArray;
static int numSaved = 0;
void detectCorners(const std::vector<T3DPointD> &points, int minSampleNum,
int minDist, int maxDist, double maxAngle,
std::vector<int> &corners);
namespace {
//---------------------------------------------------------------------------

View file

@ -174,10 +174,10 @@ typedef list<TQuadratic> QuadraticList;
//---------------------------------------------------------------------------
void splitCircularArcIntoQuadraticCurves(const TPointD &Center,
const TPointD &Pstart,
const TPointD &Pend,
vector<TQuadratic *> &quadArray) {
static void splitCircularArcIntoQuadraticCurves(const TPointD &Center,
const TPointD &Pstart,
const TPointD &Pend,
vector<TQuadratic *> &quadArray) {
// It splits a circular anticlockwise arc into a sequence of quadratic bezier
// curves
// Every quadratic curve can approximate an arc no longer than 45 degrees (or
@ -365,7 +365,7 @@ inline void drawPointCross(const TPointD &point, double R, double G, double B) {
//-------------------------------------------------------------------
TStroke *getOutStroke(LinkedQuadraticList &inputBoundaries) {
static TStroke *getOutStroke(LinkedQuadraticList &inputBoundaries) {
vector<TPointD> aux;
LinkedQuadraticList::iterator it = inputBoundaries.begin();
@ -427,8 +427,8 @@ inline bool getOutputOutlines(LinkedQuadraticList &inputBoundaries,
//-------------------------------------------------------------------
bool computeBoundaryStroke(const TStroke &_stroke,
vector<TStroke *> &sweepStrokes) {
static bool computeBoundaryStroke(const TStroke &_stroke,
vector<TStroke *> &sweepStrokes) {
// if(!outlines.empty()) return false;
TStroke *oriStroke = const_cast<TStroke *>(&_stroke);

View file

@ -14,6 +14,7 @@
#include "tpaletteutil.h"
#include "tthreadmessage.h"
#include "tsimplecolorstyles.h"
#include "tcomputeregions.h"
#include <memory>
@ -246,7 +247,7 @@ TRectD TVectorImage::addStroke(const std::vector<TThickPoint> &points)
//-----------------------------------------------------------------------------
bool isRegionWithStroke(TRegion *region, TStroke *s) {
static bool isRegionWithStroke(TRegion *region, TStroke *s) {
for (UINT i = 0; i < region->getEdgeCount(); i++)
if (region->getEdge(i)->m_s == s) return true;
return false;
@ -254,7 +255,7 @@ bool isRegionWithStroke(TRegion *region, TStroke *s) {
//-----------------------------------------------------------------------------
void deleteSubRegionWithStroke(TRegion *region, TStroke *s) {
static void deleteSubRegionWithStroke(TRegion *region, TStroke *s) {
for (int i = 0; i < (int)region->getSubregionCount(); i++) {
deleteSubRegionWithStroke(region->getSubregion(i), s);
if (isRegionWithStroke(region->getSubregion(i), s)) {
@ -1044,7 +1045,6 @@ bool TVectorImage::Imp::areWholeGroups(const std::vector<int> &indexes) const {
//-----------------------------------------------------------------------------
//-------------------------------------------------------------------
void invalidateRegionPropAndBBox(TRegion *reg);
void TVectorImage::Imp::notifyChangedStrokes(
const std::vector<int> &strokeIndexArray,
@ -1938,9 +1938,9 @@ assert(m_strokes[strokeIndex-wSize+1]->m_edgeList.empty());*/
//-----------------------------------------------------------------------------
void computeEdgeList(TStroke *newS, const std::list<TEdge *> &edgeList1,
bool join1AtBegin, const std::list<TEdge *> &edgeList2,
bool join2AtBegin, std::list<TEdge *> &edgeList) {
static void computeEdgeList(TStroke *newS, const std::list<TEdge *> &edgeList1,
bool join1AtBegin, const std::list<TEdge *> &edgeList2,
bool join2AtBegin, std::list<TEdge *> &edgeList) {
std::list<TEdge *>::const_iterator it;
if (!edgeList1.empty()) {

View file

@ -264,7 +264,14 @@ private:
Imp &operator=(const Imp &);
};
// Functions
void addRegion(std::vector<TRegion *> &regionArray, TRegion *region);
void transferColors(const std::list<TEdge *> &oldList,
const std::list<TEdge *> &newList, bool isStrokeChanged,
bool isFlipped, bool overwriteColor);
//=============================================================================
#endif

View file

@ -451,8 +451,8 @@ void TColorStyle::declare(TColorStyle *style) {
//===================================================================
double computeAverageThickness(const TStroke *s, double &minThickness,
double &maxThickness) {
static double computeAverageThickness(const TStroke *s, double &minThickness,
double &maxThickness) {
int count = s->getControlPointCount();
minThickness = 1000;

View file

@ -32,13 +32,13 @@ TNZ_LITTLE_ENDIAN undefined !!
int Tw = 0;
bool areTwEqual(double x, double y) {
static bool areTwEqual(double x, double y) {
assert(Tw != 0);
return (int)(Tw * x) == (int)(Tw * y);
}
bool areTwEqual(TPointD p0, TPointD p1) {
static bool areTwEqual(TPointD p0, TPointD p1) {
assert(Tw != 0);
return areTwEqual(p0.x, p1.x) && areTwEqual(p0.y, p1.y);
@ -184,7 +184,7 @@ public:
TImageP m_img;
};
double computeAverageThickness(const TStroke *s) {
static double computeAverageThickness(const TStroke *s) {
int count = s->getControlPointCount();
double resThick = 0;
int i;
@ -198,8 +198,8 @@ double computeAverageThickness(const TStroke *s) {
return resThick / (s->getControlPointCount() - 4);
}
void putquads(const TStroke *s, double w0, double w1,
std::vector<TQuadratic *> &quads) {
static void putquads(const TStroke *s, double w0, double w1,
std::vector<TQuadratic *> &quads) {
int chunkIndex0, chunkIndex1, i;
double dummy;
bool ret;
@ -216,9 +216,9 @@ void putquads(const TStroke *s, double w0, double w1,
//-------------------------------------------------------------------
void computeOutlineBoundary(std::vector<TStroke *> &outlines,
std::list<FlashPolyline> &polylinesArray,
const TPixel &color) {
static void computeOutlineBoundary(std::vector<TStroke *> &outlines,
std::list<FlashPolyline> &polylinesArray,
const TPixel &color) {
UINT size = polylinesArray.size();
std::vector<std::vector<TQuadratic *>> quads;
@ -273,7 +273,7 @@ bool PolyStyle::operator==(const PolyStyle &p) const {
//-------------------------------------------------------------------
bool affineMinorThen(const TAffine &m0, const TAffine &m1) {
static bool affineMinorThen(const TAffine &m0, const TAffine &m1) {
if (m0.a11 == m1.a11) {
if (m0.a12 == m1.a12) {
if (m0.a13 == m1.a13) {
@ -323,8 +323,8 @@ bool PolyStyle::operator<(const PolyStyle &p) const {
//-------------------------------------------------------------------
void computeQuadChain(const TEdge &e, std::vector<TQuadratic *> &quadArray,
std::vector<TQuadratic *> &toBeDeleted) {
static void computeQuadChain(const TEdge &e, std::vector<TQuadratic *> &quadArray,
std::vector<TQuadratic *> &toBeDeleted) {
int chunk_b, chunk_e, chunk = -1;
double t_b, t_e, w0, w1;
TThickQuadratic *q_b = 0, *q_e = 0;

View file

@ -436,7 +436,7 @@ void tglDraw(const TVectorRenderData &rd, const TStroke *s, bool pushAttribs) {
//------------------------------------------------------------------------------------
void tglDoDraw(const TVectorRenderData &rd, TRegion *r) {
static void tglDoDraw(const TVectorRenderData &rd, TRegion *r) {
bool visible = false;
int colorCount = 0;
if (!r) return;
@ -462,7 +462,7 @@ void tglDoDraw(const TVectorRenderData &rd, TRegion *r) {
//------------------------------------------------------------------------------------
void tglDoDraw(const TVectorRenderData &rd, const TStroke *s) {
static void tglDoDraw(const TVectorRenderData &rd, const TStroke *s) {
bool visible = false;
int colorCount = 0;

View file

@ -18,7 +18,7 @@
//#include "tdebugmessage.h"
//--------------------------------------------------------------------------------------
double average(std::vector<double> &values, double range = 2.5) {
static double average(std::vector<double> &values, double range = 2.5) {
UINT size = values.size();
if (size == 0) return std::numeric_limits<double>::signaling_NaN();
@ -56,8 +56,8 @@ double average(std::vector<double> &values, double range = 2.5) {
//--------------------------------------------------------------------------------------
double weightedAverage(std::vector<double> &values,
std::vector<double> &weights, double range = 2.5) {
static double weightedAverage(std::vector<double> &values,
std::vector<double> &weights, double range = 2.5) {
UINT size = values.size();
if (size == 0) return std::numeric_limits<double>::signaling_NaN();
@ -162,8 +162,8 @@ n^r <= 2^(s-1) < (2^s)-1
//--------------------------------------------------------------------------------------
void eraseSmallAngles(std::vector<std::pair<int, double>> &corners,
double angle) {
static void eraseSmallAngles(std::vector<std::pair<int, double>> &corners,
double angle) {
std::vector<std::pair<int, double>>::iterator it = corners.begin();
while (it != corners.end()) {
@ -180,9 +180,9 @@ void eraseSmallAngles(std::vector<std::pair<int, double>> &corners,
// of the corners)
// max is tha maximum angle greater or equal to minDegree
void detectCorners(const TStroke *stroke, double minDegree,
std::vector<std::pair<int, double>> &corners, double &min,
double &max) {
static void detectCorners(const TStroke *stroke, double minDegree,
std::vector<std::pair<int, double>> &corners, double &min,
double &max) {
const double minSin = fabs(sin(minDegree * M_PI_180));
double angle, vectorialProduct, metaCornerLen, partialLen;
@ -330,7 +330,7 @@ void detectCorners(const TStroke *stroke, double minDegree,
//--------------------------------------------------------------------------------------
double variance(std::vector<double> &values) {
static double variance(std::vector<double> &values) {
UINT size = values.size();
if (size == 0) return std::numeric_limits<double>::signaling_NaN();
@ -352,13 +352,13 @@ double variance(std::vector<double> &values) {
//--------------------------------------------------------------------------------------
void findBestSolution(const TStroke *stroke1, const TStroke *stroke2,
std::pair<int, double> *partialAngles1,
UINT partialAngles1Size,
const std::vector<std::pair<int, double>> &angles2,
UINT r,
std::list<std::pair<int, double>> &partialSolution,
double &bestValue, std::vector<int> &bestVector) {
static void findBestSolution(const TStroke *stroke1, const TStroke *stroke2,
std::pair<int, double> *partialAngles1,
UINT partialAngles1Size,
const std::vector<std::pair<int, double>> &angles2,
UINT r,
std::list<std::pair<int, double>> &partialSolution,
double &bestValue, std::vector<int> &bestVector) {
//-------------------------------------------------------------------
if (r == partialAngles1Size) {
UINT j;
@ -499,10 +499,10 @@ TDebugMessage::flush();
//--------------------------------------------------------------------------------------
void findBestSolution(const TStroke *stroke1, const TStroke *stroke2,
std::vector<std::pair<int, double>> &angles1,
const std::vector<std::pair<int, double>> &angles2,
double &bestValue, std::vector<int> &bestVector) {
static void findBestSolution(const TStroke *stroke1, const TStroke *stroke2,
std::vector<std::pair<int, double>> &angles1,
const std::vector<std::pair<int, double>> &angles2,
double &bestValue, std::vector<int> &bestVector) {
assert(angles1.size() > angles2.size());
std::list<std::pair<int, double>> partialSolution;
@ -513,10 +513,10 @@ void findBestSolution(const TStroke *stroke1, const TStroke *stroke2,
//--------------------------------------------------------------------------------------
void trivialSolution(const TStroke *stroke1, const TStroke *stroke2,
const std::vector<std::pair<int, double>> &angles1,
const std::vector<std::pair<int, double>> &angles2,
std::vector<int> &solution) {
static void trivialSolution(const TStroke *stroke1, const TStroke *stroke2,
const std::vector<std::pair<int, double>> &angles1,
const std::vector<std::pair<int, double>> &angles2,
std::vector<int> &solution) {
assert(angles1.size() > angles2.size());
UINT j;
@ -578,7 +578,7 @@ void trivialSolution(const TStroke *stroke1, const TStroke *stroke2,
//--------------------------------------------------------------------------------------
TStroke *extract(const TStroke *source, UINT firstQuad, UINT lastQuad) {
static TStroke *extract(const TStroke *source, UINT firstQuad, UINT lastQuad) {
UINT quadCount = source->getChunkCount();
if (firstQuad >= quadCount) {
assert(!"bad quadric index");
@ -607,8 +607,8 @@ TStroke *extract(const TStroke *source, UINT firstQuad, UINT lastQuad) {
//--------------------------------------------------------------------------------------
void sample(const TStroke *stroke, int samplingSize,
std::vector<TPointD> &sampledPoint) {
static void sample(const TStroke *stroke, int samplingSize,
std::vector<TPointD> &sampledPoint) {
double samplingFrequency = 1.0 / (double)samplingSize;
sampledPoint.resize(samplingSize);

View file

@ -485,7 +485,7 @@ Bool ret = glXMakeCurrent(m_dpy,
int getLy() const { return m_raster->getLy(); }
};
std::shared_ptr<TOfflineGL::Imp> defaultOfflineGLGenerator(
static std::shared_ptr<TOfflineGL::Imp> defaultOfflineGLGenerator(
const TDimension &dim, std::shared_ptr<TOfflineGL::Imp> shared) {
return std::make_shared<QtOfflineGL>(dim, shared);
}

View file

@ -40,7 +40,7 @@ TFilePath TVectorImagePatternStrokeStyle::m_rootDir = TFilePath();
//-----------------------------------------------------------------------------
#ifndef NDEBUG
void checkGlError() {
static void checkGlError() {
GLenum err = glGetError();
assert(err != GL_INVALID_ENUM);
assert(err != GL_INVALID_VALUE);

View file

@ -53,20 +53,23 @@ TglTessellator::GLTess::~GLTess() { gluDeleteTess(m_tess); }
namespace {
extern "C" void CALLBACK tessellateTexture(const GLdouble *tex) {
extern "C" {
static void CALLBACK tessellateTexture(const GLdouble *tex) {
double u = tex[0] * 0.01;
double v = tex[1] * 0.01;
glTexCoord2d(u, v);
glVertex2dv(tex);
}
}
//-------------------------------------------------------------------
TThread::Mutex CombineDataGuard;
std::list<GLdouble *> Combine_data;
static std::list<GLdouble *> Combine_data;
extern "C" void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4],
extern "C" {
static void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4],
GLfloat w[4], GLdouble **dataOut) {
GLdouble *newCoords = new GLdouble[3];
@ -76,6 +79,7 @@ extern "C" void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4],
Combine_data.push_back(newCoords);
*dataOut = newCoords;
}
}
//===================================================================

View file

@ -67,7 +67,7 @@ inline double doubleFromUlong1(TUINT32 hi, TUINT32 lo) {
/*=====================================================================*/
TThickPoint operator*(const TAffine &aff, const TThickPoint &p) {
static TThickPoint operator*(const TAffine &aff, const TThickPoint &p) {
TPointD p1(p.x, p.y);
return TThickPoint(aff * p1, p.thick);
}

View file

@ -277,7 +277,7 @@ TImageP TImageReaderPli::load() {
//===========================================================================
void readRegionVersion4x(IntersectionDataTag *tag, TVectorImage *img) {
static void readRegionVersion4x(IntersectionDataTag *tag, TVectorImage *img) {
#ifndef NEW_REGION_FILL
img->setFillData(tag->m_branchArray, tag->m_branchCount);
#endif
@ -316,7 +316,7 @@ void createStroke(ThickQuadraticChainTag *quadTag, TVectorImage *outVectImage,
//-----------------------------------------------------------------------------
void createGroup(GroupTag *groupTag, TVectorImage *vi, CreateStrokeData &data) {
static void createGroup(GroupTag *groupTag, TVectorImage *vi, CreateStrokeData &data) {
int count = vi->getStrokeCount();
for (int j = 0; j < groupTag->m_numObjects; j++) {
if (groupTag->m_object[j]->m_type == PliTag::COLOR_NGOBJ)
@ -443,8 +443,8 @@ TImageWriterPli::TImageWriterPli(const TFilePath &f, const TFrameId &frameId,
//-----------------------------------------------------------------------------
void putStroke(TStroke *stroke, int &currStyleId,
std::vector<PliObjectTag *> &tags) {
static void putStroke(TStroke *stroke, int &currStyleId,
std::vector<PliObjectTag *> &tags) {
double maxThickness = 0;
assert(stroke);

View file

@ -7,6 +7,7 @@
#include "tlevel_io.h"
class GroupTag;
class ParsedPli;
class ImageTag;
class TImageWriterPli;
@ -149,4 +150,9 @@ private:
TLevelReaderPli *m_lrp;
};
// Functions
TPalette *readPalette(GroupTag *paletteTag, int majorVersion,
int minorVersion);
#endif // TTIO_PLI_INCLUDED

View file

@ -20,9 +20,9 @@ using namespace std;
extern "C" {
void tnz_abort(jmp_buf, int) {}
static void tnz_abort(jmp_buf, int) {}
void tnz_error_fun(png_structp pngPtr, png_const_charp error_message) {
static void tnz_error_fun(png_structp pngPtr, png_const_charp error_message) {
*(int *)png_get_error_ptr(pngPtr) = 0;
}
}

View file

@ -722,7 +722,7 @@ static TINT32 img_rle_compact(unsigned short *expbuf, int ibpp,
/*-----------------------------------------------------------------------------*/
void iclose(IMAGERGB *image) {
static void iclose(IMAGERGB *image) {
TINT32 tablesize;
iflush(image);

View file

@ -1809,7 +1809,7 @@ TLevelWriterSvg::TLevelWriterSvg(const TFilePath &path, TPropertyGroup *winfo)
//-----------------------------------------------------------------------------
void writeRegion(TRegion *r, TPalette *plt, QTextStream &out, double ly) {
static void writeRegion(TRegion *r, TPalette *plt, QTextStream &out, double ly) {
if (r->getEdgeCount() == 0) return;
std::vector<const TQuadratic *> quadsOutline;
@ -1872,8 +1872,8 @@ void writeRegion(TRegion *r, TPalette *plt, QTextStream &out, double ly) {
//--------------------------------------------------------------------------------------
void writeOutlineStroke(TStroke *s, TPalette *plt, QTextStream &out, double ly,
double quality) {
static void writeOutlineStroke(TStroke *s, TPalette *plt, QTextStream &out, double ly,
double quality) {
if (s->getChunkCount() == 0) return;
if (s->getMaxThickness() == 0) return;
@ -1898,7 +1898,7 @@ void writeOutlineStroke(TStroke *s, TPalette *plt, QTextStream &out, double ly,
//----------------------------------------------------------
double computeAverageThickness(const TStroke *s) {
static double computeAverageThickness(const TStroke *s) {
int count = s->getControlPointCount();
double resThick = 0;
@ -1914,8 +1914,8 @@ double computeAverageThickness(const TStroke *s) {
//----------------------------------------------------------------
void writeCenterlineStroke(TStroke *s, TPalette *plt, QTextStream &out,
double ly) {
static void writeCenterlineStroke(TStroke *s, TPalette *plt, QTextStream &out,
double ly) {
if (s->getChunkCount() == 0) return;
if (s->getMaxThickness() == 0) return;

View file

@ -70,7 +70,7 @@ struct TgaHeader {
//============================================================
void readTgaHeader(TgaHeader &header, FILE *chan) {
static void readTgaHeader(TgaHeader &header, FILE *chan) {
header.IdentificationField = fgetc(chan);
header.ColorMapType = fgetc(chan);
header.ImageTypeCode = fgetc(chan);
@ -87,7 +87,7 @@ void readTgaHeader(TgaHeader &header, FILE *chan) {
//------------------------------------------------------------
void writeTgaHeader(TgaHeader &header, FILE *chan) {
static void writeTgaHeader(TgaHeader &header, FILE *chan) {
fputc(header.IdentificationField, chan);
fputc(header.ColorMapType, chan);
fputc(header.ImageTypeCode, chan);

View file

@ -42,15 +42,15 @@ char *reverse(char *buffer, int size) {
}
}
int tfwrite(const char *data, const unsigned int count, FILE *f) {
static int tfwrite(const char *data, const unsigned int count, FILE *f) {
return fwrite(data, sizeof(char), count, f);
}
int tfwrite(UCHAR *data, const unsigned int count, FILE *f) {
static int tfwrite(UCHAR *data, const unsigned int count, FILE *f) {
return fwrite(data, sizeof(char), count, f);
}
int tfwrite(TINT32 *data, const unsigned int count, FILE *f) {
static int tfwrite(TINT32 *data, const unsigned int count, FILE *f) {
if (count == 1) {
#if !TNZ_LITTLE_ENDIAN
TUINT32 dataToWrite = swapTINT32(*data);
@ -63,7 +63,7 @@ int tfwrite(TINT32 *data, const unsigned int count, FILE *f) {
return 0;
}
int tfwrite(TUINT32 *data, const unsigned int count, FILE *f) {
static int tfwrite(TUINT32 *data, const unsigned int count, FILE *f) {
if (count == 1) {
#if !TNZ_LITTLE_ENDIAN
TUINT32 dataToWrite = swapTINT32(*data);
@ -76,7 +76,7 @@ int tfwrite(TUINT32 *data, const unsigned int count, FILE *f) {
return 0;
}
int tfwrite(double *data, unsigned int count, FILE *f) {
static int tfwrite(double *data, unsigned int count, FILE *f) {
if (count == 1) {
double v = *data;
char *ptr = (char *)&v;
@ -286,8 +286,8 @@ bool readHeaderAndOffsets(FILE *chan, TzlOffsetMap &frameOffsTable,
}
}
bool adjustIconAspectRatio(TDimension &outDimension, TDimension inDimension,
TDimension imageRes) {
static bool adjustIconAspectRatio(TDimension &outDimension, TDimension inDimension,
TDimension imageRes) {
TINT32 iconLx = inDimension.lx, iconLy = inDimension.ly;
assert(iconLx > 0 && iconLy > 0);
assert(imageRes.lx > 0 && imageRes.ly > 0);
@ -305,7 +305,7 @@ bool adjustIconAspectRatio(TDimension &outDimension, TDimension inDimension,
return true;
}
void getThumbnail(TRasterP ras, int shrink, TRasterP &thumbnail) {
static void getThumbnail(TRasterP ras, int shrink, TRasterP &thumbnail) {
int j = 0;
int y = 0;
TPixel32 *pix2 = (TPixel32 *)thumbnail->getRawData();
@ -1995,8 +1995,8 @@ TImageP TImageReaderTzl::load13() {
}
// Restituisce la regione del raster shrinkata e la relativa savebox.
TRect applyShrinkAndRegion(TRasterP &ras, int shrink, TRect region,
TRect savebox) {
static TRect applyShrinkAndRegion(TRasterP &ras, int shrink, TRect region,
TRect savebox) {
// estraggo la regione solo se essa ha coordinate valide.
if (!region.isEmpty() && region != TRect() && region.getLx() > 0 &&
region.getLy() > 0)

View file

@ -76,8 +76,8 @@ PltReader::~PltReader() { delete m_stripBuffer; }
//------------------------------------------------------------
int decode_group_name(char group_name[], char **name, int *key,
int *sister_index) {
static int decode_group_name(char group_name[], char **name, int *key,
int *sister_index) {
char *s, *t;
*key = 0;
*sister_index = -1;

View file

@ -156,6 +156,10 @@ public:
std::string getValueAlias(double frame, int precision) override;
};
DV_IMPORT_API void splitSpeedInOutSegment(TDoubleKeyframe &k,
TDoubleKeyframe &k0,
TDoubleKeyframe &k1);
//---------------------------------------------------------
DEFINE_PARAM_SMARTPOINTER(TDoubleParam, double)

View file

@ -172,6 +172,8 @@ updateTable(sampleCount);
}
};
DVAPI TSpectrumT<TPixel64> convert(const TSpectrumT<TPixel32> &s);
#ifdef _WIN32
template class DVAPI TSpectrumT<TPixel32>;
template class DVAPI TSpectrumT<TPixel64>;

View file

@ -5,7 +5,7 @@
#include "tsound_t.h"
#include "tsystem.h"
#include "tfilepath_io.h"
#include "tfilepath_io.h"
#include "tsioutils.h"
#include <math.h>
#define DEFAULT_OFFSET 0
@ -21,7 +21,6 @@ TNZ_LITTLE_ENDIAN undefined !!
using namespace std;
void swapAndCopySamples(short *srcBuffer, short *dstBuffer, TINT32 sampleCount);
TUINT32 convertToLong(UCHAR *buffer);
void storeFloat(unsigned char *buffer, TUINT32 value);
@ -136,7 +135,7 @@ public:
//--------------------------------------------------------------------
ostream &operator<<(ostream &os, const TCOMMChunk &commChunk) {
static ostream &operator<<(ostream &os, const TCOMMChunk &commChunk) {
commChunk.print(os);
return os;
}
@ -191,7 +190,7 @@ public:
//--------------------------------------------------------------------
ostream &operator<<(ostream &os, const TSSNDChunk &ssndChunk) {
static ostream &operator<<(ostream &os, const TSSNDChunk &ssndChunk) {
os << "name = '" << ssndChunk.m_name << endl;
os << "length = '" << ssndChunk.m_length << endl;
os << "offset = '" << (unsigned int)ssndChunk.m_offset << endl;
@ -208,7 +207,7 @@ ostream &operator<<(ostream &os, const TSSNDChunk &ssndChunk) {
//==========================================================
void flipLong(unsigned char *ptrc) {
static void flipLong(unsigned char *ptrc) {
unsigned char val;
val = *(ptrc);
@ -222,7 +221,7 @@ void flipLong(unsigned char *ptrc) {
//--------------------------------------------------------------------
TUINT32 fetchLong(TUINT32 *ptrl) { return (*ptrl); }
static TUINT32 fetchLong(TUINT32 *ptrl) { return (*ptrl); }
//--------------------------------------------------------------------
@ -249,7 +248,7 @@ TUINT32 convertToLong(UCHAR *buffer) {
//--------------------------------------------------------------------
void storeLong(TUINT32 val, TUINT32 *ptr) { *ptr = val; }
static void storeLong(TUINT32 val, TUINT32 *ptr) { *ptr = val; }
//--------------------------------------------------------------------

View file

@ -2,6 +2,8 @@
#include "tcommon.h"
#include "tsioutils.h"
//------------------------------------------------------------------------------
void swapAndCopySamples(short *srcBuffer, short *dstBuffer,
TINT32 sampleCount) {

View file

@ -0,0 +1,9 @@
#pragma once
#ifndef TSIOUTILS_INCLUDED
#define TSIOUTILS_INCLUDED
void swapAndCopySamples(short *srcBuffer, short *dstBuffer,
TINT32 sampleCount);
#endif

View file

@ -11,8 +11,8 @@
//---------------------------------------------------------------------
void backlit(TRaster32P lighted, TRaster32P light, TRaster32P out, double blur,
const TPixel &color, double fade, double scale) {
static void backlit(TRaster32P lighted, TRaster32P light, TRaster32P out, double blur,
const TPixel &color, double fade, double scale) {
assert(light && lighted && out);
assert(lighted->getSize() == light->getSize());
@ -92,8 +92,8 @@ void backlit(TRaster32P lighted, TRaster32P light, TRaster32P out, double blur,
//---------------------------------------------------------------------
void backlit(TRaster64P lighted, TRaster64P light, TRaster64P out, double blur,
const TPixel &color32, double fade, double scale) {
static void backlit(TRaster64P lighted, TRaster64P light, TRaster64P out, double blur,
const TPixel &color32, double fade, double scale) {
assert(light && lighted && out);
assert(lighted->getSize() == light->getSize());

View file

@ -135,7 +135,7 @@ public:
void doCompute(TTile &tile, double frame, const TRenderSettings &ri) override;
};
double normalize_h(double h) {
static double normalize_h(double h) {
if (h < 0) h += 360;
if (h > 360) h -= 360;
return h;

View file

@ -4,6 +4,9 @@
#include "traster.h"
#include "tspectrumparam.h"
#include "gradients.h"
//------------------------------------------------------------------
namespace {

View file

@ -1347,7 +1347,7 @@ void Iwa_Particles_Engine::fill_single_region(
----------------------------------------------------------------*/
bool potentialLessThan(const ParticleOrigin &po1, const ParticleOrigin &po2) {
static bool potentialLessThan(const ParticleOrigin &po1, const ParticleOrigin &po2) {
return po1.potential < po2.potential;
}

View file

@ -326,7 +326,7 @@ void directionalBlur(TRasterPT<T> rout, TRasterPT<T> rin, const TPointD &blur,
} // namespace
void enlargeDir(TRectD &r, TPointD p, bool bidirectional) {
static void enlargeDir(TRectD &r, TPointD p, bool bidirectional) {
if (bidirectional) {
r.x1 += fabs(p.x);
r.x0 -= fabs(p.x);
@ -345,7 +345,7 @@ void enlargeDir(TRectD &r, TPointD p, bool bidirectional) {
}
}
void reduceDir(TRectD &r, TPointD p, bool bidirectional) {
static void reduceDir(TRectD &r, TPointD p, bool bidirectional) {
if (bidirectional) {
r.x1 -= fabs(p.x);
r.x0 += fabs(p.x);

View file

@ -33,7 +33,7 @@
Particles_Engine::Particles_Engine(ParticlesFx *parent, double frame)
: m_parent(parent), m_frame(frame) {}
void printTime(TStopWatch &sw, std::string name) {
static void printTime(TStopWatch &sw, std::string name) {
std::ostrstream ss;
ss << name << " : ";
sw.print(ss);

View file

@ -428,7 +428,7 @@ void subdivision(const TPointD &p00, const TPointD &p10, const TPointD &p11,
// ------------------------------------------------------------------------
#define TINY 1.0e-20
int splitMatrix(double **a, int n, int *index) {
static int splitMatrix(double **a, int n, int *index) {
int i, imax = 0, j, k;
double big, dum, sum, temp;
double *vv, d;
@ -488,8 +488,8 @@ int splitMatrix(double **a, int n, int *index) {
/*-----------------------------------------------------------------*/
void buildMatrixes(const FourPoints &ss, const FourPoints &dd, double **a,
double *b) {
static void buildMatrixes(const FourPoints &ss, const FourPoints &dd, double **a,
double *b) {
int i;
TPointD s[4], d[4];
@ -515,7 +515,7 @@ void buildMatrixes(const FourPoints &ss, const FourPoints &dd, double **a,
/*-----------------------------------------------------------------*/
void computeSolutions(double **a, int *index, double *b) {
static void computeSolutions(double **a, int *index, double *b) {
int i, ii = 0, ip, j;
double sum;
@ -538,7 +538,7 @@ void computeSolutions(double **a, int *index, double *b) {
/*-----------------------------------------------------------------*/
void solveSystems(double **a, double *bx) {
static void solveSystems(double **a, double *bx) {
int index[255], i, count = 0, bad_line;
double **atmp;
int n = 8;
@ -568,8 +568,8 @@ void solveSystems(double **a, double *bx) {
/*-----------------------------------------------------------------*/
void computeTransformation(const FourPoints &s, const FourPoints &d,
TAffine &aff, TPointD &perspectDen) {
static void computeTransformation(const FourPoints &s, const FourPoints &d,
TAffine &aff, TPointD &perspectDen) {
double **a, *b;
int i;

View file

@ -687,4 +687,7 @@ return &info;
*/
/* TODO, move to header */
DV_EXPORT_API void initStdFx();
DV_EXPORT_API void initStdFx() {}

View file

@ -61,4 +61,6 @@ public:
bool isAlmostIsotropic(const TAffine &aff);
DV_EXPORT_API void initStdFx();
#endif

View file

@ -195,7 +195,7 @@ TFilePath setToonzFolder(const TFilePath &filename, std::string toonzVar) {
//==============================================================================================
void prepareToCleanup(TXshSimpleLevel *xl, TPalette *cleanupPalette) {
static void prepareToCleanup(TXshSimpleLevel *xl, TPalette *cleanupPalette) {
assert(xl->getScene());
if (xl->getProperties()->getSubsampling() != 1) {
xl->getProperties()->setSubsampling(1);
@ -241,7 +241,7 @@ string TaskId;
//
//------------------------------------------------------------------------
void searchLevelsToCleanup(
static void searchLevelsToCleanup(
std::vector<std::pair<TXshSimpleLevel *, std::set<TFrameId>>> &levels,
TXsheet *xsh, bool selectedOnly) {
std::map<wstring, TXshSimpleLevel *> levelTable;
@ -308,7 +308,7 @@ void searchLevelsToCleanup(
//------------------------------------------------------------------------------
/*- CleanupDefaultパレットを追加する -*/
void addCleanupDefaultPalette(TXshSimpleLevel *sl) {
static void addCleanupDefaultPalette(TXshSimpleLevel *sl) {
/*- 元となるパレットはStudioPaletteフォルダに置く -*/
TFilePath palettePath =
ToonzFolder::getStudioPaletteFolder() + "cleanup_default.tpl";
@ -384,9 +384,9 @@ void addCleanupDefaultPalette(TXshSimpleLevel *sl) {
//
//------------------------------------------------------------------------
void cleanupLevel(TXshSimpleLevel *xl, std::set<TFrameId> fidsInXsheet,
ToonzScene *scene, bool overwrite,
TUserLogAppend &m_userLog) {
static void cleanupLevel(TXshSimpleLevel *xl, std::set<TFrameId> fidsInXsheet,
ToonzScene *scene, bool overwrite,
TUserLogAppend &m_userLog) {
prepareToCleanup(xl, scene->getProperties()
->getCleanupParameters()
->m_cleanupPalette.getPointer());
@ -847,4 +847,4 @@ namespace {
const char *toonzVersion = "Toonz 7.1";
} // namespace
string getToonzVersion() { return toonzVersion; }
static string getToonzVersion() { return toonzVersion; }

View file

@ -394,9 +394,9 @@ bool MyMultimediaRenderListener::onFrameFailed(int frame, int column,
//==================================================================================
std::pair<int, int> generateMovie(ToonzScene *scene, const TFilePath &fp,
int r0, int r1, int step, int shrink,
int threadCount, int maxTileSize) {
static std::pair<int, int> generateMovie(ToonzScene *scene, const TFilePath &fp,
int r0, int r1, int step, int shrink,
int threadCount, int maxTileSize) {
QWaitCondition renderCompleted;
// riporto gli indici a base zero

View file

@ -18,8 +18,8 @@
using namespace TScannerUtil;
void sense(bool) {}
int scsi_maxlen() {
static void sense(bool) {}
static int scsi_maxlen() {
assert(0);
return 0;
}

View file

@ -9,15 +9,17 @@ using namespace TScannerUtil;
extern "C" {
#include "../common/twain/ttwain_util.h"
#include "../common/twain/ttwain_global_def.h" /* forward declare functions */
}
/* callback used to handle TTWAIN done/error status*/
void throwIT(const char *msg) { throw TException(msg); }
static void throwIT(const char *msg) { throw TException(msg); }
extern "C" void TTWAIN_ErrorBox(const char *msg) { throwIT(msg); }
extern "C" int onDoneCB(UCHAR *buffer, TTWAIN_PIXTYPE pixelType, int lx, int ly,
extern "C" {
static int onDoneCB(UCHAR *buffer, TTWAIN_PIXTYPE pixelType, int lx, int ly,
int wrap, float xdpi, float ydpi, void *usrData) {
TRasterP ras;
switch (pixelType) {
@ -69,13 +71,16 @@ extern "C" int onDoneCB(UCHAR *buffer, TTWAIN_PIXTYPE pixelType, int lx, int ly,
scannerDevice->decrementPaperLeftCount();
return scannerDevice->getPaperLeftCount();
}
}
//-----------------------------------------------------------------------------
extern "C" void onErrorCB(void *usrData, void *alwaysZero) {
extern "C" {
static void onErrorCB(void *usrData, void *alwaysZero) {
TScanner *scannerDevice = reinterpret_cast<TScanner *>(usrData);
scannerDevice->notifyError();
}
}
//-----------------------------------------------------------------------------
@ -218,7 +223,7 @@ param.m_version = string(TTWAIN_GetVersion());
//-----------------------------------------------------------------------------
void setupParameters(const TScannerParameters &params, bool isAreaSupported) {
static void setupParameters(const TScannerParameters &params, bool isAreaSupported) {
if (isAreaSupported) {
TRectD scanArea = params.getScanArea();
float L = (float)(scanArea.getP00().x / 25.4);
@ -259,7 +264,7 @@ void setupParameters(const TScannerParameters &params, bool isAreaSupported) {
}
//-----------------------------------------------------------------------------
void openAndSetupTwain() {
static void openAndSetupTwain() {
int rc = TTWAIN_OpenDefaultSource();
if (rc) {
TTWAIN_SetTwainUsage(TTWAIN_MODE_UNLEASHED);

View file

@ -55,7 +55,7 @@ extern "C" {
//========================================================================================
void sum(int n, const double *x, double *&y) {
static void sum(int n, const double *x, double *&y) {
/*
void cblas_daxpy(blasint n, double a, double *x, blasint incx, double *y,
blasint incy);

View file

@ -89,8 +89,8 @@ TEnv::DoubleVar RasterBrushHardness("RasterBrushHardness", 100);
// note: stroke is unchanged
//
void split(TStroke *stroke, const std::vector<double> &parameterValues,
std::vector<TStroke *> &strokes) {
static void split(TStroke *stroke, const std::vector<double> &parameterValues,
std::vector<TStroke *> &strokes) {
TThickPoint p2;
std::vector<TThickPoint> points;
TThickPoint lastPoint = stroke->getControlPoint(0);
@ -199,7 +199,7 @@ void split(TStroke *stroke, const std::vector<double> &parameterValues,
// Note: if the curve is a single point (that's dp=0) or it is a straight
// line (that's ddp=0) return 0
double curvature(TPointD dp, TPointD ddp) {
static double curvature(TPointD dp, TPointD ddp) {
if (dp == TPointD(0, 0))
return 0;
else
@ -217,9 +217,9 @@ double curvature(TPointD dp, TPointD ddp) {
// Output:
// parameterValues = vector of max curvature parameter points
void findMaxCurvPoints(TStroke *stroke, const float &angoloLim,
const float &curvMaxLim,
std::vector<double> &parameterValues) {
static void findMaxCurvPoints(TStroke *stroke, const float &angoloLim,
const float &curvMaxLim,
std::vector<double> &parameterValues) {
TPointD tg1, tg2; // Tangent vectors
TPointD dp, ddp; // First and Second derivate.
@ -320,9 +320,9 @@ void findMaxCurvPoints(TStroke *stroke, const float &angoloLim,
}
}
void addStroke(TTool::Application *application, const TVectorImageP &vi,
TStroke *stroke, bool breakAngles, bool frameCreated,
bool levelCreated) {
static void addStroke(TTool::Application *application, const TVectorImageP &vi,
TStroke *stroke, bool breakAngles, bool frameCreated,
bool levelCreated) {
QMutexLocker lock(vi->getMutex());
if (application->getCurrentObject()->isSpline()) {

View file

@ -65,7 +65,7 @@ TEnv::IntVar GeometricMiterValue("InknpaintGeometricMiterValue", 4);
// Utility Functions
//-----------------------------------------------------------------------------
TPointD rectify(const TPointD &oldPos, const TPointD &pos) {
static TPointD rectify(const TPointD &oldPos, const TPointD &pos) {
const double h = sqrt(2.0) / 2.0;
const TPointD directions[] = {TPointD(1, 0), TPointD(h, h), TPointD(0, 1),
TPointD(-h, h), TPointD(-1, 0), TPointD(-h, -h),
@ -85,15 +85,15 @@ TPointD rectify(const TPointD &oldPos, const TPointD &pos) {
//-----------------------------------------------------------------------------
TPointD computeSpeed(TPointD p0, TPointD p1, double factor) {
static TPointD computeSpeed(TPointD p0, TPointD p1, double factor) {
TPointD d = p1 - p0;
return (d == TPointD()) ? TPointD() : d * (factor / norm(d));
}
//-----------------------------------------------------------------------------
TRect drawBluredBrush(const TRasterImageP &ri, TStroke *stroke, int thick,
double hardness, double opacity) {
static TRect drawBluredBrush(const TRasterImageP &ri, TStroke *stroke, int thick,
double hardness, double opacity) {
TStroke *s = new TStroke(*stroke);
TPointD riCenter = ri->getRaster()->getCenterD();
s->transform(TTranslation(riCenter));
@ -135,8 +135,8 @@ TRect drawBluredBrush(const TRasterImageP &ri, TStroke *stroke, int thick,
//-----------------------------------------------------------------------------
TRect drawBluredBrush(const TToonzImageP &ti, TStroke *stroke, int thick,
double hardness, bool selective) {
static TRect drawBluredBrush(const TToonzImageP &ti, TStroke *stroke, int thick,
double hardness, bool selective) {
TStroke *s = new TStroke(*stroke);
TPointD riCenter = ti->getRaster()->getCenterD();
s->transform(TTranslation(riCenter));

View file

@ -616,9 +616,9 @@ refStroke, count, refStroke+count)>commonDepth(vimg, refStroke, count, prev))
if(count==0) return;
*/
int doMoveGroup(UCHAR moveType, TVectorImage *vimg,
const std::vector<std::pair<TStroke *, int>> &selectedGroups,
int index) {
static int doMoveGroup(UCHAR moveType, TVectorImage *vimg,
const std::vector<std::pair<TStroke *, int>> &selectedGroups,
int index) {
int refStroke = vimg->getStrokeIndex(selectedGroups[index].first);
int count = selectedGroups[index].second;

View file

@ -1682,7 +1682,7 @@ void drawFullSquare(const TPointD &pos, double radius) {
//------------------------------------------------------------------------
void drawFilledSquare(const TPointD &pos, double radius) {
static void drawFilledSquare(const TPointD &pos, double radius) {
glBegin(GL_QUADS);
glVertex2d(pos.x - radius, pos.y - radius);
glVertex2d(pos.x + radius, pos.y - radius);
@ -1693,7 +1693,7 @@ void drawFilledSquare(const TPointD &pos, double radius) {
//------------------------------------------------------------------------
void drawHandle(const TPointD &pos, double radius, const TPixel32 &color) {
static void drawHandle(const TPointD &pos, double radius, const TPixel32 &color) {
glColor4ub(0, 0, 0, color.m); // Black border
glLineWidth(4.0f);
drawSquare(pos, radius);
@ -1705,8 +1705,8 @@ void drawHandle(const TPointD &pos, double radius, const TPixel32 &color) {
//------------------------------------------------------------------------
void drawFilledHandle(const TPointD &pos, double radius, double pixelSize,
const TPixel32 &color) {
static void drawFilledHandle(const TPointD &pos, double radius, double pixelSize,
const TPixel32 &color) {
glColor4ub(0, 0, 0, color.m);
drawFilledSquare(pos, radius + pixelSize);
@ -1716,7 +1716,7 @@ void drawFilledHandle(const TPointD &pos, double radius, double pixelSize,
//------------------------------------------------------------------------
void drawText(const TPointD &pos, const QString &text, double fontScale) {
static void drawText(const TPointD &pos, const QString &text, double fontScale) {
// Get the world-to-window affine
double matrix[16];

View file

@ -155,8 +155,8 @@ struct Closer {
//==============================================================================
std::pair<double, int> closestVertex(const TTextureMesh &mesh,
const TPointD &pos) {
static std::pair<double, int> closestVertex(const TTextureMesh &mesh,
const TPointD &pos) {
Closer closer = {mesh, pos};
int vIdx = int(
std::min_element(mesh.vertices().begin(), mesh.vertices().end(), closer)
@ -167,8 +167,8 @@ std::pair<double, int> closestVertex(const TTextureMesh &mesh,
//------------------------------------------------------------------------
std::pair<double, int> closestEdge(const TTextureMesh &mesh,
const TPointD &pos) {
static std::pair<double, int> closestEdge(const TTextureMesh &mesh,
const TPointD &pos) {
Closer closer = {mesh, pos};
int eIdx =
int(std::min_element(mesh.edges().begin(), mesh.edges().end(), closer)

View file

@ -80,7 +80,7 @@ inline std::string removeTrailingH(std::string handle) {
// return true iff column ancestorIndex is column descentIndex or its parent or
// the parent of the parent, etc.
bool isAncestorOf(int ancestorIndex, int descendentIndex) {
static bool isAncestorOf(int ancestorIndex, int descendentIndex) {
TStageObjectId ancestorId = TStageObjectId::ColumnId(ancestorIndex);
TStageObjectId descendentId = TStageObjectId::ColumnId(descendentIndex);
TXsheet *xsh = TTool::getApplication()->getCurrentXsheet()->getXsheet();
@ -91,8 +91,8 @@ bool isAncestorOf(int ancestorIndex, int descendentIndex) {
//------------------------------------------------------------
void getHooks(std::vector<HookData> &hooks, TXsheet *xsh, int row, int col,
TPointD dpiScale) {
static void getHooks(std::vector<HookData> &hooks, TXsheet *xsh, int row, int col,
TPointD dpiScale) {
// nota. hook position is in the coordinate system of the parent object.
// a inch is Stage::inch
@ -138,8 +138,8 @@ void getHooks(std::vector<HookData> &hooks, TXsheet *xsh, int row, int col,
//-------------------------------------------------------------------
void getConnectedColumns(std::set<int> &connectedColumns, TXsheet *xsh,
int col) {
static void getConnectedColumns(std::set<int> &connectedColumns, TXsheet *xsh,
int col) {
TStageObjectId id;
// insert col and all column ancestors
id = TStageObjectId::ColumnId(col);
@ -165,7 +165,7 @@ void getConnectedColumns(std::set<int> &connectedColumns, TXsheet *xsh,
}
}
bool canShowBone(Skeleton::Bone *bone, TXsheet *xsh, int row) {
static bool canShowBone(Skeleton::Bone *bone, TXsheet *xsh, int row) {
TStageObjectId id = bone->getStageObject()->getId();
if (!xsh->getCell(row, id.getIndex()).isEmpty() &&
xsh->getColumn(id.getIndex())->isCamstandVisible())

View file

@ -103,7 +103,7 @@ void ToolHandle::setToolBusy(bool value) {
QIcon currentIcon;
QIcon getCurrentIcon() { return currentIcon; }
static QIcon getCurrentIcon() { return currentIcon; }
//-----------------------------------------------------------------------------

View file

@ -849,7 +849,7 @@ void TrackerTool::onDeactivate() {
//=============================================================================
TTool *getTrackerToolTool() { return &trackerTool; }
static TTool *getTrackerToolTool() { return &trackerTool; }
//=============================================================================

View file

@ -1645,7 +1645,7 @@ void TypeTool::onImageChanged() { stopEditing(); }
//=========================================================
TTool *getTypeTool() { return &typeTool; }
static TTool *getTypeTool() { return &typeTool; }
/*void resetTypetTool(TTool*tool)
{

View file

@ -9,10 +9,6 @@
#include <QString>
#include <map>
DV_IMPORT_API void splitSpeedInOutSegment(TDoubleKeyframe &k,
TDoubleKeyframe &k0,
TDoubleKeyframe &k1);
//=============================================================================
//
// Keyframes Undo

View file

@ -24,6 +24,7 @@
#include "SDef.h"
#include "CallCircle.h"
#include "CallParam.h"
#include "calligraph.h"
//#include "tmsg.h"
using namespace std;

View file

@ -38,6 +38,7 @@
#include "toonz/levelset.h"
#include "toonz/txshchildlevel.h"
#include "toonz/fxdag.h"
#include "toonz/tcolumnfx.h"
#include "toonz/tcolumnfxset.h"
#include "toonz/stage.h"
#include "toonz/fill.h"