Symbian3/PDK/Source/GUID-4957E6BB-C41D-52F1-94CD-68CF6D61C271.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 11 Mar 2010 18:02:22 +0000
changeset 3 46218c8b8afa
parent 1 25a17d01db0c
child 5 f345bda72bc4
permissions -rw-r--r--
week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-4957E6BB-C41D-52F1-94CD-68CF6D61C271"><title>Format layering</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The Symbian OS uses the principle of format layering in which new formatting is added as a layer onto the previous layer of formatting. The following diagram shows a less efficient technique for applying format layering to text. The inefficiency arises because each format layer stores not only the new attribute which it introduces, but also every attribute which it inherits from the preceding format layer. </p> <fig id="GUID-DBA21807-9BC8-5FFB-962A-4CDCD9A72359"><image href="GUID-CFD3CD78-D99A-57B8-80EB-8C67899E5D27_d0e666955_href.png" placement="inline"/></fig> <p>The Symbian OS avoids this inefficiency by using the system of <keyword>based-on links</keyword>. Here, each new layer adds attributes in a natural way without restating all attributes previously set. A based-on link is a pointer to the format layer whose attributes are inherited by another layer. For example, when the italic attribute is applied to a region of bold text, the new layer stores only the italic attribute and a pointer to the previous attribute layer. Chains of format layers can thus be formed, with each layer based on the previous one. In order to determine a character or paragraph’s <keyword>effective format</keyword>, a chain of format layers must typically be examined. The final layer in the chain of based on links is the one whose based on link is NULL and is not therefore based upon any other layer.</p> <p>This method is demonstrated in the following two diagrams, in which each arrow represents a based-on link.</p> <fig id="GUID-3BE6B9A3-D8DB-543C-AA88-DD519B991B62"><title>Format layering</title> <image href="GUID-52743192-B1E0-5B71-B85B-43487F18F412_d0e666973_href.png" placement="inline"/></fig> <p>The following diagram demonstrates the system of based-on links when attributes are applied to different parts of text rather than added on top of existing attribute layers.</p> <fig id="GUID-1E0E17F0-BE93-5403-8474-ED612E118C8F"><image href="GUID-F99938E9-9E06-53C0-B762-2CE51BC5F1E2_d0e666979_href.png" placement="inline"/></fig> <p>In this case, several format layers are required, all of which are based on the normal layer.</p> </conbody></concept>