From b49bc5d1b1fbe6a84fe8746ef0ba18fee95d5a28 Mon Sep 17 00:00:00 2001 From: luz paz Date: Aug 10 2021 17:27:16 +0000 Subject: Fix Dinamic->Dynamic --- 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/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);