Hi Ben,

What is brush?

I do exactly as in the post. Get the matrix m and then would like to draw.

*var* canvas:BitmapData=*new* BitmapData(20,20,*false*,0x00000000);

*var* s:Shape = *new* Shape();

s.graphics.beginFill(0xcc00cc);

s.graphics.drawRect(0,0,20,20);

s.graphics.endFill();

canvas.draw(s);

theBitmap.bitmap.draw(canvas,m);
But that does not seem to work. I cant see the rectangle drawn on my
bitmapmaterial?

Any advice?
On Tue, Oct 13, 2009 at 7:45 AM, ben <[email protected]> wrote:

>
> Fixed it, had to invert the v and above all, clean my eyes and see
> that MouseEvent already return a UV value !! ! !! ! ! !!!:
>
> function onMouseClickOnObject(e:MouseEvent3D):void {
>  var m:Matrix = new Matrix();
> m.translate(e.uv.u*btmData.width,(1-e.uv.v)*btmData.height);
> btmData.draw(brush,m);
>
> }
>
> yeepi !!!




-- 
Radiceski Darko
University of Wollongong
Australia
SIFE - UOW Chapter - Alumni
CASUAL ACADEMIC STAFF TEACHING - UOW SITACS
(School of Information Technology and Computer Science,University of
Wollongong)
Univeristy of Wollongong - Alumni

Reply via email to