@@ -1410,7 +1449,7 @@ Caching display objects
You can cache specified display objects to improve the performance of your project. The display object is a surface, essentially a bitmap version of the instance’s vector data, which is data that you do not intend to change much over the course of your project. Therefore, instances with caching turned on are not continually redrawn as the project plays, letting the project render quickly.
Note: You can update the vector data, at which time the surface is recreated. Therefore, the vector data cached in the surface does not need to remain the same for the entire project.
Setting a display object’s cacheAsBitmap
property to true
makes the display object cache a bitmap representation of itself. OpenFL creates a surface object for the instance, which is a cached bitmap instead of vector data. If you change the bounds of the display object, the surface is recreated instead of resized. Surfaces can nest within other surfaces. The child surface copies its bitmap onto its parent surface. For more information, see Enabling bitmap caching.
-The DisplayObject class’s opaqueBackground
property and scrollRect
property are related to bitmap caching using the cacheAsBitmap
property. Although these three properties are independent of each other, the opaqueBackground
and scrollRect
properties work best when an object is cached as a bitmap—you see performance benefits for the opaqueBackground
and scrollRect
properties only when you set cacheAsBitmap
to true
. For more information about scrolling display object content, see Panning and scrolling display objects. For more information about setting an opaque background, see Setting an opaque background color.
+The DisplayObject class’s opaqueBackground
property and scrollRect
property are related to bitmap caching using the cacheAsBitmap
property. Although these three properties are independent of each other, the opaqueBackground
and scrollRect
properties work best when an object is cached as a bitmap—you see performance benefits for the opaqueBackground
and scrollRect
properties only when you set cacheAsBitmap
to true
. For more information about scrolling display object content, see Panning and scrolling display objects. For more information about setting an opaque background, see Setting an opaque background color.
For information on alpha channel masking, which requires you to set the cacheAsBitmap
property to true
, see Masking display objects.
When to enable caching
Enabling caching for a display object creates a surface, which has several advantages, such as helping complex vector animations to render fast. There are several scenarios in which you will want to enable caching. It might seem as though you would always want to enable caching to improve the performance of your projects; however, there are situations in which enabling caching does not improve performance, or can even decrease it. This section describes scenarios in which caching should be used, and when to use regular display objects.
@@ -1509,7 +1548,7 @@ No results matching "
-
+
@@ -1520,7 +1559,7 @@ No results matching "
var gitbook = gitbook || [];
gitbook.push(function() {
- gitbook.page.hasChanged({"page":{"title":"Caching display objects","level":"1.3.5.4","depth":3,"next":{"title":"Applying blending modes","level":"1.3.5.5","depth":3,"path":"display-programming/manipulating-display-objects/applying-blending-modes.md","ref":"display-programming/manipulating-display-objects/applying-blending-modes.md","articles":[]},"previous":{"title":"Manipulating size and scaling objects","level":"1.3.5.3","depth":3,"path":"display-programming/manipulating-display-objects/manipulating-size-and-scaling-objects.md","ref":"display-programming/manipulating-display-objects/manipulating-size-and-scaling-objects.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56},"embedFonts":false},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"OpenFL Developer's Guide","gitbook":"*"},"file":{"path":"display-programming/manipulating-display-objects/caching-display-objects.md","mtime":"2024-01-17T08:58:06.167Z","type":"markdown"},"gitbook":{"version":"5.1.4","time":"2024-01-17T08:58:23.927Z"},"basePath":"../..","book":{"language":""}});
+ gitbook.page.hasChanged({"page":{"title":"Caching display objects","level":"1.3.5.4","depth":3,"next":{"title":"Setting an opaque background color","level":"1.3.5.5","depth":3,"path":"display-programming/manipulating-display-objects/setting-an-opaque-background.md","ref":"display-programming/manipulating-display-objects/setting-an-opaque-background.md","articles":[]},"previous":{"title":"Manipulating size and scaling objects","level":"1.3.5.3","depth":3,"path":"display-programming/manipulating-display-objects/manipulating-size-and-scaling-objects.md","ref":"display-programming/manipulating-display-objects/manipulating-size-and-scaling-objects.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56},"embedFonts":false},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"OpenFL Developer's Guide","gitbook":"*"},"file":{"path":"display-programming/manipulating-display-objects/caching-display-objects.md","mtime":"2024-01-18T02:26:11.639Z","type":"markdown"},"gitbook":{"version":"5.1.4","time":"2024-01-18T02:26:29.925Z"},"basePath":"../..","book":{"language":""}});
});
diff --git a/openfl-developers-guide/display-programming/manipulating-display-objects/changing-position.html b/openfl-developers-guide/display-programming/manipulating-display-objects/changing-position.html
index 430499c..3180fcd 100644
--- a/openfl-developers-guide/display-programming/manipulating-display-objects/changing-position.html
+++ b/openfl-developers-guide/display-programming/manipulating-display-objects/changing-position.html
@@ -401,7 +401,20 @@