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

Adding text to QPainterPath that follows the path.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • GUI: Painting
    • None

    Description

      Currently the documentation for PyQt for the QPainterPath.addText method can lead a person to believe that the text would follow the path. It does not state in the documenattion that the text is always going to render horizontally. The text rendering horizontally really doesn't make any sense when using QPainterPath to render text, it would make sense to have the text follow the path. The image provided in the documentation leads one to believe that the text follows the path because of the line drawn under the text. My interpertation of the image is that the line represents the path and the x, y indicates where the bottom left corner of the text is along that path. This is not the case. The text is always added horizontally.

       

      If a path was created that is a single line adding text to the path would place the bottom edge of the text along the line and a flag could be used to determine if the line should be rendered or not. This would make it far easier to render "wavy" text or curved text. When using PyQt. There is also a speed factor when using PyQt, it would increase the speed of the calculations 50 to 200 times faster because the calculations would reside in C code instead of in Python code.

       

      I know there are examples for handling this exact thing but there ends up being spacing issues between the letters that would need to be compensated for, I have not seen any examples of how to properly handle the spacing problems.

       

       

      Attachments

        Issue Links

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

          Activity

            People

              vgt Eirik Aavitsland
              kgschlosser Kevin Schlosser
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes