updated copyright.
[platform/core/graphics/tizenvg.git] / src / lib / sw_engine / tvgSwShape.cpp
index ca5548c..82d812e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020-2021 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2020 - 2023 the ThorVG project. All rights reserved.
 
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -19,6 +19,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
+
 #include "tvgSwCommon.h"
 #include "tvgBezier.h"
 #include <float.h>
@@ -64,7 +65,7 @@ static bool _growOutlineContour(SwOutline& outline, uint32_t n)
 {
     if (outline.reservedCntrsCnt >= outline.cntrsCnt + n) return false;
     outline.reservedCntrsCnt = outline.cntrsCnt + n;
-    outline.cntrs = static_cast<uint16_t*>(realloc(outline.cntrs, outline.reservedCntrsCnt * sizeof(uint16_t)));
+    outline.cntrs = static_cast<uint32_t*>(realloc(outline.cntrs, outline.reservedCntrsCnt * sizeof(uint32_t)));
     return true;
 }
 
@@ -297,7 +298,7 @@ static SwOutline* _genDashOutline(const Shape* sdata, const Matrix* transform)
     auto outlineCntrsCnt = 0;
 
     for (uint32_t i = 0; i < cmdCnt; ++i) {
-        switch(*(cmds + i)) {
+        switch (*(cmds + i)) {
             case PathCommand::Close: {
                 ++outlinePtsCnt;
                 break;
@@ -326,7 +327,7 @@ static SwOutline* _genDashOutline(const Shape* sdata, const Matrix* transform)
     _growOutlineContour(*dash.outline, outlineCntrsCnt * 20);
 
     while (cmdCnt-- > 0) {
-        switch(*cmds) {
+        switch (*cmds) {
             case PathCommand::Close: {
                 _dashLineTo(dash, &dash.ptStart, transform);
                 break;
@@ -397,7 +398,7 @@ static bool _genOutline(SwShape* shape, const Shape* sdata, const Matrix* transf
     auto closeCnt = 0;
 
     for (uint32_t i = 0; i < cmdCnt; ++i) {
-        switch(*(cmds + i)) {
+        switch (*(cmds + i)) {
             case PathCommand::Close: {
                 ++outlinePtsCnt;
                 ++closeCnt;
@@ -440,7 +441,7 @@ static bool _genOutline(SwShape* shape, const Shape* sdata, const Matrix* transf
 
     //Generate Outlines
     while (cmdCnt-- > 0) {
-        switch(*cmds) {
+        switch (*cmds) {
             case PathCommand::Close: {
                 _outlineClose(*outline);
                 break;