[MGraphics] no jgraphics context

Apr 4, 2013 at 11:03am

[MGraphics] no jgraphics context

Hello there !

why im getting this error ? i cant call or paint within a custom function ?

mgraphics.init();
mgraphics.relative_coords = 1;
mgraphics.autofill = 0;
function paint() {
	with(mgraphics){
	mgraphics.rectangle(-.1, .1, .2, -.2);
	mgraphics.fill();
	}
}
function nofill(){
	with (mgraphics){
	rectangle(-.2, .2, .2, -.2);
	redraw();
	}
}
#67523
Apr 4, 2013 at 1:25pm

Im only allowed to redraw with provided variables through paint() function only ?

#242969
Apr 4, 2013 at 2:53pm

That is correct.

#242970
Apr 4, 2013 at 2:59pm

and thats not a problem :) im just worrying about further performance if i need to always redraw all of the elements . Thanks

#242971

You must be logged in to reply to this topic.