How to move/resize HTML Canvas?

Skip to first unread message


Dec 15, 2010, 12:16:04 PM12/15/10
to O3D-discuss
Hi guys,
I finally got my HTML Canvas working (drawing text on top of my o3d
view), but there is still one problem that I cannot overcome. I want
my text resized proportionally when user resizes the o3d view. This
feature used to be for free with plugin version (using XYQuad.canvas),
but with WebGL it is not trivial any more. By some mysterious reason
neither 'scale' nor 'transform' methods of HTML Canvas work for me (no
error messages, no crashes or something - the calls just do
I also tried to assign new coordinates to the HTML Canvas properties -
it just does not move to new location!

Any suggestions?


Alexander :o)


Jan 5, 2011, 11:42:50 PM1/5/11
to O3D-discuss
Hi Nav,

I've tried some Canvas before, realising it is quite a hassle
sometimes because it will not scale naturally according to the canvas
width and height. It probably means it just change the colours within
that pixel which result canvas shapes being unscalable or unmovable.
The way I did really is just to hard code it to clear the shape and
redraw everytime whenever the canvas is scaled or the object is moved.
Other people should have a better solution compare to mine.

Reply all
Reply to author
0 new messages