SnappyLine -- Draw Lines with Text Label at Any Angle

SnappyLine -- Draw Lines with Text Label at Any Angle

Post by Earl F. Glyn » Mon, 07 Dec 1998 04:00:00

Gordon Whittam contributed a very interesting "Snappy Line" project to my Computer Lab.

With the SnappyLine program you can draw "free" lines, which are lines that snap to each other and measure angles.  Lines can be
highlighted with a trackbar and erased when the trackbar is released. SnappyLine also demonstrates the creation of a LogFont for
drawing the text dimensions at any angle.

Take a look at the Snappy Line Lab Report at

efg's Computer Lab:
Delphi Books:

Overland Park, KS  USA


1. how can I draw labels in angle ?

I have to draw on screen over 1000 labels , in different angles, this angels
might change.
I have the follow code in a BCB4s Timer
LOGFONT logfont;
for(int i = 0; i < 1000; i++)
    logfont.lfEscapement = ANGLE(i);
    HFONT font = CreateFontIndirect(&logfont);
    Canvas->Font->Handle = font;

It takes a long time to draw all labels (Aprox. 2 Sec.)

Could someone help me.

2. Q: Rendering 3D Wire Meshes

3. Drawing Text at an angle WITH a character underlined

4. Re Selecting Type and Multiple Selections - How To?

5. Drawing a Line with an Angle.

6. u=f(x,y,z) visualization

7. Are there any Text drawing functions that can identify and draw URL Highlighted Text

8. Need simple 2D bit mapped text and line drawing package

9. Help, move the line labels out of the data line

10. How to draw lines around text?

11. Corel Draw 6, horizontal lines in text

12. Counting lines in a text drawn of a TCanvas descendant