|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-CF6355EF-3241-5196-AEBC-1337E1AE2259" xml:lang="en"><title>BitmapSprite: creating a sprite by loading a bitmap file</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
13 <p> <b>Note:</b> This example is designed to work properly only with |
|
14 Techview, there is no guarantee that it will work properly with other |
|
15 interfaces. </p> |
|
16 <section id="GUID-1A15C499-563E-404E-BAB5-59BAA12DA972"><title>Description</title> <p>The <filepath>BitmapSprite</filepath> example creates an animated sprite by loading a bitmap (<filepath>.mbm</filepath>) file. The sprite is a rotating windmill which can |
|
17 be moved around the screen using the arrow keys. </p> <p>As in the |
|
18 previous example, the sprite is created by setting up the sprite members |
|
19 to contain bitmaps, then appending them to the sprite. In this example, |
|
20 however, the bitmaps are loaded from a file rather than created using |
|
21 off-screen bitmaps drawn to using a graphics context. </p> </section> |
|
22 <section id="GUID-9BD7D67D-F43A-51FF-A5EA-2F82E82D92DC"><title>Download</title> <p>Click on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-5aa5e49e-ff8f-4fc3-bdc3-d20004aea9a9.zip" scope="external">BitmapSprite.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-5aa5e49e-ff8f-4fc3-bdc3-d20004aea9a9.html" scope="peer">browse</xref> to view the example code. </p> </section> |
|
23 <section id="GUID-79367351-0437-4E60-B2A7-3BCE96925D1E"><title>Classes defined</title> <p> <codeph>CSprite</codeph>: Uses class <xref href="GUID-75C09150-E93B-323D-AFBF-E42C7BD78229.dita"><apiname>RWsSprite</apiname></xref> by setting up the sprite |
|
24 members to contain bitmaps then appending them to the sprite. In this |
|
25 example, the bitmaps are loaded from a file. </p> </section> |
|
26 </conbody></concept> |