CImagePtr CSVGFeImage:: filterImage(CImagePtr src_image) { if (! src_image.isValid()) return CImagePtr(); CImagePtr dst_image = src_image->dup(); CSVGFilter *filter = NULL; CSVGObject *parent = parent_; while (parent != NULL) { filter = dynamic_cast<CSVGFilter *>(parent); if (filter != NULL) break; } if (filter) { CBBox2D bbox; filter->getObject()->getBBox(bbox); if (bbox.isSet()) dst_image->reshape(bbox.getWidth(), bbox.getHeight()); } return dst_image; }
CImagePtr CSVGFeDiffuseLighting:: filterImage(CImagePtr src_image) { CImagePtr dst_image = src_image->dup(); return dst_image; }
CImagePtr CSVGFeTile:: filterImage(CImagePtr src_image) { CImagePtr dst_image = src_image->dup(); return dst_image; }
CImagePtr CSVGFeComponentTransfer:: filterImage(CImagePtr src_image) { CImagePtr dst_image = src_image->dup(); ObjectList::const_iterator p1, p2; for (p1 = childrenBegin(), p2 = childrenEnd(); p1 != p2; ++p1) { CSVGFeFunc *func = dynamic_cast<CSVGFeFunc *>(*p1); if (func) dst_image = func->filterImage(dst_image); } return dst_image; }