MCPcopy Create free account
hub / github.com/KDE/okular / ObjectRect

Method ObjectRect

core/area.cpp:312–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310/** class ObjectRect **/
311
312ObjectRect::ObjectRect(double l, double t, double r, double b, bool ellipse, ObjectType type, void *object)
313 : m_objectType(type)
314 , m_object(object)
315{
316 // assign coordinates swapping them if negative width or height
317 QRectF rect(r > l ? l : r, b > t ? t : b, fabs(r - l), fabs(b - t));
318 if (ellipse) {
319 m_path.addEllipse(rect);
320 } else {
321 m_path.addRect(rect);
322 }
323
324 m_transformedPath = m_path;
325}
326
327ObjectRect::ObjectRect(const NormalizedRect &r, bool ellipse, ObjectType type, void *object)
328 : m_objectType(type)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected