Exemplo n.º 1
0
Arquivo: WImage.C Projeto: LifeGo/wt
std::string WImage::updateAreaCoordsJSON() const
{
  WStringStream js;
  const std::vector<WAbstractArea *> &areas = this->areas();

  if (!areas.empty()) {
    for (unsigned i = 0; i < areas.size(); ++i) {
      if (areas[i]->isTransformable()) {
        if (js.empty())
          js << "[";
        else
          js << ",";
        js << areas[i]->updateAreaCoordsJS();
      }
    }
    js << "]";
  } else
    js << "null";

  return js.str();
}