Ejemplo n.º 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;
}
void
CQIllustratorCreateTextToolbar::
setSize(const CBBox2D &bbox)
{
  double w = bbox.getWidth();
  double h = bbox.getHeight();

  widthEdit_ ->setValue(w);
  heightEdit_->setValue(h);
}
Ejemplo n.º 3
0
void
CQIllustratorShape::
setBBox(const CBBox2D &bbox)
{
  checkoutShape(CQIllustratorData::ChangeType::GEOMETRY);

  moveTo(bbox.getLL());

  resizeTo(bbox.getWidth(), bbox.getHeight());

  checkinShape(CQIllustratorData::ChangeType::GEOMETRY);
}