we need a comprehensive logging interface for this.
right now, leave as "LOG:" to replace later.
Change-Id: I25321223cd48ec13a1de5e4140cfea75a2f42866
return _prepareRadial(fill, static_cast<const RadialGradient*>(fdata), transform);
}
- cout << "What type of gradient?!" << endl;
+ //LOG: What type of gradient?!
return false;
}
//span has ushort coordinates. check limit overflow
if (x >= SHRT_MAX) {
- cout << "x(" << x << ") coordinate overflow!" << endl;
+ //LOG: x coordinate overflow!
x = SHRT_MAX;
}
if (y >= SHRT_MAX) {
- cout << "y(" << y << ") coordinate overflow!" << endl;
+ //LOG: y coordinate overflow!
y = SHRT_MAX;
}
return true;
invalid_outline:
- cout << "Invalid Outline!" << endl;
+ //LOG: Invalid Outline!
return false;
}
if (*src & SW_STROKE_TAG_POINT) *tags = SW_CURVE_TYPE_POINT;
else if (*src & SW_STROKE_TAG_CUBIC) *tags = SW_CURVE_TYPE_CUBIC;
- else cout << "what type of stroke outline??" << endl;
+ else {
+ //LOG: What type of stroke outline??
+ }
if (*src & SW_STROKE_TAG_END) {
*cntrs = idx;
if (loader) loader->close();
loader = LoaderMgr::loader();
if (!loader || !loader->open(path.c_str())) {
- cout << "Non supported format: " << path.c_str() << endl;
+ //LOG: Non supported format
return Result::NonSupport;
}
if (!loader->read()) return Result::Unknown;
if (loader) loader->close();
loader = LoaderMgr::loader();
if (!loader || !loader->open(data, size)) {
- cout << "Non supported load data" << endl;
+ //LOG: Non supported load data
return Result::NonSupport;
}
if (!loader->read()) return Result::Unknown;
}
-static void _attrParsePolygonPoints(const char* str, float** points, int* ptCount)
+static bool _attrParsePolygonPoints(const char* str, float** points, int* ptCount)
{
float tmp[50];
int tmpCount = 0;
}
*ptCount = count;
*points = pointArray;
- return;
+ return true;
error_alloc:
- printf("ERR : allocation for point array failed. out of memory");
- abort();
+ //LOG: allocation for point array failed. out of memory
+ return false;
}
else polygon = &(node->node.polyline);
if (!strcmp(key, "points")) {
- _attrParsePolygonPoints(value, &polygon->points, &polygon->pointsCount);
+ return _attrParsePolygonPoints(value, &polygon->points, &polygon->pointsCount);
} else if (!strcmp(key, "style")) {
return simpleXmlParseW3CAttribute(value, _parseStyleAttr, loader);
} else if (!strcmp(key, "id")) {
this->vw = loaderData.doc->node.doc.vw;
this->vh = loaderData.doc->node.doc.vh;
} else {
- cout << "ERROR : No SVG File. There is no <svg/>" <<endl;
+ //LOG: No SVG File. There is no <svg/>
return false;
}
if (!f.is_open())
{
- cout << "ERROR: Failed to open file = " << path;
+ //LOG: Failed to open file
return false;
} else {
getline(f, filePath, '\0');