[GCompris-devel] Scaling images based on screen size

amit tomar a.tomar at outlook.com
Tue Dec 2 06:35:52 UTC 2014


Hello all,

I am working on one of the activity called Hanoi_real. This is how it looks currently : 

1. When screen is of small size

http://imgur.com/fcKL9sR

2. When screen is of large size

http://imgur.com/oudrmhC

As you can see, in the large size one, pegs and disc images look pretty small compared to the area available. I would thus like them to scale up/down based on screen size.

I tried using the sourceSize.width and sourceSize.height, but was not able to keep the aspect ratio proper. 

Is there a standard way this is handled in GCompris? Any particular activity I could look into the code of which to get an idea ?

Thanks and regards,Amit Tomar 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gcompris-devel/attachments/20141202/a5459e45/attachment.html>


More information about the GCompris-devel mailing list