Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
about ipad screen and image scaling issue — Gideros Forum

about ipad screen and image scaling issue

louislouis Member
edited August 2012 in Bugs and issues
I want develop a universal app, and test Gideros new version 2012.8.1.

I wrote a test project, in project setting ,I set scale model is stretch,and logical dimension is 320*480,add tow image scales,one is @2x suffix,scale is 2,another is @2.4x suffix ,scale is 2.4,this is for ipad.

then I add 3 images: top_01.png,top_01@2x.png,top_01@2.4x.png.

my test code is :
print('ContentWidth:'..application:getContentWidth())
print('LogicalScaleX:'..application:getLogicalScaleX())
print('LogicalTranslateX:'..application:getLogicalTranslateX())
 
print('DeviceWidth:'..application:getDeviceWidth())
 
 
require 'ui'
 
image=ImageView.new("images/top_01.png")
 
addToRootView(image)
 
--320*480
--ContentWidth:320
--LogicalScaleX:1
--LogicalTranslateX:0
--DeviceWidth:320
 
 
--640*960
--ContentWidth:320
--LogicalScaleX:1
--LogicalTranslateX:0
--DeviceWidth:320
 
--768*1024
--ContentWidth:320
--LogicalScaleX:2.4000000953674
--LogicalTranslateX:0
--DeviceWidth:768
 
--new ipad
--ContentWidth:320
--LogicalScaleX:2.4000000953674
--LogicalTranslateX:0
--DeviceWidth:768
iphone 320*480 display top_01.png,iphone 640*960 display top_01@2x.png,that are right.
but in ipad 768*1024,not display top_01@2.4x.png, actually it display top_01.png?? in print log ,ipad device width is 768.

who can help me to solve it?thank you~

attach file is my test project. it using uikit plugin,if test ,please add uikit.mm.
zip
zip
TestAutoScaling.zip
45K

Comments

  • NascodeNascode Guru
    edited August 2012
    hi @louis

    I test it without using uikit plugin, here's my code
    local image = Texture.new('images/top_01.png', true)
    local bmp = Bitmap.new(image)
    stage:addChild(bmp)
    And everything is allright, i suspect things go wrong with the plugin
    have fun with our games~
    http://www.nightspade.com
  • Nascode is right.
    If you are simply displaying images and do not require the features of UIImageView of which there really are none at the moment. Please use the Gideros way of displaying them.
    The UIKit plugin is not built to handle autoscaling of images at this time.
  • hi @Nascode @SimpleLoop , you are right, but I want to develop an app with uikit plugin.
    so I still need solve this problem.

    helllo @techdojo ,@MikeHart,@Caroline ,any kind of help for me?

    in addition ,I put top_01~ipad.png in project,but still not work.
  • CarolineCaroline Guru
    Accepted Answer
    I don't believe there's any such thing as an automatic @2.4 scaling on the iPhone. I would have expected the top_01~ipad.png to work. (For Retina iPads, it's top_01@2x~ipad.png.)

    But I haven't tried this myself.

Sign In or Register to comment.