Sradda Enaganti
05-24-2008, 11:10 PM
Hi All,
i have drawn the curve as in the following code using open Laszlo tags and i
want to paint the left portion with some color and i don't want to paint the right
portion of the curve.Can any one help how to do it?
Here is the code...........
<canvas >
<view>
<drawview width="300" height="300">
<handler name="oncontext">
<!--this.moveTo(840,44);
this.lineTo(840,600);-->
this.moveTo(200,2);
this.bezierCurveTo(100,140,160,240,200,380);
this.bezierCurveTo(240,650,60,600,200,600);
<!--this.moveTo(224,400);
this.lineTo(840,400);-->
this.strokeStyle=80000000;
this.lineWidth=6;
this.stroke();
this.fillStyle = 0xffffff;
this.globalAlpha = .9;
this.fill();
<!--this.fillStyle = 0xffffff;
this.globalAlpha = .9;
this.fill();-->
<!--var g = this.createLinearGradient(50,50,150,25);
this.globalAlpha = 5;
g.addColorStop(0, 0x000000);
this.globalAlpha = 5;
g.addColorStop(1, 0xffffff);
this.fillStyle = g;
this.fill();-->
</handler>
</drawview>
</view>
</canvas>
Thanks & Regards
Bhavana.V
i have drawn the curve as in the following code using open Laszlo tags and i
want to paint the left portion with some color and i don't want to paint the right
portion of the curve.Can any one help how to do it?
Here is the code...........
<canvas >
<view>
<drawview width="300" height="300">
<handler name="oncontext">
<!--this.moveTo(840,44);
this.lineTo(840,600);-->
this.moveTo(200,2);
this.bezierCurveTo(100,140,160,240,200,380);
this.bezierCurveTo(240,650,60,600,200,600);
<!--this.moveTo(224,400);
this.lineTo(840,400);-->
this.strokeStyle=80000000;
this.lineWidth=6;
this.stroke();
this.fillStyle = 0xffffff;
this.globalAlpha = .9;
this.fill();
<!--this.fillStyle = 0xffffff;
this.globalAlpha = .9;
this.fill();-->
<!--var g = this.createLinearGradient(50,50,150,25);
this.globalAlpha = 5;
g.addColorStop(0, 0x000000);
this.globalAlpha = 5;
g.addColorStop(1, 0xffffff);
this.fillStyle = g;
this.fill();-->
</handler>
</drawview>
</view>
</canvas>
Thanks & Regards
Bhavana.V