Canvas in QML
-
I have a written a simple program which i given below. I am able to see two minor spokes between the angles i am drawing. I am not sure why its coming. Any help is appreciated.
import QtQuick 2.0Rectangle {
width: 360
height: 360
Canvas
{
width: 360
height: 360
onPaint:
{
var x = 140
var y = 140
var radius = 140;
var startangle = -90
var endangle = 30
var context = getContext("2d");
for(var j=0; j < 3; j++)
{
context.beginPath();
context.moveTo(x, y);
context.arc(x, y, radius, (startangle)(Math.PI/180), (endangle)(Math.PI/180), false) //x, y, radius, startAngle, endAngle, anticlockwise
context.fillStyle = "blue"
context.fill();
startangle += 120
endangle += 120
context.closePath();
}
}
}
}
Does anybody have idea on this