- std::vector<Bezier> new_curves = m_objects.beziers[m_objects.data_indices[object_id]].ClipToRectangle(child_node_bounds);
- Rect obj_bounds = TransformToQuadChild(m_objects.bounds[object_id], type);
+ Rect clip_bezier_bounds;
+ clip_bezier_bounds.x = (child_node_bounds.x - m_objects.bounds[object_id].x) / m_objects.bounds[object_id].w;
+ clip_bezier_bounds.y = (child_node_bounds.y - m_objects.bounds[object_id].y) / m_objects.bounds[object_id].h;
+ clip_bezier_bounds.w = child_node_bounds.w / m_objects.bounds[object_id].w;
+ clip_bezier_bounds.h = child_node_bounds.h / m_objects.bounds[object_id].h;
+ std::vector<Bezier> new_curves = m_objects.beziers[m_objects.data_indices[object_id]].ClipToRectangle(clip_bezier_bounds);