Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to fill the area created by two pathAngleArcs ?
Forum Update on Monday, May 27th 2025

How to fill the area created by two pathAngleArcs ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 149 Views
  • 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.
  • A Offline
    A Offline
    anuj87_
    wrote on last edited by
    #1

    Hi i am trying to create an arc with a width by using two arcs and enclosing them with pathlines. How can i fill the empty area between the pathlines and patharc with some color? Shape{
    id:shape_paw

        function degreesToRadians(degrees) {
            return (degrees * Math.PI)/180;
        }
        ShapePath{
            // strokeColor: Qt.rgba(1.0, 1.0, .5, .9)
            strokeWidth: 1
            //  fillColor: "transparent"
            strokeColor: "red"
            fillColor: "blue"
            // fillColor: Qt.rgba(1.0, 1.0, .5, .8)
            // strokeColor: "transparent"
            capStyle: ShapePath.RoundCap
    
            //            PathArc{
            //                x:parent.width/2 + 7.5 +  55*Math.cos(60 * Math.PI/180)
            //                y:parent.height/2 +4+  50*Math.sin(60 * Math.PI/180)
    
            //                radiusX: 47.5;radiusY: 47.5
            //                useLargeArc: true
            //            }
            startX: (root.width*.5) + (root.width *.23)*Math.cos(shape_paw.degreesToRadians(180))
            startY: (root.height * .611) + (root.width *.23)*Math.sin(shape_paw.degreesToRadians(180))
    
            PathLine{
                x: (root.width*.5) + (root.width *.3)*Math.cos(shape_paw.degreesToRadians(180))
                y: (root.height * .611) + (root.width *.3)*Math.sin(shape_paw.degreesToRadians(180))
            }
            PathAngleArc{
    
                centerX: root.width*.5; centerY: root.height * .611
                radiusX: root.width *.3 ; radiusY: root.width *.3
                startAngle: 180
                sweepAngle: 100
                //                centerX: root.width*.5; centerY: root.height * .614
                //                radiusX: root.width *.26 ; radiusY: root.width *.26
                //                startAngle: 188.5
                //                sweepAngle: /*360*/test_degree
            }
            PathLine{
                x:  (root.width*.5) + (root.width *.22)*Math.cos(shape_paw.degreesToRadians(280))
                y:  (root.height *.611) + (root.width *.22)*Math.sin(shape_paw.degreesToRadians(280))
            }
            PathAngleArc{
                centerX: root.width*.5; centerY: root.height * .611
                radiusX: root.width *.22 ; radiusY: root.width *.22
                startAngle: 280
                sweepAngle: -100
            }
        }
        //        }
    }
    
    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