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!!!!

4th Aug 2017, 11:57 PM
Pulat Pulet
Pulat Pulet - avatar
8 Respostas
+ 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).
5th Aug 2017, 12:22 AM
visph
visph - avatar
+ 2
So, I cannot help you: sorry ;P
5th Aug 2017, 12:25 AM
visph
visph - avatar
+ 2
@noname: that's what I already said in my answer, but 'java' was really the context, not web ^^
5th Aug 2017, 12:31 AM
visph
visph - avatar
+ 1
npnp still hope someone else will figure it out
5th Aug 2017, 12:26 AM
Pulat Pulet
Pulat Pulet - avatar
0
Thanks mate but i was talking about java and scaling a canvas that is in a jframe, but thanks anyway
5th Aug 2017, 12:24 AM
Pulat Pulet
Pulat Pulet - avatar
0
Java man not javascript, but thx anyway
5th Aug 2017, 12:30 AM
Pulat Pulet
Pulat Pulet - avatar
0
my bad, bye
5th Aug 2017, 12:31 AM
voidneo
0
bye...
5th Aug 2017, 12:32 AM
Pulat Pulet
Pulat Pulet - avatar