m_left = objects.beziers[objects.data_indices[left]].ToAbsolute(objects.bounds[left]).GetLeft();
m_right = objects.beziers[objects.data_indices[right]].ToAbsolute(objects.bounds[right]).GetRight();
+ m_bounds = SolveBounds(objects).Convert<PReal>();
#ifdef TRANSFORM_BEZIERS_TO_PATH
- Rect bounds = SolveBounds(objects);
for (unsigned i = m_start; i <= m_end; ++i)
{
//Debug("Transform %s -> %s", objects.bounds[i].Str().c_str(), bounds.Str().c_str());
- objects.bounds[i] = TransformRectCoordinates(bounds, objects.bounds[i]);
+ objects.bounds[i] = TransformRectCoordinates(m_bounds.Convert<Real>(), objects.bounds[i]);
//Debug("-> %s", objects.bounds[i].Str().c_str());
}
#endif
vector<Vec2> & Path::FillPoints(const Objects & objects, const View & view)
{
- if (m_fill_points.size() != 0)
+ //if (m_fill_points.size() != 0)
return m_fill_points;
return m_fill_points;
}
-Rect Path::SolveBounds(const Objects & objects) const
+Rect Path::SolveBounds(const Objects & objects)
{
return Rect(m_left.x, m_top.y, m_right.x-m_left.x, m_bottom.y-m_top.y);
}
Rect & Path::GetBounds(Objects & objects)
{
+ objects.bounds[m_index] = m_bounds.Convert<Real>();
return objects.bounds[m_index];
}