Symbian3/PDK/Source/GUID-82B8C95E-F7E7-59C2-A71A-4C882653D555.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 9 59758314f811
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE task
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
12
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 9
diff changeset
    12
<task xml:lang="en" id="GUID-82B8C95E-F7E7-59C2-A71A-4C882653D555"><title>Continuous Digital Zooming</title><shortdesc>This tutorial describes how to perform continuous digital zooming using the Ecam API. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> <prereq id="GUID-18F6B6F4-909B-58C3-A6B3-014E8B4D5919-GENID-1-12-1-22-1-1-7-1-5-1-6-1-4-1-5-1-3-1"><p>Before you start you should understand the following topics: </p> <ul><li id="GUID-47B2BCC4-347A-5188-9DA4-1AF59A5E0862"><p><xref href="GUID-176913BA-3877-58E2-9E12-3606EE697813.dita">Overview</xref> of the advanced Camera settings functionality. </p> </li> <li id="GUID-A34D2CE7-2C30-5349-85D2-A51023CFBB4B"><p><xref href="GUID-BDB622BF-1CFA-5F1C-81FB-5579C8599689.dita">Tutorial</xref> of the advanced Camera settings functionality. </p> </li> </ul> </prereq> <context id="GUID-D62D84CA-773A-5E47-90A4-2E0FDA70C818"><p>For advanced camera settings, the continuous digital zooming API provides a greater control over continuous zoom by allowing you to specify the speed and acceleration of each continuous zoom operation. The minimum speed for zooming is zero and the minimum acceleration is a negative value (which means deceleration). </p> <p>For continuous zooming, you need to provide a concrete implementation of <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>MCameraContinuousZoom</apiname></xref>. </p> </context> <steps id="GUID-C66E1385-9555-53A9-BD8B-AC2504F8725F"><step id="GUID-87E8226E-92D7-5C21-AB84-8B69B0E1D5AC"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::NewL(CCamera&amp;)</apiname></xref> to create a <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings</apiname></xref> object. </info> </step> <step id="GUID-390913F8-97B9-5306-8716-96D1A52E1584"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::GetSupportedContinuousZoomTypeL(TUint&amp;)</apiname></xref> to retrieve supported continuous zoom options for <codeph>CCameraAdvancedSettings</codeph>. </info> </step> <step id="GUID-3F3B7935-D89F-55F0-9AF4-1C38F481C856"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::CreateContinuousZoomL(MContinuousZoomObserver&amp;,
9
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
                TContinuousZoomType, CCameraContinuousZoom*&amp;)</apiname></xref> to create a continuous zoom object. </info> </step> <step id="GUID-787CE611-8527-5B9E-AEE7-5434775C40EF"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraContinuousZoom::GetContinuousZoomSupportInfoL(CCameraAdvancedSettings::TContinuousZoomSupportInfo&amp;)</apiname></xref> to retrieve information about the supported settings related to continuous zoom. </info> </step> <step id="GUID-8DC3F51B-0A0E-5445-AF3B-9F2BA2CC7D99"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::StartContinuousZoomL(CCameraAdvancedSettings::TContinuousZoomParameters)</apiname></xref> to start the continuous zoom operation. </info> </step> <step id="GUID-86FCBD0A-5208-5220-9620-EF6F8B59210E"><cmd/><info>Call the <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraContinuousZoom::ContinuousZoomProgress(CCameraContinuousZoom&amp;,
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
                TInt, TInt)</apiname></xref> function when a new zoom factor has achieved during the current continuous zoom operation. </info> </step> <step id="GUID-404644BF-2C4A-5051-9ABF-928A2800FE23"><cmd/><info>Call the <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::GetContinuousZoomId
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
                (TInt aZoomId)</apiname></xref> function when you use more than one continuous zoom operation. This function is used to retrieve a unique ID which you can use to determine the callback function (like <codeph>ContinuousZoomProgress()</codeph> or <codeph>ContinuousZoomCompleted()</codeph>) is associated with which continuous zoom object. </info> </step> <step id="GUID-4681BA8B-30A1-5ED6-85C4-3DCA1BE237E0"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraContinuousZoom::ContinuousZoomCompleted()</apiname></xref> to inform you that the continuous zoom function has either completed successfully or to report an error that has caused the operation to fail. </info> <info>Note: This callback function does not actually stop the continuous zoom. </info> </step> <step id="GUID-B8F65783-F7FB-527D-A053-3E1A5E3321AD"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::StopContinuousZoom()</apiname></xref> to stop continuous zooming, if the continuous zoom function has not already completed. </info> </step> </steps> <example><title>Example</title> <p>The following example shows you how to perform continuous digital zooming using the Ecam API: </p> <codeblock id="GUID-C91D9A77-001B-5649-9B30-B0F4964C8023" xml:space="preserve">
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    16
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    17
CCamera* camera;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    18
MCameraObserver2* observer2;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    19
Camera = CCamera::New2L(*observer2, 0);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    20
CCamera::CCameraAdvancedSettings* settings = CCamera::CCameraAdvancedSettings::NewL(*camera);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    21
 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    22
TUint supportedContinuousZoomType;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    23
settings-&gt;GetSupportedContinuousZoomTypeL(supportedContinuousZoomType);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    24
               
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    25
CCamera::CCameraAdvancedSettings::TContinuousZoomType continuousZoomType =
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    26
                       CCamera::CCameraAdvancedSettings::EContinuousZoomMixed;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    27
 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    28
MContinuousZoomObserver* continuousZoomObserver;     
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    29
CCamera::CCameraContinuousZoom* continuousZoom = NULL;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    30
settings-&gt;CreateContinuousZoomL(*continuousZoomObserver, continuousZoomType, continuousZoom);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    31
        
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    32
CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo info;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    33
continuousZoom-&gt;GetContinuousZoomSupportInfoL(info);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    34
        
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    35
CCamera::CCameraAdvancedSettings::TContinuousZoomParameters param;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    36
param.iContinuousZoomType = continuousZoomType;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    37
param.iContinuousZoomAcceleration = 0;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    38
param.iContinuousZoomSpeed = 1;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    39
param.iContinuousZoomLimit = 5;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    40
param.iZoomDirection = CCamera::CCameraAdvancedSettings::EZoomDirectionWide;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    41
 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    42
continuousZoom-&gt;StartContinuousZoomL(param);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    43
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    44
</codeblock> </example> </taskbody><related-links><link href="GUID-6A7F8298-F3E9-513C-8C1F-D057AC62E5E3.dita"><linktext> Advanced Settings for Focus, Drive Modes,
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    45
                and Bracket Modes</linktext> </link> </related-links></task>