Symbian3/SDK/Source/GUID-F5DC1A03-6F07-5E60-B912-429DDC820875.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-F5DC1A03-6F07-5E60-B912-429DDC820875"><title>CPicture-Derived Classes</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This topic introduces the essential features of <codeph>CPicture</codeph> -derived classes and other features, which, although not essential, are normally also provided. </p> <p>Each <codeph>CPicture</codeph> -derived class must provide: </p> <ul><li id="GUID-E61F5EE0-9815-5CE7-826C-87A530F9F7C4"><p>a constructor which creates a ‘real-world’ picture and sets a data member to the picture’s original size in device-independent units (for example, <codeph>iOriginalSizeInTwips</codeph> could be used for twips); </p> </li> <li id="GUID-EBE57886-29C2-51B4-80D8-DFDA7E0765C3"><p>a <codeph>GetOriginalSizeInTwips()</codeph> function which returns the original size of the picture in twips; </p> </li> <li id="GUID-C13F6C37-3AA8-573E-AD4A-13EE173664AE"><p>a <codeph>Draw()</codeph> function which draws the picture to a particular graphics map on a graphics context - at this point, and not before, the picture’s co-ordinates should be converted from device-independent units to pixels; </p> </li> <li id="GUID-BA29556A-643F-5128-A49D-C9C8BBD20B8B"><p>an <codeph>ExternalizeL()</codeph> function which externalizes the picture to a stream. </p> </li> </ul> <p>Normally, a <codeph>CPicture</codeph> -derived class will also provide: </p> <ul><li id="GUID-65F57E21-8D70-5AF1-A2DD-7101993C985A"><p>an <codeph>InternalizeL()</codeph> function to internalize the picture from a stream; </p> </li> <li id="GUID-878FDF7F-0856-53A6-80DE-C78EB00EC2FC"><p> <codeph>StoreL()</codeph> and <codeph>RestoreL()</codeph> functions to store and restore pictures from a stream store; </p> </li> <li id="GUID-1DE85655-5E82-589A-A405-AA72443BC55A"><p>one or more data members to access and manipulate the original picture - the picture’s scaling may be altered (this changes the ‘real-world’ size of the picture in twips); </p> </li> <li id="GUID-F3C67535-2E19-5BF1-A6A8-CAD10410C118"><p>if necessary, behavior that performs appropriate clean-up. </p> </li> </ul> <p> <codeph>CApaIconPicture</codeph> is an example of a <codeph>CPicture</codeph> -derived class. </p> </conbody><related-links><link href="GUID-5CEE36FC-C5A9-5C4E-9DBC-9C7B5B44EA2F.dita"><linktext>Picture Concepts</linktext> </link> <link href="GUID-520AC2F0-009E-51F3-A661-3B6E949F1423.dita"><linktext>Picture Tutorials</linktext> </link> </related-links></concept>