Stack window opens with incorrect size

半城伤御伤魂 提交于 2019-12-11 22:33:47

问题


My application has 2 stacks. Stack 1 is "main" and it opens stack 2. Stack 2 is "slideview" and shows an image like an e-book.

My application is for iOS. I test on iPad. I save a standalone application to install on iOS.

I use program "iExplorer" to open a directory ub my app on ipad and copy stack 2 to the "documents" directory.

The script in stack 1 is:

on mouseUp
   put specialfolderpath("documents") into rootFolder
   put rootFolder& "/stack2.livecode" into filestack
   go stack filestack
end mouseUp

The script in stack 2 is:

on preOpenStack
   set the acceleratedRendering of this stack to true
   set the layerMode of image "Image" to "scrolling" 
end preOpenStack

This is what I see when I touch the button to open stack 2:

I have captured this image on an iPad.

In stack 2, I use the syntax

set the acceleratedRendering of this stack to true

If I delete this syntax and touch the button to open stack 2, it's the correct size. What is happening?


回答1:


The acceleratedRendering property has been added to help simplify the use of the accelerated rendering features. When set to true, LiveCode automatically configures the compositor properties to the best defaults for the current platform.

When acceleratedRendering is set to true, if the compositorType has not previously been set, the engine configures the compositor properties as follows:

  • iOS (non-Retina iPhone): compositorType = OpenGL, compositorTileSize = 32, compositorCacheLimit = 16Mb
  • iOS (iPad / Retina iPhone): compositorType = OpenGL, compositorTileSize = 64, compositorCacheLimit = 32Mb
  • iOS (iPad Retina): compositorType = OpenGL, compositorTileSize = 64, compositorCacheLimit = 64Mb

Perhaps there is a bug in the compositorTileSize. You can try changing the compositorTileSize:

set the compositorTileSize of this stack to 32

You need to experiment with the value (32) and see which value is correct: 16, 32, 64, 128 or 256.

Another possibility is that the acceleratedRendering does something to the fullscreenmode and even if it doesn't, the fullscreenmode might be a way to fix this problem.

set the fullScreenMode of this stack to exactFit

I think that exactFit will do in this case, but you may also try showAllor letterbox.



来源:https://stackoverflow.com/questions/23905391/stack-window-opens-with-incorrect-size

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!