/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2020-2021 Samsung Electronics Co., Ltd. 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
struct Fill::Impl
{
ColorStop* colorStops = nullptr;
+ Matrix* transform = nullptr;
uint32_t cnt = 0;
FillSpread spread;
DuplicateMethod<Fill>* dup = nullptr;
~Impl()
{
if (dup) delete(dup);
- if (colorStops) free(colorStops);
+ free(colorStops);
+ free(transform);
}
void method(DuplicateMethod<Fill>* dup)
ret->pImpl->spread = spread;
ret->pImpl->colorStops = static_cast<ColorStop*>(malloc(sizeof(ColorStop) * cnt));
memcpy(ret->pImpl->colorStops, colorStops, sizeof(ColorStop) * cnt);
-
+ if (transform) {
+ ret->pImpl->transform = static_cast<Matrix*>(malloc(sizeof(Matrix)));
+ *ret->pImpl->transform = *transform;
+ }
return ret;
}
};