Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. arm platform qt4.8 qpainterpath.arcTo drawed incorrect with wide qpen.setwidth,but in windows10 draw the correct

arm platform qt4.8 qpainterpath.arcTo drawed incorrect with wide qpen.setwidth,but in windows10 draw the correct

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 349 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xiaokai_mao
    wrote on last edited by
    #1
    QPen pen = painter->pen();
        pen.setWidthF(31.2112);
        painter->setPen(pen);
    // first. incorrect , in this values, qpainterpath.elementCount() == 11
        double rx = 29.8467; 
        double ry = 29.8198;
        double startAngle = -0.00192632;
        double spanAngle = 90.0711;
    
    //second. correct, in this values, qpainterpath.elementCount() == 4
    //    double rx = 29.8477;
    //    double ry = 29.8208;
    //    double startAngle = 3.29033e-05;
    //    double spanAngle = 90;
    
        QPointF topleft(1331.62, 393.798);
        QRectF rect(topleft.x(), topleft.y(), 2*rx, 2*ry);
        QPainterPath path;
        path.arcMoveTo(rect,startAngle);
        path.arcTo(rect,startAngle, spanAngle);
    
        painter->drawPath(path);
    

    on arm draw :
    drow.png

    on window draw:
    drowin.png

    how to resolve this problem on arm qt4.8? thinks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What kind of ARM processor are you using ?
      By the way, Qt 4.8 has reached end of life a long time ago, you should really consider moving to a more recent version like 6.2 which is the current LTS.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xiaokai_mao
        wrote on last edited by
        #3

        thanks for your attention. It is A133 ARM in my company.
        Using other implement method, I had replaced qpainterpath.arcTo with two qpainter.drawpie and setted clipping region.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved