Compass Drawing

[Home]   [Puzzles & Projects]    [Delphi Techniques]   [Math Topics]   [Library]   [Utilities]

Search

 

Search DelphiForFun.org only

Support DFF

 

If you shop at Amazon anyway,  consider using this link. We receive a few cents from each purchase.   Thanks.

In Association with Amazon.com

 

Support DFF

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

 

 

Contact

Feedback:  Send an e-mail with your comments about this program (or anything else).

 

Search DelphiForFun.org only

 

 

 

 

Here's a sample Compass drawing demonstration which will show how to draw and rotate the dial or the pointer in Delphi code. The angle
is specified in the "Heading" TSpinEdit control;

It uses a TPaintbox, "Compass", to repaint the compass when needed. Compass is completely redrawn for each call so its owner (Panel1) has its "Doublebuffered" property set True to prevent flashing when the space is cleared before redrawing.

It uses the TLogRec data structure and the CreateFontIndirect procedure to draw letters and numbers at right angles to the direction radial.

 

Download source code here 

Download executable

Created: July 22, 2010

Modified: July 22, 2010

  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright © 2000-2011, Gary Darby    All rights reserved.