var qcanvas = new Qcanvas(["qcanvas",400,300]);
var redRect = qcanvas.qrect.rect({
start:[0,0],
width:200,
height:200,
drag:false,
borderColor:'red',
fillColor:'red',
})
var greenRect = qcanvas.qrect.rect({
start:[50,50],
width:170,
height:170,
drag:false,
borderColor:'green',
fillColor:'green',
})
var blueRect = qcanvas.qrect.rect({
start:[100,100],
width:120,
height:120,
drag:false,
borderColor:'blue',
fillColor:'blue',
})
qcanvas.qtext.text({
start:[200,40],
text:'redRect上移一层',
color:'blue',
fontSize:'16px',
drag:false,
mouseup:function(pos){
qcanvas.raise(redRect);
}
})
qcanvas.qtext.text({
start:[200,60],
text:'redRect下移一层',
color:'blue',
fontSize:'16px',
drag:false,
mouseup:function(pos){
qcanvas.lower(redRect);
}
})
qcanvas.qtext.text({
start:[200,80],
text:'redRect置顶',
color:'blue',
fontSize:'16px',
drag:false,
mouseup:function(pos){
qcanvas.raiseToTop(redRect);
}
})
qcanvas.qtext.text({
start:[200,100],
text:'redRect置底',
color:'yellow',
fontSize:'16px',
drag:false,
mouseup:function(pos){
qcanvas.lowerToBottom(redRect);
}
})