Stack window opens with incorrect size

2019-09-01 13:04发布

问题:

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.



标签: ios livecode