示例#1
0
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;
}
示例#2
0
CImagePtr
CSVGFeDiffuseLighting::
filterImage(CImagePtr src_image)
{
  CImagePtr dst_image = src_image->dup();

  return dst_image;
}
示例#3
0
CImagePtr
CSVGFeTile::
filterImage(CImagePtr src_image)
{
  CImagePtr dst_image = src_image->dup();

  return dst_image;
}
示例#4
0
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;
}