diff --git a/toonz/sources/common/tsound/tsop.cpp b/toonz/sources/common/tsound/tsop.cpp index 41bdebe..f3a3678 100644 --- a/toonz/sources/common/tsound/tsop.cpp +++ b/toonz/sources/common/tsound/tsop.cpp @@ -967,7 +967,7 @@ TSoundTrackP TSop::gate(TSoundTrackP src, double threshold, double holdTime, //============================================================================== -TSoundTrackP TSop::timeStrech(TSoundTrackP src, double ratio) { +TSoundTrackP TSop::timeStretch(TSoundTrackP src, double ratio) { TINT32 sampleRate = (TINT32)(src->getSampleRate() * ratio); if (sampleRate > 100000) sampleRate = 100000; diff --git a/toonz/sources/common/tvectorimage/outlineApproximation.cpp b/toonz/sources/common/tvectorimage/outlineApproximation.cpp index 851169b..6b9f5e0 100644 --- a/toonz/sources/common/tvectorimage/outlineApproximation.cpp +++ b/toonz/sources/common/tvectorimage/outlineApproximation.cpp @@ -281,12 +281,12 @@ else delete edge.second; } - TThickQuadratic tq_left, tq_rigth; + TThickQuadratic tq_left, tq_right; - tq->split(0.5, tq_left, tq_rigth); + tq->split(0.5, tq_left, tq_right); makeOutline(/*out,*/ outl, tq_left, error); - makeOutline(/*cout,*/ outl, tq_rigth, error); + makeOutline(/*cout,*/ outl, tq_right, error); } //--------------------------------------------------------------------------- diff --git a/toonz/sources/common/tvectorimage/tstroke.cpp b/toonz/sources/common/tvectorimage/tstroke.cpp index 5e48e5e..67e6b72 100644 --- a/toonz/sources/common/tvectorimage/tstroke.cpp +++ b/toonz/sources/common/tvectorimage/tstroke.cpp @@ -2855,7 +2855,7 @@ int intersect(const TStroke &stroke, const TPointD ¢er, double radius, #if defined(DEBUG) || defined(_DEBUG) /* -cout<<"interesections:"; +cout<<"intersections:"; copy( intersections.begin(), intersections.end(), ostream_iterator( cout, " " ) ); cout< &pointsArray3D, double error, for (int i = 1; i < (int)corners.size(); i++) { int size = corners[i] - corners[i - 1] + 1; int firstPoint = corners[i - 1]; - T3DPointD tanLeft, tanRigth; + T3DPointD tanLeft, tanRight; assert(size > 0); if (size > 1) // capita che corners[i] = corners[i - 1] ("clic" senza drag // oppure bug (noto!!!) del cornerDetector) { tanLeft = -pointsArray3D[firstPoint + 1] + pointsArray3D[firstPoint]; - tanRigth = pointsArray3D[firstPoint + size - 2] - + tanRight = pointsArray3D[firstPoint + size - 2] - pointsArray3D[firstPoint + size - 1]; if (norm2(tanLeft) > 0) tanLeft = normalize(tanLeft); - if (norm2(tanRigth) > 0) tanRigth = normalize(tanRigth); + if (norm2(tanRight) > 0) tanRight = normalize(tanRight); - fitCubic3D(&pointsArray3D[firstPoint], size, tanLeft, tanRigth, error); + fitCubic3D(&pointsArray3D[firstPoint], size, tanLeft, tanRight, error); } else if (pointsArray3D.size() == 1) { // caso in cui i non calcola nessun corner a meno di quello iniziale // e finale coincidenti: 1 solo punto campionato ("clic" senza drag) diff --git a/toonz/sources/common/tvrender/tinbetween.cpp b/toonz/sources/common/tvrender/tinbetween.cpp index 2318b10..6a295ef 100644 --- a/toonz/sources/common/tvrender/tinbetween.cpp +++ b/toonz/sources/common/tvrender/tinbetween.cpp @@ -689,7 +689,7 @@ void TInbetween::Imp::computeTransformation() { std::vector samplingPoint1(samplingPointNumber), samplingPoint2(samplingPointNumber); TStroke *stroke1, *stroke2; - std::vector ratioSampling, weigths, subStrokeXScaling, + std::vector ratioSampling, weights, subStrokeXScaling, subStrokeYScaling; UINT strokeCount1 = m_firstImage->getStrokeCount(); @@ -1011,8 +1011,8 @@ debugStream <<"num angoli 2: "<< angles2.size() << endl; ratioSampling.clear(); ratioSampling.reserve(samplingPointNumber); - weigths.clear(); - weigths.reserve(samplingPointNumber); + weights.clear(); + weights.reserve(samplingPointNumber); TPointD pOld, pNew; // double totalW=0; @@ -1024,7 +1024,7 @@ debugStream <<"num angoli 2: "<< angles2.size() << endl; if (pNew == stroke2Centroid) continue; versor1 = normalize(pOld - stroke1Centroid); versor2 = normalize(pNew - stroke2Centroid); - weigths.push_back(tdistance(pOld, stroke1Centroid) + + weights.push_back(tdistance(pOld, stroke1Centroid) + tdistance(pNew, stroke2Centroid)); cs = versor1 * versor2; sn = cross(versor1, versor2); @@ -1036,7 +1036,7 @@ debugStream <<"num angoli 2: "<< angles2.size() << endl; subStroke1 = 0; subStroke2 = 0; - double radRotation = weightedAverage(ratioSampling, weigths); + double radRotation = weightedAverage(ratioSampling, weights); totalRadRotation += radRotation; } diff --git a/toonz/sources/image/pli/pli_io.cpp b/toonz/sources/image/pli/pli_io.cpp index e7b5f13..155738d 100644 --- a/toonz/sources/image/pli/pli_io.cpp +++ b/toonz/sources/image/pli/pli_io.cpp @@ -324,7 +324,7 @@ public: double m_autocloseTolerance; bool m_isIrixEndian; TFilePath m_filePath; - UCHAR m_currDinamicTypeBytesNum; + UCHAR m_currDynamicTypeBytesNum; TUINT32 m_tagLength; TUINT32 m_bufLength; std::unique_ptr m_buf; @@ -348,8 +348,8 @@ public: PliTag *readPrecisionScaleTag(); PliTag *readAutoCloseToleranceTag(); - inline void readDinamicData(TUINT32 &val, TUINT32 &bufOffs); - inline bool readDinamicData(TINT32 &val, TUINT32 &bufOffs); + inline void readDynamicData(TUINT32 &val, TUINT32 &bufOffs); + inline bool readDynamicData(TINT32 &val, TUINT32 &bufOffs); inline void readFloatData(double &val, TUINT32 &bufOffs); inline UINT readRasterData(TRaster32P &r, TUINT32 &bufOffs); @@ -374,10 +374,10 @@ public: TUINT32 writePrecisionScaleTag(PrecisionScaleTag *tag); TUINT32 writeAutoCloseToleranceTag(AutoCloseToleranceTag *tag); - inline void writeDinamicData(TUINT32 val); - inline void writeDinamicData(TINT32 val, bool isNegative); + inline void writeDynamicData(TUINT32 val); + inline void writeDynamicData(TINT32 val, bool isNegative); - inline void setDinamicTypeBytesNum(int minval, int maxval); + inline void setDynamicTypeBytesNum(int minval, int maxval); PliTag *findTagFromOffset(UINT tagOffs); UINT findOffsetFromTag(PliTag *tag); @@ -597,7 +597,7 @@ ParsedPliImp::ParsedPliImp(const TFilePath &filename, bool readInfo) CHECK_FOR_READ_ERROR(filename); - m_currDinamicTypeBytesNum = 2; + m_currDynamicTypeBytesNum = 2; while ((tagElem = readTag())) { if (!m_firstTag) @@ -656,7 +656,7 @@ void ParsedPliImp::loadInfo(bool readPlt, TPalette *&palette, m_iChan >> d; m_autocloseTolerance = ((double)(s - 1)) * (ii + 0.01 * d); - m_currDinamicTypeBytesNum = 2; + m_currDynamicTypeBytesNum = 2; // m_frameOffsInFile = new int[m_framesNumber]; // for (int i=0; i quadratic( new TThickQuadratic[numQuadratics]); @@ -1178,9 +1178,9 @@ PliTag *ParsedPliImp::readThickQuadraticChainTag(bool isLoop) { for (unsigned int i = 0; i < numQuadratics; i++) { quadratic[i].setThickP0(p); - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); dx1 = scale * d; - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); dy1 = scale * d; if (newThicknessWriteMethod) @@ -1197,9 +1197,9 @@ PliTag *ParsedPliImp::readThickQuadraticChainTag(bool isLoop) { bufOffs += 2; } - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); dx2 = scale * d; - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); dy2 = scale * d; if (dx1 == 0 && dy1 == 0) // p0==p1, or p1==p2 creates problems (in the @@ -1254,13 +1254,13 @@ PliTag *ParsedPliImp::readGroupTag() { assert(type < GroupTag::TYPE_HOW_MANY); - TUINT32 numObjects = (m_tagLength - 1) / m_currDinamicTypeBytesNum; + TUINT32 numObjects = (m_tagLength - 1) / m_currDynamicTypeBytesNum; std::unique_ptr object(new PliObjectTag *[numObjects]); std::unique_ptr tagOffs(new TUINT32[numObjects]); for (TUINT32 i = 0; i < numObjects; i++) { - readDinamicData(tagOffs[i], bufOffs); + readDynamicData(tagOffs[i], bufOffs); } TagElem *elem; @@ -1292,13 +1292,13 @@ PliTag *ParsedPliImp::readColorTag() { assert(style < ColorTag::STYLE_HOW_MANY); assert(attribute < ColorTag::ATTRIBUTE_HOW_MANY); - TUINT32 numColors = (m_tagLength - 2) / m_currDinamicTypeBytesNum; + TUINT32 numColors = (m_tagLength - 2) / m_currDynamicTypeBytesNum; std::unique_ptr colorArray(new TUINT32[numColors]); for (unsigned int i = 0; i < numColors; i++) { TUINT32 color; - readDinamicData(color, bufOffs); + readDynamicData(color, bufOffs); colorArray[i] = color; } @@ -1317,8 +1317,8 @@ PliTag *ParsedPliImp::readStyleTag() { USHORT id = 0; USHORT pageIndex = 0; - UCHAR currDinamicTypeBytesNumSaved = m_currDinamicTypeBytesNum; - m_currDinamicTypeBytesNum = 2; + UCHAR currDynamicTypeBytesNumSaved = m_currDynamicTypeBytesNum; + m_currDynamicTypeBytesNum = 2; readUShortData(id, bufOffs); length -= 2; @@ -1373,7 +1373,7 @@ PliTag *ParsedPliImp::readStyleTag() { StyleTag *tag = new StyleTag(id, pageIndex, paramArraySize, (paramArraySize > 0) ? paramArray.data() : nullptr); - m_currDinamicTypeBytesNum = currDinamicTypeBytesNumSaved; + m_currDynamicTypeBytesNum = currDynamicTypeBytesNumSaved; return tag; } @@ -1393,9 +1393,9 @@ PliTag *ParsedPliImp::readOutlineOptionsTag() { capStyle = m_buf[bufOffs++]; joinStyle = m_buf[bufOffs++]; - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); miterLower = scale * d; - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); miterUpper = scale * d; return new StrokeOutlineOptionsTag( @@ -1408,7 +1408,7 @@ PliTag *ParsedPliImp::readPrecisionScaleTag() { TUINT32 bufOffs = 0; TINT32 d; - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); m_precisionScale = d; return new PrecisionScaleTag(m_precisionScale); @@ -1420,7 +1420,7 @@ PliTag *ParsedPliImp::readAutoCloseToleranceTag() { TUINT32 bufOffs = 0; TINT32 d; - readDinamicData(d, bufOffs); + readDynamicData(d, bufOffs); return new AutoCloseToleranceTag(d); } @@ -1428,20 +1428,20 @@ PliTag *ParsedPliImp::readAutoCloseToleranceTag() { /*=====================================================================*/ void ParsedPliImp::readFloatData(double &val, TUINT32 &bufOffs) { - // UCHAR currDinamicTypeBytesNumSaved = m_currDinamicTypeBytesNum; - // m_currDinamicTypeBytesNum = 2; + // UCHAR currDynamicTypeBytesNumSaved = m_currDynamicTypeBytesNum; + // m_currDynamicTypeBytesNum = 2; TINT32 valInt; TUINT32 valDec; bool isNegative; - isNegative = readDinamicData(valInt, bufOffs); - readDinamicData(valDec, bufOffs); + isNegative = readDynamicData(valInt, bufOffs); + readDynamicData(valDec, bufOffs); val = valInt + (double)valDec / 65536.0; // 2^16 if (valInt == 0 && isNegative) val = -val; - // m_currDinamicTypeBytesNum = currDinamicTypeBytesNumSaved; + // m_currDynamicTypeBytesNum = currDynamicTypeBytesNumSaved; } /*=====================================================================*/ @@ -1484,8 +1484,8 @@ intVal|=(0x1<<31); /*=====================================================================*/ void ParsedPliImp::writeFloatData(double val) { - UCHAR currDinamicTypeBytesNumSaved = m_currDinamicTypeBytesNum; - m_currDinamicTypeBytesNum = 2; + UCHAR currDynamicTypeBytesNumSaved = m_currDynamicTypeBytesNum; + m_currDynamicTypeBytesNum = 2; TINT32 valInt; TUINT32 valDec; // bool neg=false; @@ -1500,9 +1500,9 @@ void ParsedPliImp::writeFloatData(double val) { assert(valInt < (0x1 << 15)); assert(valDec < (0x1 << 16)); - writeDinamicData(valInt, val < 0); - writeDinamicData(valDec); - m_currDinamicTypeBytesNum = currDinamicTypeBytesNumSaved; + writeDynamicData(valInt, val < 0); + writeDynamicData(valDec); + m_currDynamicTypeBytesNum = currDynamicTypeBytesNumSaved; } /*=====================================================================*/ @@ -1519,7 +1519,7 @@ PliTag *ParsedPliImp::readGeometricTransformationTag() { readFloatData(affine.a23, bufOffs); TUINT32 tagOffs; - readDinamicData(tagOffs, bufOffs); + readDynamicData(tagOffs, bufOffs); TagElem *elem; PliObjectTag *object = NULL; @@ -1621,12 +1621,12 @@ PliTag *ParsedPliImp::readImageTag() { ++headerLength; } - TUINT32 numObjects = (m_tagLength - headerLength) / m_currDinamicTypeBytesNum; + TUINT32 numObjects = (m_tagLength - headerLength) / m_currDynamicTypeBytesNum; std::unique_ptr object(new PliObjectTag *[numObjects]); std::unique_ptr tagOffs(new TUINT32[numObjects]); for (TUINT32 i = 0; i < numObjects; i++) { - readDinamicData(tagOffs[i], bufOffs); + readDynamicData(tagOffs[i], bufOffs); } TagElem *elem; @@ -1693,9 +1693,9 @@ PliTag *ParsedPliImp::readIntersectionDataTag() { UINT i; for (i = 0; i < branchCount; i++) { TINT32 currInter; - readDinamicData((TINT32 &)branchArray[i].m_strokeIndex, bufOffs); - readDinamicData(currInter, bufOffs); - readDinamicData((TUINT32 &)branchArray[i].m_nextBranch, bufOffs); + readDynamicData((TINT32 &)branchArray[i].m_strokeIndex, bufOffs); + readDynamicData(currInter, bufOffs); + readDynamicData((TUINT32 &)branchArray[i].m_nextBranch, bufOffs); USHORT style; readUShortData(style, bufOffs); branchArray[i].m_style = style; @@ -1838,29 +1838,29 @@ void ParsedPliImp::writeTag(TagElem *elem) { /*=====================================================================*/ -inline void ParsedPliImp::setDinamicTypeBytesNum(int minval, int maxval) { +inline void ParsedPliImp::setDynamicTypeBytesNum(int minval, int maxval) { assert(m_oChan); if (maxval > 32767 || minval < -32767) { - if (m_currDinamicTypeBytesNum != 4) { - m_currDinamicTypeBytesNum = 4; + if (m_currDynamicTypeBytesNum != 4) { + m_currDynamicTypeBytesNum = 4; *m_oChan << (UCHAR)PliTag::SET_DATA_32_CNTRL; } } else if (maxval > 127 || minval < -127) { - if (m_currDinamicTypeBytesNum != 2) { - m_currDinamicTypeBytesNum = 2; + if (m_currDynamicTypeBytesNum != 2) { + m_currDynamicTypeBytesNum = 2; *m_oChan << (UCHAR)PliTag::SET_DATA_16_CNTRL; } - } else if (m_currDinamicTypeBytesNum != 1) { - m_currDinamicTypeBytesNum = 1; + } else if (m_currDynamicTypeBytesNum != 1) { + m_currDynamicTypeBytesNum = 1; *m_oChan << (UCHAR)PliTag::SET_DATA_8_CNTRL; } } /*=====================================================================*/ -inline void ParsedPliImp::writeDinamicData(TUINT32 val) { +inline void ParsedPliImp::writeDynamicData(TUINT32 val) { assert(m_oChan); - switch (m_currDinamicTypeBytesNum) { + switch (m_currDynamicTypeBytesNum) { case 1: *m_oChan << (UCHAR)val; break; @@ -1877,10 +1877,10 @@ inline void ParsedPliImp::writeDinamicData(TUINT32 val) { /*=====================================================================*/ -inline void ParsedPliImp::writeDinamicData(TINT32 val, +inline void ParsedPliImp::writeDynamicData(TINT32 val, bool isNegative = false) { assert(m_oChan); - switch (m_currDinamicTypeBytesNum) { + switch (m_currDynamicTypeBytesNum) { case 1: *m_oChan << complement1((char)val, isNegative); break; @@ -2025,10 +2025,10 @@ tag->m_curve[i] = aff*tag->m_curve[i];*/ SET_MINMAX } - setDinamicTypeBytesNum(minval, maxval); + setDynamicTypeBytesNum(minval, maxval); int tagLength = - (int)(2 * (2 * tag->m_numCurves + 1) * m_currDinamicTypeBytesNum + 1 + 1 + + (int)(2 * (2 * tag->m_numCurves + 1) * m_currDynamicTypeBytesNum + 1 + 1 + 2 * tag->m_numCurves); int offset; if (tag->m_isLoop) @@ -2050,8 +2050,8 @@ tag->m_curve[i] = aff*tag->m_curve[i];*/ *m_oChan << maxThickness; thickRatio = maxThickness / 255.0; - writeDinamicData((TINT32)(scale * tag->m_curve[0].getThickP0().x)); - writeDinamicData((TINT32)(scale * tag->m_curve[0].getThickP0().y)); + writeDynamicData((TINT32)(scale * tag->m_curve[0].getThickP0().x)); + writeDynamicData((TINT32)(scale * tag->m_curve[0].getThickP0().y)); double thick = tag->m_curve[0].getThickP0().thick / thickRatio; WRITE_UCHAR_FROM_DOUBLE(thick < 0 ? 0 : thick); @@ -2063,14 +2063,14 @@ tag->m_curve[i] = aff*tag->m_curve[i];*/ assert(dp.x == (double)(TINT32)dp.x); assert(dp.y == (double)(TINT32)dp.y); - writeDinamicData((TINT32)dp.x); - writeDinamicData((TINT32)dp.y); + writeDynamicData((TINT32)dp.x); + writeDynamicData((TINT32)dp.y); thick = tag->m_curve[i].getThickP1().thick / thickRatio; WRITE_UCHAR_FROM_DOUBLE(thick < 0 ? 0 : thick); dp = convert(scale * (tag->m_curve[i].getP2() - tag->m_curve[i].getP1())); - writeDinamicData((TINT32)dp.x); - writeDinamicData((TINT32)dp.y); + writeDynamicData((TINT32)dp.x); + writeDynamicData((TINT32)dp.y); thick = tag->m_curve[i].getThickP2().thick / thickRatio; WRITE_UCHAR_FROM_DOUBLE(thick < 0 ? 0 : thick); @@ -2107,15 +2107,15 @@ TUINT32 ParsedPliImp::writeGroupTag(GroupTag *tag) { if (objectOffset[i] > (unsigned int)maxval) maxval = (int)objectOffset[i]; } - setDinamicTypeBytesNum(minval, maxval); + setDynamicTypeBytesNum(minval, maxval); - tagLength = tag->m_numObjects * m_currDinamicTypeBytesNum + 1; + tagLength = tag->m_numObjects * m_currDynamicTypeBytesNum + 1; offset = writeTagHeader((UCHAR)PliTag::GROUP_GOBJ, tagLength); *m_oChan << tag->m_type; - for (i = 0; i < tag->m_numObjects; i++) writeDinamicData(objectOffset[i]); + for (i = 0; i < tag->m_numObjects; i++) writeDynamicData(objectOffset[i]); return offset; } @@ -2132,7 +2132,7 @@ TUINT32 ParsedPliImp::writeImageTag(ImageTag *tag) { *m_oChan << (USHORT)tag->m_numFrame.getNumber(); *m_oChan << tag->m_numFrame.getLetter(); - m_currDinamicTypeBytesNum = 3; + m_currDynamicTypeBytesNum = 3; objectOffset = new TUINT32[tag->m_numObjects]; unsigned int i; @@ -2153,16 +2153,16 @@ TUINT32 ParsedPliImp::writeImageTag(ImageTag *tag) { if (objectOffset[i] > (unsigned int)maxval) maxval = (int)objectOffset[i]; } - setDinamicTypeBytesNum(minval, maxval); + setDynamicTypeBytesNum(minval, maxval); - tagLength = tag->m_numObjects * m_currDinamicTypeBytesNum + 3; + tagLength = tag->m_numObjects * m_currDynamicTypeBytesNum + 3; offset = writeTagHeader((UCHAR)PliTag::IMAGE_GOBJ, tagLength); *m_oChan << (USHORT)tag->m_numFrame.getNumber(); *m_oChan << tag->m_numFrame.getLetter(); - for (i = 0; i < tag->m_numObjects; i++) writeDinamicData(objectOffset[i]); + for (i = 0; i < tag->m_numObjects; i++) writeDynamicData(objectOffset[i]); delete[] objectOffset; @@ -2224,9 +2224,9 @@ TUINT32 ParsedPliImp::writeIntersectionDataTag(IntersectionDataTag *tag) { else if (tag->m_branchArray[i].m_strokeIndex > maxval) maxval = tag->m_branchArray[i].m_strokeIndex; } - setDinamicTypeBytesNum(minval, maxval); + setDynamicTypeBytesNum(minval, maxval); - tagLength = 4 + tag->m_branchCount * (3 * m_currDinamicTypeBytesNum + 2) + + tagLength = 4 + tag->m_branchCount * (3 * m_currDynamicTypeBytesNum + 2) + floatWCount * 8 + (tag->m_branchCount - floatWCount) * 1; offset = writeTagHeader((UCHAR)PliTag::INTERSECTION_DATA_GOBJ, tagLength); @@ -2234,11 +2234,11 @@ TUINT32 ParsedPliImp::writeIntersectionDataTag(IntersectionDataTag *tag) { *m_oChan << (TUINT32)tag->m_branchCount; for (i = 0; i < tag->m_branchCount; i++) { - writeDinamicData((TINT32)tag->m_branchArray[i].m_strokeIndex); - writeDinamicData((tag->m_branchArray[i].m_gettingOut) + writeDynamicData((TINT32)tag->m_branchArray[i].m_strokeIndex); + writeDynamicData((tag->m_branchArray[i].m_gettingOut) ? (TINT32)(tag->m_branchArray[i].m_currInter + 1) : -(TINT32)(tag->m_branchArray[i].m_currInter + 1)); - writeDinamicData((TUINT32)tag->m_branchArray[i].m_nextBranch); + writeDynamicData((TUINT32)tag->m_branchArray[i].m_nextBranch); assert(tag->m_branchArray[i].m_style >= 0 && tag->m_branchArray[i].m_style < 65536); @@ -2279,16 +2279,16 @@ TUINT32 ParsedPliImp::writeColorTag(ColorTag *tag) { if (tag->m_color[i] > (unsigned int)maxval) maxval = (int)tag->m_color[i]; } - setDinamicTypeBytesNum(minval, maxval); + setDynamicTypeBytesNum(minval, maxval); - tagLength = tag->m_numColors * m_currDinamicTypeBytesNum + 2; + tagLength = tag->m_numColors * m_currDynamicTypeBytesNum + 2; offset = writeTagHeader((UCHAR)PliTag::COLOR_NGOBJ, tagLength); *m_oChan << (UCHAR)tag->m_style; *m_oChan << (UCHAR)tag->m_attribute; - for (i = 0; i < tag->m_numColors; i++) writeDinamicData(tag->m_color[i]); + for (i = 0; i < tag->m_numColors; i++) writeDynamicData(tag->m_color[i]); return offset; } @@ -2347,16 +2347,16 @@ TUINT32 ParsedPliImp::writeOutlineOptionsTag(StrokeOutlineOptionsTag *tag) { TINT32 miterLower = scale * tag->m_options.m_miterLower; TINT32 miterUpper = scale * tag->m_options.m_miterUpper; - setDinamicTypeBytesNum(scale * miterLower, scale * miterUpper); + setDynamicTypeBytesNum(scale * miterLower, scale * miterUpper); - int tagLength = 2 + 2 * m_currDinamicTypeBytesNum; + int tagLength = 2 + 2 * m_currDynamicTypeBytesNum; int offset = (int)writeTagHeader((UCHAR)PliTag::OUTLINE_OPTIONS_GOBJ, tagLength); *m_oChan << (UCHAR)tag->m_options.m_capStyle; *m_oChan << (UCHAR)tag->m_options.m_joinStyle; - writeDinamicData(miterLower); - writeDinamicData(miterUpper); + writeDynamicData(miterLower); + writeDynamicData(miterUpper); return offset; } @@ -2366,13 +2366,13 @@ TUINT32 ParsedPliImp::writeOutlineOptionsTag(StrokeOutlineOptionsTag *tag) { TUINT32 ParsedPliImp::writePrecisionScaleTag(PrecisionScaleTag *tag) { assert(m_oChan); - setDinamicTypeBytesNum(0, tag->m_precisionScale); + setDynamicTypeBytesNum(0, tag->m_precisionScale); - int tagLength = m_currDinamicTypeBytesNum; + int tagLength = m_currDynamicTypeBytesNum; int offset = (int)writeTagHeader((UCHAR)PliTag::PRECISION_SCALE_GOBJ, tagLength); - writeDinamicData((TINT32)tag->m_precisionScale); + writeDynamicData((TINT32)tag->m_precisionScale); return offset; } @@ -2380,13 +2380,13 @@ TUINT32 ParsedPliImp::writePrecisionScaleTag(PrecisionScaleTag *tag) { TUINT32 ParsedPliImp::writeAutoCloseToleranceTag(AutoCloseToleranceTag *tag) { assert(m_oChan); - setDinamicTypeBytesNum(0, 10000); + setDynamicTypeBytesNum(0, 10000); - int tagLength = m_currDinamicTypeBytesNum; + int tagLength = m_currDynamicTypeBytesNum; int offset = (int)writeTagHeader((UCHAR)PliTag::AUTOCLOSE_TOLERANCE_GOBJ, tagLength); - writeDinamicData((TINT32)tag->m_autoCloseTolerance); + writeDynamicData((TINT32)tag->m_autoCloseTolerance); return offset; } @@ -2444,27 +2444,27 @@ TUINT32 ParsedPliImp::writeGeometricTransformationTag( if (intVal[5] < minval) minval = (int)intVal[5]; if (intVal[5] > maxval) maxval = (int)intVal[5]; - setDinamicTypeBytesNum(minval, maxval); + setDynamicTypeBytesNum(minval, maxval); - tagLength = (1 + 6 * 2) * m_currDinamicTypeBytesNum; + tagLength = (1 + 6 * 2) * m_currDynamicTypeBytesNum; offset = writeTagHeader((UCHAR)PliTag::GEOMETRIC_TRANSFORMATION_GOBJ, tagLength); - writeDinamicData(intVal[0]); - writeDinamicData(decVal[0]); - writeDinamicData(intVal[1]); - writeDinamicData(decVal[1]); - writeDinamicData(intVal[2]); - writeDinamicData(decVal[2]); - writeDinamicData(intVal[3]); - writeDinamicData(decVal[3]); - writeDinamicData(intVal[4]); - writeDinamicData(decVal[4]); - writeDinamicData(intVal[5]); - writeDinamicData(decVal[5]); - - writeDinamicData(objectOffset); + writeDynamicData(intVal[0]); + writeDynamicData(decVal[0]); + writeDynamicData(intVal[1]); + writeDynamicData(decVal[1]); + writeDynamicData(intVal[2]); + writeDynamicData(decVal[2]); + writeDynamicData(intVal[3]); + writeDynamicData(decVal[3]); + writeDynamicData(intVal[4]); + writeDynamicData(decVal[4]); + writeDynamicData(intVal[5]); + writeDynamicData(decVal[5]); + + writeDynamicData(objectOffset); return offset; } @@ -2486,16 +2486,16 @@ TUINT32 ParsedPliImp::writeDoublePairTag(DoublePairTag *tag) { if (yIntVal > maxval) maxval = (int)yIntVal; if ((int)yDecVal > maxval) maxval = (int)yDecVal; - setDinamicTypeBytesNum(minval, maxval); + setDynamicTypeBytesNum(minval, maxval); - tagLength = 4 * m_currDinamicTypeBytesNum; + tagLength = 4 * m_currDynamicTypeBytesNum; offset = writeTagHeader((UCHAR)PliTag::DOUBLEPAIR_OBJ, tagLength); - writeDinamicData(xIntVal); - writeDinamicData(xDecVal); - writeDinamicData(yIntVal); - writeDinamicData(yDecVal); + writeDynamicData(xIntVal); + writeDynamicData(xDecVal); + writeDynamicData(yIntVal); + writeDynamicData(yDecVal); return offset; } @@ -2551,7 +2551,7 @@ bool ParsedPliImp::writePli(const TFilePath &filename) { CHECK_FOR_WRITE_ERROR(filename); - m_currDinamicTypeBytesNum = 2; + m_currDynamicTypeBytesNum = 2; for (TagElem *elem = m_firstTag; elem; elem = elem->m_next) { writeTag(elem); diff --git a/toonz/sources/image/pli/pli_io.h b/toonz/sources/image/pli/pli_io.h index 48c96bd..eb27ad6 100644 --- a/toonz/sources/image/pli/pli_io.h +++ b/toonz/sources/image/pli/pli_io.h @@ -204,7 +204,7 @@ public: //===================================================================== /*! -All the geometric tags that contains curve informations are +All the geometric tags that contains curve information are instantiations of this template class */ @@ -319,7 +319,7 @@ public: StyleTag(); StyleTag(int id, USHORT pagePaletteindex, int m_numParams, TStyleParam *m_params); - StyleTag(const StyleTag &trasformationTag); + StyleTag(const StyleTag &transformationTag); ~StyleTag(); }; @@ -333,7 +333,7 @@ public: GeometricTransformationTag(); GeometricTransformationTag(const TAffine &affine, PliGeometricTag *m_object); GeometricTransformationTag( - const GeometricTransformationTag &trasformationTag); + const GeometricTransformationTag &transformationTag); ~GeometricTransformationTag(); }; diff --git a/toonz/sources/image/pli/tags.cpp b/toonz/sources/image/pli/tags.cpp index b36a0e7..f9fd5f4 100644 --- a/toonz/sources/image/pli/tags.cpp +++ b/toonz/sources/image/pli/tags.cpp @@ -395,10 +395,10 @@ GeometricTransformationTag::GeometricTransformationTag() /*=====================================================================*/ GeometricTransformationTag::GeometricTransformationTag( - const GeometricTransformationTag &trasformationTag) + const GeometricTransformationTag &transformationTag) : PliGeometricTag(PliTag::GEOMETRIC_TRANSFORMATION_GOBJ) - , m_affine(trasformationTag.m_affine) - , m_object(trasformationTag.m_object) {} + , m_affine(transformationTag.m_affine) + , m_object(transformationTag.m_object) {} /*=====================================================================*/ diff --git a/toonz/sources/image/pli/tiio_pli.cpp b/toonz/sources/image/pli/tiio_pli.cpp index d17ff42..311e982 100644 --- a/toonz/sources/image/pli/tiio_pli.cpp +++ b/toonz/sources/image/pli/tiio_pli.cpp @@ -25,11 +25,11 @@ namespace { //--------------------------------------------------------------------------- -class PliOuputStream final : public TOutputStreamInterface { +class PliOutputStream final : public TOutputStreamInterface { std::vector *m_stream; public: - PliOuputStream(std::vector *stream) : m_stream(stream) {} + PliOutputStream(std::vector *stream) : m_stream(stream) {} TOutputStreamInterface &operator<<(double x) override { m_stream->push_back(TStyleParam(x)); return *this; @@ -183,7 +183,7 @@ pli->m_idWrittenColorsArray[0]=true; // TColorStyle*style = tempVecImg->getPalette()->getStyle(styleId); std::vector stream; - PliOuputStream chan(&stream); + PliOutputStream chan(&stream); style->save(chan); // viene riempito lo stream; assert(pageIndex >= 0 && pageIndex <= 65535); @@ -216,7 +216,7 @@ pli->m_idWrittenColorsArray[0]=true; // TColorStyle*style = tempVecImg->getPalette()->getStyle(styleId); std::vector stream; - PliOuputStream chan(&stream); + PliOutputStream chan(&stream); style->save(chan); // viene riempito lo stream; assert(pageIndex >= 0 && pageIndex <= 65535); @@ -816,7 +816,7 @@ TLevelP TLevelReaderPli::loadInfo() { } catch (std::exception &e) { TSystem::outputDebug(e.what()); - throw TImageException(getFilePath(), "Unknow error on reading file"); + throw TImageException(getFilePath(), "Unknown error on reading file"); } catch (...) { throw; } diff --git a/toonz/sources/include/tnzcamera.h b/toonz/sources/include/tnzcamera.h index aeab697..3b6fa29 100644 --- a/toonz/sources/include/tnzcamera.h +++ b/toonz/sources/include/tnzcamera.h @@ -10,7 +10,7 @@ #include "toonz/toonzscene.h" //#define WRITE_LOG_FILE -//#define CHECK_VIDEO_FRAME_INTERVALL +//#define CHECK_VIDEO_FRAME_INTERVAL //#define USE_OPENGL_SHARED #undef DVAPI @@ -100,8 +100,8 @@ class DVAPI TnzCamera : public QObject { bool m_freeze; -#ifdef CHECK_VIDEO_FRAME_INTERVALL - double m_videoFrameIntervall; +#ifdef CHECK_VIDEO_FRAME_INTERVAL + double m_videoFrameInterval; #endif TnzCamera(); @@ -132,9 +132,9 @@ public: TXshSimpleLevel *getCurrentLevel() const; TFrameId getCurrentFid() const; -#ifdef CHECK_VIDEO_FRAME_INTERVALL - double getVideoFrameIntervall() const { return m_videoFrameIntervall; } - void setVideoFrameIntervall(double intervall); +#ifdef CHECK_VIDEO_FRAME_INTERVAL + double getVideoFrameInterval() const { return m_videoFrameInterval; } + void setVideoFrameInterval(double interval); #endif bool isAcquireFrame() const { return m_acquireFrame; } diff --git a/toonz/sources/include/toonzqt/paramfield.h b/toonz/sources/include/toonzqt/paramfield.h index fcd5e24..5a0b4c3 100644 --- a/toonz/sources/include/toonzqt/paramfield.h +++ b/toonz/sources/include/toonzqt/paramfield.h @@ -91,7 +91,7 @@ public: virtual void setPointValue(const TPointD &p){}; - virtual QSize getPreferedSize() { return QSize(200, 28); } + virtual QSize getPreferredSize() { return QSize(200, 28); } static void setFxHandle(TFxHandle *fxHandle); @@ -369,7 +369,7 @@ public: void updateField(double value) override; - QSize getPreferedSize() override { return QSize(260, 26); } + QSize getPreferredSize() override { return QSize(260, 26); } void setPrecision(int precision) override; protected slots: @@ -393,7 +393,7 @@ public: void updateField(DoublePair value) override; - QSize getPreferedSize() override { return QSize(300, 20); } + QSize getPreferredSize() override { return QSize(300, 20); } void setPrecision(int precision) override; protected slots: @@ -418,7 +418,7 @@ public: void updateField(TPointD value) override; - QSize getPreferedSize() override { return QSize(270, 28); } + QSize getPreferredSize() override { return QSize(270, 28); } protected slots: void onChange(bool); @@ -440,7 +440,7 @@ public: void updateField(TPixel32 value) override; - QSize getPreferedSize() override { return QSize(480, 40); } + QSize getPreferredSize() override { return QSize(480, 40); } /*-- RgbLinkButtonの実行のため --*/ TPixel32 getColor(); @@ -489,7 +489,7 @@ public: void setParams(); - QSize getPreferedSize() override { return QSize(477, 60); } + QSize getPreferredSize() override { return QSize(477, 60); } protected slots: void onKeyToggled(); @@ -544,7 +544,7 @@ public: int frame) override; void update(int frame) override; - QSize getPreferedSize() override { return QSize(150, 20); } + QSize getPreferredSize() override { return QSize(150, 20); } protected slots: void onChange(const QString &str); @@ -567,7 +567,7 @@ public: int frame) override; void update(int frame) override; - QSize getPreferedSize() override { return QSize(20, 15); } + QSize getPreferredSize() override { return QSize(20, 15); } protected slots: void onToggled(bool checked); @@ -596,7 +596,7 @@ public: int frame) override; void update(int frame) override; - QSize getPreferedSize() override { return QSize(50, 19); } + QSize getPreferredSize() override { return QSize(50, 19); } protected slots: void onChange(bool isDragging = false); @@ -636,7 +636,7 @@ public: int frame) override; void update(int frame) override; - QSize getPreferedSize() override { + QSize getPreferredSize() override { if (m_textFld) return QSize(100, 20); else @@ -666,7 +666,7 @@ public: int frame) override; void update(int frame) override; - QSize getPreferedSize() override { return QSize(150, 20); } + QSize getPreferredSize() override { return QSize(150, 20); } protected slots: void findStyles(const QFont &font); @@ -692,7 +692,7 @@ public: void setParams(); - QSize getPreferedSize() override; + QSize getPreferredSize() override; protected slots: void onChannelChanged(int); diff --git a/toonz/sources/include/tsop.h b/toonz/sources/include/tsop.h index 5fbfba3..ca2b777 100644 --- a/toonz/sources/include/tsop.h +++ b/toonz/sources/include/tsop.h @@ -71,10 +71,10 @@ DVAPI void echo(TSoundTrackP &dst, const TSoundTrackP &src, double delayTime, double decayFactor, double extendTime); /*! - Streches the soundtrack src with the specified feature and + Stretches the soundtrack src with the specified feature and returns the obtained soundtrack */ -DVAPI TSoundTrackP timeStrech(TSoundTrackP src, double ratio); +DVAPI TSoundTrackP timeStretch(TSoundTrackP src, double ratio); /*! Do the mixing between the two soundtrack a1 and a2 must be inside [0.0,1.0] diff --git a/toonz/sources/stdfx/ino_common.cpp b/toonz/sources/stdfx/ino_common.cpp index 9b28199..ef95829 100644 --- a/toonz/sources/stdfx/ino_common.cpp +++ b/toonz/sources/stdfx/ino_common.cpp @@ -536,7 +536,7 @@ m_down,m_upは繋がっている方があればそれを表示する 表示スイッチを切ってあるならm_upを表示する fxをreplaceすると、 m_source --> m_up (=port0) - m_refernce --> m_down(=port1) + m_reference --> m_down(=port1) となる */ const bool up_is = (this->m_up.isConnected() && diff --git a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp index 8da4d15..2e05c3f 100644 --- a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp +++ b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp @@ -75,13 +75,13 @@ static unsigned char NotReady = 1 << 6; #define log(_str) -class TScannerExpection final : public TException { +class TScannerException final : public TException { TString m_scannerMsg; public: - TScannerExpection(const std::vector ¬Fatal, + TScannerException(const std::vector ¬Fatal, const std::string &fatal) - : TException("Scanner Expection") { + : TException("Scanner Exception") { m_scannerMsg = ::to_wstring(fatal); for (int i = notFatal.size(); i; i--) m_scannerMsg += L"\n" + ::to_wstring(notFatal[i - 1]); @@ -412,7 +412,7 @@ fclose(myFile);*/ (params.m_paperFeeder.m_value == 1.)) { if (!ESCI_command_1b('e', 1, true)) { std::vector notFatal; - throw TScannerExpection(notFatal, "Scanner error (un)loading paper"); + throw TScannerException(notFatal, "Scanner error (un)loading paper"); } unsigned char p = 0x0C; bool status = true; @@ -571,7 +571,7 @@ void TScannerEpson::doSettings(const TScannerParameters ¶ms, (params.m_paperFeeder.m_value == 1.)) { unsigned char v = (params.m_paperFeeder.m_value == 1.) ? 0x01 : 0x00; if (!ESCI_command_1b('e', v, true)) - throw TScannerExpection(notFatal, "Scanner error (un)loading paper"); + throw TScannerException(notFatal, "Scanner error (un)loading paper"); if (v) { unsigned char p = 0x19; bool status = true; @@ -583,7 +583,7 @@ void TScannerEpson::doSettings(const TScannerParameters ¶ms, unsigned char setParamCmd[2] = {0x1C, 0x57}; int wrote = send(&setParamCmd[0], 2); if (wrote != 2) - throw TScannerExpection(notFatal, + throw TScannerException(notFatal, "Error setting scanner parameters - W -"); if (!expectACK()) { @@ -592,7 +592,7 @@ void TScannerEpson::doSettings(const TScannerParameters ¶ms, } wrote = send(&cmd[0], 0x40); if (wrote != 0x40) - throw TScannerExpection(notFatal, + throw TScannerException(notFatal, "Error setting scanner parameters - D -"); if (!expectACK()) { @@ -603,7 +603,7 @@ void TScannerEpson::doSettings(const TScannerParameters ¶ms, break; } if (retryCount <= 0) - throw TScannerExpection( + throw TScannerException( notFatal, "Error setting scanner parameters, too many retries"); log("doSettings:OK"); } diff --git a/toonz/sources/tnzext/Selector.cpp b/toonz/sources/tnzext/Selector.cpp index 35579ea..20e754a 100644 --- a/toonz/sources/tnzext/Selector.cpp +++ b/toonz/sources/tnzext/Selector.cpp @@ -150,9 +150,9 @@ void Selector::draw(Designer *designer) { TPointD // offset(length, 0.0), offset(length, length), - bottom_left = center - offset, top_rigth = center + offset; + bottom_left = center - offset, top_right = center + offset; - TRectD rectangle(bottom_left, top_rigth); + TRectD rectangle(bottom_left, top_right); if (isSelected_ == LENGTH) tglFillRect(rectangle); @@ -210,11 +210,11 @@ drawArrow(down, TPointD offset(length, 0.0), bottom_left = center - offset, - top_rigth = center + offset; + top_right = center + offset; TRectD rectangle(bottom_left, - top_rigth); + top_right); rectangle = rectangle.enlarge( 2.0* pixel_size_); @@ -319,9 +319,9 @@ Selector::Selection Selector::getSelection(const TPointD &pos) { TPointD // offset(length, 0.0), offset(length, length), - bottom_left = center - offset, top_rigth = center + offset; + bottom_left = center - offset, top_right = center + offset; - TRectD rectangle(bottom_left, top_rigth); + TRectD rectangle(bottom_left, top_right); rectangle = rectangle.enlarge(2.0 * pixel_size_); diff --git a/toonz/sources/tnztools/bluredbrush.cpp b/toonz/sources/tnztools/bluredbrush.cpp index 72f22aa..fdc01a0 100644 --- a/toonz/sources/tnztools/bluredbrush.cpp +++ b/toonz/sources/tnztools/bluredbrush.cpp @@ -155,12 +155,12 @@ TRasterP rasterFromQImage( //======================================================= BluredBrush::BluredBrush(const TRaster32P &ras, int size, - const QRadialGradient &gradient, bool doDinamicOpacity) + const QRadialGradient &gradient, bool doDynamicOpacity) : m_ras(ras) , m_size(size) , m_lastPoint(0, 0) , m_oldOpacity(0) - , m_enableDinamicOpacity(doDinamicOpacity) { + , m_enableDynamicOpacity(doDynamicOpacity) { m_rasImage = rasterToQImage(m_ras, false); m_gradient = gradient; @@ -188,7 +188,7 @@ void BluredBrush::addPoint(const TThickPoint &p, double opacity) { painter.setMatrix( QMatrix(scaleFactor, 0.0, 0.0, scaleFactor, p.x - radius, p.y - radius), false); - if (m_enableDinamicOpacity) painter.setOpacity(opacity); + if (m_enableDynamicOpacity) painter.setOpacity(opacity); painter.drawEllipse(0, 0, m_size, m_size); painter.end(); @@ -219,7 +219,7 @@ void BluredBrush::addArc(const TThickPoint &pa, const TThickPoint &pb, painter.setMatrix(QMatrix(scaleFactor, 0.0, 0.0, scaleFactor, point.x - radius, point.y - radius), false); - if (m_enableDinamicOpacity) { + if (m_enableDynamicOpacity) { double opacity = opacityA + ((opacityC - opacityA) * t); if (fabs(opacity - m_oldOpacity) > 0.01) opacity = @@ -294,7 +294,7 @@ void BluredBrush::updateDrawing(const TRasterP ras, const TRasterP rasBackup, p.end(); p.begin(&image); - p.setOpacity(m_enableDinamicOpacity ? 1 : opacity); + p.setOpacity(m_enableDynamicOpacity ? 1 : opacity); p.drawImage(qTargetRect, app, app.rect()); p.end(); } else { @@ -303,7 +303,7 @@ void BluredBrush::updateDrawing(const TRasterP ras, const TRasterP rasBackup, QImage::Format_ARGB32_Premultiplied, colorTable); QPainter p(&targetImage); - p.setOpacity(m_enableDinamicOpacity ? 1 : opacity); + p.setOpacity(m_enableDynamicOpacity ? 1 : opacity); p.drawImage(QPoint(), app, app.rect()); p.end(); targetImage = diff --git a/toonz/sources/tnztools/bluredbrush.h b/toonz/sources/tnztools/bluredbrush.h index 10cfc43..e1468a4 100644 --- a/toonz/sources/tnztools/bluredbrush.h +++ b/toonz/sources/tnztools/bluredbrush.h @@ -23,7 +23,7 @@ class BluredBrush { QRadialGradient m_gradient; TThickPoint m_lastPoint; double m_oldOpacity; - bool m_enableDinamicOpacity; + bool m_enableDynamicOpacity; QSet m_aboveStyleIds; @@ -31,7 +31,7 @@ class BluredBrush { public: BluredBrush(const TRaster32P &ras, int size, const QRadialGradient &gradient, - bool doDinamicOpacity); + bool doDynamicOpacity); ~BluredBrush(); void addPoint(const TThickPoint &p, double opacity); diff --git a/toonz/sources/tnztools/irontool.cpp b/toonz/sources/tnztools/irontool.cpp index a52b1f5..cff1e17 100644 --- a/toonz/sources/tnztools/irontool.cpp +++ b/toonz/sources/tnztools/irontool.cpp @@ -31,11 +31,11 @@ const int MY_ERROR = -1; //----------------------------------------------------------------------------- // index must be between 0 and controlPointCount-1 -inline bool isIncluded(int index, int left, int rigth) { - if (left < rigth) { - return left <= index && index <= rigth; +inline bool isIncluded(int index, int left, int right) { + if (left < right) { + return left <= index && index <= right; } else { - return left <= index || index <= rigth; + return left <= index || index <= right; } } diff --git a/toonz/sources/tnztools/pumptool.cpp b/toonz/sources/tnztools/pumptool.cpp index 725bfd3..c2192d8 100644 --- a/toonz/sources/tnztools/pumptool.cpp +++ b/toonz/sources/tnztools/pumptool.cpp @@ -577,12 +577,12 @@ double PumpTool::actionRadius(double strokeLength) { double toolSize = m_toolSize.getValue(); double toolPercent = toolSize * 0.01; double interpolationVal = pow(toolPercent, 5); - double indipendentValue = 7.0 * toolSize; + double independentValue = 7.0 * toolSize; - double actionRadius = (indipendentValue) * (1.0 - interpolationVal) + + double actionRadius = (independentValue) * (1.0 - interpolationVal) + (strokeLength * toolPercent) * interpolationVal; - return std::max(actionRadius, indipendentValue); + return std::max(actionRadius, independentValue); } //---------------------------------------------------------------------- diff --git a/toonz/sources/toonz/ObjectTracker.cpp b/toonz/sources/toonz/ObjectTracker.cpp index d79a781..4765b19 100644 --- a/toonz/sources/toonz/ObjectTracker.cpp +++ b/toonz/sources/toonz/ObjectTracker.cpp @@ -218,7 +218,7 @@ void CObjectTracker::FindHistogram(TRaster32P *frame, float(*histogram), x <= std::min(m_sTrackingObject.X + m_sTrackingObject.W / 2, m_nImageWidth - 1); x++) { - E = CheckEdgeExistance(frame, x, y); + E = CheckEdgeExistence(frame, x, y); pixelValues = GetPixelValues(frame, x, y); @@ -292,7 +292,7 @@ void CObjectTracker::FindHistogramBackground(TRaster32P *frame, (x <= (m_sTrackingObject.X + m_sTrackingObject.W / 2))) continue; - E = CheckEdgeExistance(frame, x, y); + E = CheckEdgeExistence(frame, x, y); pixelValues = GetPixelValues(frame, x, y); @@ -370,7 +370,7 @@ void CObjectTracker::FindWightsAndCOM(TRaster32P *frame, float(*histogram)) { x <= std::min(m_sTrackingObject.X + m_sTrackingObject.W / 2, m_nImageWidth - 1); x++) { - E = CheckEdgeExistance(frame, x, y); + E = CheckEdgeExistence(frame, x, y); pixelValues = GetPixelValues(frame, x, y); @@ -398,7 +398,7 @@ void CObjectTracker::FindWightsAndCOM(TRaster32P *frame, float(*histogram)) { //-------------------------------------------------------------------------------------------------------- // Edge Information of pixel -UBYTE8 CObjectTracker::CheckEdgeExistance(TRaster32P *frame, short _x, +UBYTE8 CObjectTracker::CheckEdgeExistence(TRaster32P *frame, short _x, short _y) { UBYTE8 E = 0; short GrayCenter = 0; diff --git a/toonz/sources/toonz/ObjectTracker.h b/toonz/sources/toonz/ObjectTracker.h index 2bc4236..d1c5e16 100644 --- a/toonz/sources/toonz/ObjectTracker.h +++ b/toonz/sources/toonz/ObjectTracker.h @@ -94,7 +94,7 @@ private: void FindWightsAndCOM(TRaster32P *frame, float(*histogram)); //-------------------------------------------------------------------------------------------------------- - UBYTE8 CheckEdgeExistance(TRaster32P *frame, short _x, short _y); + UBYTE8 CheckEdgeExistence(TRaster32P *frame, short _x, short _y); //-------------------------------------------------------------------------------------------------------- void UpdateInitialHistogram(float(*histogram)); diff --git a/toonz/sources/toonz/filmstrip.cpp b/toonz/sources/toonz/filmstrip.cpp index 9cd6b7a..fd6d3df 100644 --- a/toonz/sources/toonz/filmstrip.cpp +++ b/toonz/sources/toonz/filmstrip.cpp @@ -1973,7 +1973,7 @@ void Filmstrip::load(QSettings &settings) { //----------------------------------------------------------------------------- InbetweenDialog::InbetweenDialog(QWidget *parent) - : Dialog(TApp::instance()->getMainWindow(), true, "InBeetween") { + : Dialog(TApp::instance()->getMainWindow(), true, "InBetween") { setWindowTitle(tr("Inbetween")); QString linear(tr("Linear")); diff --git a/toonz/sources/toonz/toolbar.cpp b/toonz/sources/toonz/toolbar.cpp index dc4e6d0..5dd543a 100755 --- a/toonz/sources/toonz/toolbar.cpp +++ b/toonz/sources/toonz/toolbar.cpp @@ -34,7 +34,7 @@ TEnv::IntVar ShowAllToolsToggle("ShowAllToolsToggle", 1); namespace { struct { const char *toolName; - bool collapsable; + bool collapsible; QAction *action; } buttonLayout[] = {{T_Edit, false, 0}, {T_Selection, false, 0}, {"Separator_1", false, 0}, {T_Brush, false, 0}, @@ -178,7 +178,7 @@ void Toolbar::updateToolbar() { (m_toolbarLevel & LEVELCOLUMN_XSHLEVEL)) enable = true; - if (!m_isExpanded && buttonLayout[idx].collapsable) continue; + if (!m_isExpanded && buttonLayout[idx].collapsible) continue; if (!buttonLayout[idx].action) { if (isSeparator) diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp index 4a755db..d197ac0 100644 --- a/toonz/sources/toonz/xshcellviewer.cpp +++ b/toonz/sources/toonz/xshcellviewer.cpp @@ -152,7 +152,7 @@ void parse_with_letter(const QString &text, std::wstring &levelName, TFrameId &fid) { QRegExp spaces("\\t|\\s"); QRegExp numbers("\\d+"); - QRegExp caracters("[^\\d+]"); + QRegExp characters("[^\\d+]"); QString str = text; // remove final spaces @@ -169,12 +169,12 @@ void parse_with_letter(const QString &text, std::wstring &levelName, // if input only digits / alphabet if (lastSpaceIndex == -1) { // in case of only level name - if (str.contains(caracters) && !str.contains(numbers)) { + if (str.contains(characters) && !str.contains(numbers)) { levelName = text.toStdWString(); fid = TFrameId::NO_FRAME; } // in case of input frame number + alphabet - else if (str.contains(numbers) && str.contains(caracters)) { + else if (str.contains(numbers) && str.contains(characters)) { levelName = L""; QString appendix = str.right(1); @@ -202,7 +202,7 @@ void parse_with_letter(const QString &text, std::wstring &levelName, str.chop(1); - if (str.contains(caracters) || !str.contains(numbers)) { + if (str.contains(characters) || !str.contains(numbers)) { levelName = text.toStdWString(); fid = TFrameId::NO_FRAME; return; @@ -225,7 +225,7 @@ void parse_with_letter(const QString &text, std::wstring &levelName, levelName = firstString.toStdWString(); // frame number + alphabet - if (lastString.contains(caracters)) { + if (lastString.contains(characters)) { QString appendix = lastString.right(1); int appendNum = 0; @@ -251,7 +251,7 @@ void parse_with_letter(const QString &text, std::wstring &levelName, lastString.chop(1); - if (lastString.contains(caracters) || !lastString.contains(numbers)) { + if (lastString.contains(characters) || !lastString.contains(numbers)) { levelName = text.toStdWString(); fid = TFrameId::NO_FRAME; return; @@ -276,7 +276,7 @@ void parse_with_letter(const QString &text, std::wstring &levelName, void parse(const QString &text, std::wstring &levelName, TFrameId &fid) { QRegExp spaces("\\t|\\s"); QRegExp numbers("\\d+"); - QRegExp caracters("[^\\d+]"); + QRegExp characters("[^\\d+]"); QRegExp fidWithSuffix("([0-9]+)([a-z]?)"); QString str = text; @@ -291,7 +291,7 @@ void parse(const QString &text, std::wstring &levelName, TFrameId &fid) { } int lastSpaceIndex = str.lastIndexOf(spaces); if (lastSpaceIndex == -1) { - if (str.contains(numbers) && !str.contains(caracters)) { + if (str.contains(numbers) && !str.contains(characters)) { levelName = L""; fid = TFrameId(str.toInt()); } else if (fidWithSuffix.exactMatch(str)) { @@ -299,13 +299,13 @@ void parse(const QString &text, std::wstring &levelName, TFrameId &fid) { fid = TFrameId( fidWithSuffix.cap(1).toInt(), fidWithSuffix.cap(2) == "" ? 0 : fidWithSuffix.cap(2).toLatin1()[0]); - } else if (str.contains(caracters)) { + } else if (str.contains(characters)) { levelName = text.toStdWString(); fid = TFrameId::NO_FRAME; } } else { QString lastString = str.right(str.size() - 1 - lastSpaceIndex); - if (lastString.contains(numbers) && !lastString.contains(caracters)) { + if (lastString.contains(numbers) && !lastString.contains(characters)) { QString firstString = str.left(lastSpaceIndex); levelName = firstString.toStdWString(); fid = TFrameId(lastString.toInt()); @@ -315,7 +315,7 @@ void parse(const QString &text, std::wstring &levelName, TFrameId &fid) { fid = TFrameId( fidWithSuffix.cap(1).toInt(), fidWithSuffix.cap(2) == "" ? 0 : fidWithSuffix.cap(2).toLatin1()[0]); - } else if (lastString.contains(caracters)) { + } else if (lastString.contains(characters)) { levelName = text.toStdWString(); fid = TFrameId::NO_FRAME; } @@ -898,7 +898,7 @@ bool RenameCellField::eventFilter(QObject *obj, QEvent *e) { std::string actionId = CommandManager::instance()->getIdFromAction(action); - // These are usally standard ctrl/command strokes for text editing. + // These are usually standard ctrl/command strokes for text editing. // Default to standard behavior and don't execute OT's action while renaming // cell if users prefer to do so. // Or, always invoke OT's commands when renaming cell even the standard diff --git a/toonz/sources/toonzlib/Naa2TlvConverter.cpp b/toonz/sources/toonzlib/Naa2TlvConverter.cpp index 2bd2b7b..d3ff867 100644 --- a/toonz/sources/toonzlib/Naa2TlvConverter.cpp +++ b/toonz/sources/toonzlib/Naa2TlvConverter.cpp @@ -785,7 +785,7 @@ void Naa2TlvConverter::addBorderInks() // add syntethic inks: lines between two (m_regions[c1].type & RegionInfo::Paint) != 0) { // OLD: note: we consider only regions with a lower index, to avoid // to create double border strokes - // NEW: we put syntetic ink pixels in larger regions + // NEW: we put synthetic ink pixels in larger regions // UPDATE 2017/5/12 : we put ink on darker style if (colorsBrightness[m_regions[c1].colorIndex] > colorsBrightness[m_regions[c].colorIndex]) { @@ -1039,10 +1039,10 @@ TToonzImageP Naa2TlvConverter::makeTlv(bool transparentSyntheticInks, styleIds.append(styleId); if (!usedStyleIds.contains(styleId)) usedStyleIds.append(styleId); } - styleIds.append(0); // syntetic ink + styleIds.append(0); // synthetic ink - // int synteticInkStyleId = palette->getPage(0)->addStyle(TPixel32(0,0,0,0)); - // styleIds.append(synteticInkStyleId); + // int syntheticInkStyleId = palette->getPage(0)->addStyle(TPixel32(0,0,0,0)); + // styleIds.append(syntheticInkStyleId); for (int y = 0; y < ly; y++) { unsigned short *workScanLine = m_regionRas->pixels(y); diff --git a/toonz/sources/toonzlib/tstageobjectcmd.cpp b/toonz/sources/toonzlib/tstageobjectcmd.cpp index 71fdc6e..356009b 100644 --- a/toonz/sources/toonzlib/tstageobjectcmd.cpp +++ b/toonz/sources/toonzlib/tstageobjectcmd.cpp @@ -827,11 +827,11 @@ void removeStageObjectNode(const TStageObjectId &id, TXsheetHandle *xshHandle, //=================================================================== // -// removeColums +// removeColumns // //------------------------------------------------------------------- -void removeColums(const QVector &columnIndexes, TXsheetHandle *xshHandle, +void removeColumns(const QVector &columnIndexes, TXsheetHandle *xshHandle, TObjectHandle *objHandle, TFxHandle *fxHandle, bool doUndo = true) { TXsheet *xsh = xshHandle->getXsheet(); @@ -1502,7 +1502,7 @@ void TStageObjectCmd::deleteSelection( } // remove all selected objects - removeColums(columnIndexes, xshHandle, objHandle, fxHandle, doUndo); + removeColumns(columnIndexes, xshHandle, objHandle, fxHandle, doUndo); int i; for (i = pegbarIndexes.size() - 1; i >= 0; i--) removeStageObjectNode(TStageObjectId::PegbarId(pegbarIndexes[i]), xshHandle, diff --git a/toonz/sources/toonzqt/fxsettings.cpp b/toonz/sources/toonzqt/fxsettings.cpp index fa9bbea..3690a3a 100644 --- a/toonz/sources/toonzqt/fxsettings.cpp +++ b/toonz/sources/toonzqt/fxsettings.cpp @@ -590,7 +590,7 @@ QSize getItemSize(QLayoutItem *item) { } ParamField *pF = dynamic_cast(item->widget()); - if (pF) return pF->getPreferedSize(); + if (pF) return pF->getPreferredSize(); Separator *sep = dynamic_cast(item->widget()); if (sep) return QSize(0, 16); diff --git a/toonz/sources/toonzqt/paramfield.cpp b/toonz/sources/toonzqt/paramfield.cpp index aaafc9d..e9b5e78 100644 --- a/toonz/sources/toonzqt/paramfield.cpp +++ b/toonz/sources/toonzqt/paramfield.cpp @@ -1862,7 +1862,7 @@ void ToneCurveParamField::setParams() { //----------------------------------------------------------------------------- -QSize ToneCurveParamField::getPreferedSize() { +QSize ToneCurveParamField::getPreferredSize() { if (m_toneCurveField->isEnlarged()) return QSize(676, 640); else