0
How can i scale the whole canvas?
Im wondering how can i scale the whole canvas and all textures and objects on it to a size, a size that can fit any monitor. That's how you have the same game view on every monitor or screen. If you figured it out, please put some code or contact me , please i searched everywhere!!!!
8 Respuestas
+ 2
Firstly, you tag your question with 'java', wich may be confused: if you are talking about <canvas> in web (html) document, you handle it with javascript (which is not the same than java ^^).
If it is, you need to define width and height css properties of the <canvas> element for your purpose... but width and height element attributes are also required (even if dynamically defined with JS at runtime), to define the virtual bitmap definition to resize to the css size... and obviously be careful to use same ratio for both size definition (else you will deform the resulted display).
+ 2
So, I cannot help you: sorry ;P
+ 2
@noname: that's what I already said in my answer, but 'java' was really the context, not web ^^
+ 1
npnp still hope someone else will figure it out
0
Thanks mate but i was talking about java and scaling a canvas that is in a jframe, but thanks anyway
0
Java man not javascript, but thx anyway
0
my bad, bye
0
bye...