*/
#include "tvgSwCommon.h"
#include "tvgRender.h"
+#include <iostream>
#include <float.h>
#include <math.h>
auto w = static_cast<uint32_t>(region.max.x - region.min.x);
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Rectangle Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Rectangle Alpha Mask Composition" << endl;
#endif
auto cbuffer = surface->compositor->image.data + (region.min.y * surface->stride) + region.min.x; //compositor buffer
auto w = static_cast<uint32_t>(region.max.x - region.min.x);
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Rectangle Inverse Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Rectangle Inverse Alpha Mask Composition" << endl;
#endif
auto cbuffer = surface->compositor->image.data + (region.min.y * surface->stride) + region.min.x; //compositor buffer
static bool _translucentRleAlphaMask(SwSurface* surface, const SwRleData* rle, uint32_t color)
{
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Rle Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Rle Alpha Mask Composition" << endl;
#endif
auto span = rle->spans;
uint32_t src;
static bool _translucentRleInvAlphaMask(SwSurface* surface, SwRleData* rle, uint32_t color)
{
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Rle Inverse Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Rle Inverse Alpha Mask Composition" << endl;
#endif
auto span = rle->spans;
uint32_t src;
static bool _translucentImageAlphaMask(SwSurface* surface, const uint32_t *img, uint32_t w, TVG_UNUSED uint32_t h, uint32_t opacity, const SwBBox& region, const Matrix* invTransform)
{
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Transformed Image Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Transformed Image Alpha Mask Composition" << endl;
#endif
for (auto y = region.min.y; y < region.max.y; ++y) {
auto dst = &surface->buffer[y * surface->stride + region.min.x];
static bool _translucentImageInvAlphaMask(SwSurface* surface, const uint32_t *img, uint32_t w, uint32_t h, uint32_t opacity, const SwBBox& region, const Matrix* invTransform)
{
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Transformed Image Inverse Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Transformed Image Inverse Alpha Mask Composition" << endl;
#endif
for (auto y = region.min.y; y < region.max.y; ++y) {
auto dst = &surface->buffer[y * surface->stride + region.min.x];
auto w2 = static_cast<uint32_t>(region.max.x - region.min.x);
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Image Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Image Alpha Mask Composition" << endl;
#endif
auto sbuffer = img + (region.min.y * w) + region.min.x;
auto w2 = static_cast<uint32_t>(region.max.x - region.min.x);
#ifdef THORVG_LOG_ENABLED
- printf("SW_ENGINE: Image Inverse Alpha Mask Composition\n");
+ cout <<"SW_ENGINE: Image Inverse Alpha Mask Composition" << endl;
#endif
auto sbuffer = img + (region.min.y * w) + region.min.x;
RenderTransform(const RenderTransform* lhs, const RenderTransform* rhs);
};
-struct RenderMethod
+class RenderMethod
{
+public:
virtual ~RenderMethod() {}
virtual RenderData prepare(const Shape& shape, RenderData data, const RenderTransform* transform, uint32_t opacity, Array<RenderData>& clips, RenderUpdateFlag flags) = 0;
virtual RenderData prepare(const Picture& picture, RenderData data, const RenderTransform* transform, uint32_t opacity, Array<RenderData>& clips, RenderUpdateFlag flags) = 0;
sz = attrs - content;
attrsLength = length - sz;
while ((sz > 0) && (isspace(content[sz - 1]))) sz--;
- if ((uint)sz >= sizeof(tagName)) return;
+ if ((unsigned)sz >= sizeof(tagName)) return;
strncpy(tagName, content, sz);
tagName[sz] = '\0';
}
sz = attrs - content;
attrsLength = length - sz;
while ((sz > 0) && (isspace(content[sz - 1]))) sz--;
- if ((uint)sz >= sizeof(tagName)) return false;
+ if ((unsigned)sz >= sizeof(tagName)) return false;
strncpy(tagName, content, sz);
tagName[sz] = '\0';
}