/*
- * 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
* 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>
{
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;
}
auto outlineCntrsCnt = 0;
for (uint32_t i = 0; i < cmdCnt; ++i) {
- switch(*(cmds + i)) {
+ switch (*(cmds + i)) {
case PathCommand::Close: {
++outlinePtsCnt;
break;
_growOutlineContour(*dash.outline, outlineCntrsCnt * 20);
while (cmdCnt-- > 0) {
- switch(*cmds) {
+ switch (*cmds) {
case PathCommand::Close: {
_dashLineTo(dash, &dash.ptStart, transform);
break;
auto closeCnt = 0;
for (uint32_t i = 0; i < cmdCnt; ++i) {
- switch(*(cmds + i)) {
+ switch (*(cmds + i)) {
case PathCommand::Close: {
++outlinePtsCnt;
++closeCnt;
//Generate Outlines
while (cmdCnt-- > 0) {
- switch(*cmds) {
+ switch (*cmds) {
case PathCommand::Close: {
_outlineClose(*outline);
break;