Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1601

It would be nice to have some static convenience functions in QPainterPath to create common paths

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • None
    • GUI: Painting
    • None

    Description

      Examples:
      QPainterPath::linePath(x1, y1, x2, y2);
      QPainterPath::rectPath(x1, y1, w, h);
      QPainterPath::ellipsePath(x1, y1, w, h);
      QPainterPath::pointPath(x, y);

      Maybe QPainterPath::textPath(...) and QPainterPath::polygonPath(...) as well?

      This would avoid having to write
      QPainterPath path;
      path.addRect(x1, y1, w, h);
      doStuff(path);

      instead just
      doStuff(QPainterPath::rectPath(x1, y1, w, h));

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            rodal Samuel Rødal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes