{ "type": "interface", | |
"qname": "org.apache.royale.textLayout.compose.ISWFContext", | |
"description": "The ISWFContext interface allows a SWF file to share its context with other SWF files that load it. An application that loads a SWF file of type ISWFContext can call methods in the context of the loaded SWF file. The main usage is for calling the FTE TextLine creation methods. <p>There are two reasons for an application to use this interface to control TextLine creation: </p> <ul> <li><strong>Reuse an embedded font: </strong> if an application wants to use a font embedded in a loaded SWF file, the application can access the font if a TextLine is created in the context of the loaded SWF file.</li> <li><strong>Reuse existing TextLine instances</strong>: reusing existing TextLine instances can result in faster recompose times. TLF reuses existing TextLine instances internally. TLF reuses a TextLine by calling <code>TextBlock.recreateTextLine()</code> instead of <code>TextBlock.createTextLine()</code> when TLF recognizes that a TextLine is extant.</li> </ul> <p>Your application may have additional TextLine instances that can be reused. To manually reuse existing TextLine instances:</p> <ol> <li>trap calls to <code>TextBlock.createTextLine()</code>, then</li> <li>call <code>TextBlock.recreateTextLine()</code> with the extant TextLine instance instead of <code>TextBlock.createTextLine()</code>.</li> </ol> <p>Please note, however, that the <code>TextBlock.recreateTextLine()</code> is available only in Flash Player 10.1 and later.</p>", | |
"tags": [ | |
{ "tagName": "see", | |
"values": ["org.apache.royale.text.engine.TextBlock#createTextLine()", "org.apache.royale.text.engine.TextBlock#recreateTextLine()"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 10", "AIR 1.5"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "callInContext", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "A way to call a method in a client controlled context.", | |
"tags": [ | |
{ "tagName": "see", | |
"values": ["Function#apply()"]}, | |
{ "tagName": "param", | |
"values": ["fn The function or method to call", "thisArg The this pointer for the function", "argArray The arguments for the function", "returns If true, the function returns a value"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 10", "AIR 1.5"]}, | |
{ "tagName": "return", | |
"values": ["Whatever the function returns, if anything."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "*", | |
"params": [{ "name": "fn", "type": "Function"}, | |
{ "name": "thisArg", "type": "Object"}, | |
{ "name": "argArray", "type": "Array"}, | |
{ "name": "returns", "type": "Boolean"}]} | |
] | |
} |