Symbian3/SDK/Source/GUID-1903F18A-F095-5494-AF32-423AE7F27252.dita
changeset 7 51a74ef9ed63
parent 0 89d6a7a84779
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     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 xml:lang="en" id="GUID-1903F18A-F095-5494-AF32-423AE7F27252"><title>Drawing Points</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This topic provides examples that demonstrate how to draw a single pixel and how to draw a point with a pen three-pixels wide. </p> <section><title>Drawing a single pixel</title> <p>Use <codeph>Plot()</codeph> to draw a single point in the center of the screen. </p> <codeblock id="GUID-6E4A0CA6-312A-5814-93A6-718A122C1134" xml:space="preserve">...
       
    13 TPoint screenCenterPoint=rect.Center(); // the center of the screen
       
    14 ...
       
    15     
       
    16 // draw a single pixel point in the center of the screen
       
    17 gc.Plot(screenCenterPoint);
       
    18 ...</codeblock> </section> <section><title>Drawing a point three pixels wide</title> <ol id="GUID-43C673EC-EB23-5889-B8EF-4A4016650F9F"><li id="GUID-4FDD7566-38E0-5E99-82C2-145991DE6D12"><p>Define a size for the pen tip as a <codeph>TSize</codeph>. </p> </li> <li id="GUID-22D376B1-5B3A-56A6-8D81-E71C85A7F6A3"><p>Use <codeph>SetPenSize()</codeph> to increase the pen width from the default (single pixel). This shows how a plotted point three pixels wide is much easier to see than a single pixel. It is in fact drawn as a "+" shape. </p> </li> <li id="GUID-5D7C9D20-AE9B-5CA8-9D99-E99A208A2ECC"><p>Use <codeph>Plot()</codeph> to draw a point in the center of the screen. </p> </li> </ol> <codeblock id="GUID-2E4ECC66-0B0B-5E09-B1D4-4451944CFEDA" xml:space="preserve">...
       
    19 TPoint screenCenterPoint=rect.Center(); // the center of the screen
       
    20 ...
       
    21     
       
    22 // Set up a "bold" size for the pen tip to (default is 1,1)
       
    23 TSize penSizeBold(3,3);
       
    24 ...
       
    25     
       
    26 // draw a "bold" point 3 pixels across
       
    27 gc.SetPenSize(penSizeBold);
       
    28 gc.Plot(screenCenterPoint);
       
    29 ...</codeblock> </section> </conbody><related-links><link href="GUID-55C8C429-1BEC-5A58-94EC-DA1E51F62867.dita"><linktext>Drawing
       
    30                 to a Graphics Context Tutorials</linktext> </link> <link href="GUID-E3AC8F3E-9D5C-5E7D-9760-023B77C7C8A8.dita"><linktext>Drawing and Graphics Contexts</linktext> </link> </related-links></concept>