Tools Links Login

Font Rotation Example

Font Rotate: This code provides a user method to draw text on a anything with a device Context (form, user control, printer, etc.) at any angle. This is a rework of code found on PSC by ZATRiX

Original Author: Seraphire

Inputs

The DrawText routine takes the following:
* ByRef Canvas As Object - Device getting "drawn" on
* ByVal txt As String - text to write
* ByVal X As Single - X Coordinate
* ByVal Y As Single - Y Coordinate
* ByVal font_name As String - Font Face to use
* ByVal size As Long - Font Size
* ByVal Angle As Single - Angle of Rotation
* ByVal weight As FontWeight - How heavy a pen
* ByVal Italic As Boolean - Italic?
* ByVal Underline As Boolean - Underline ?
* ByVal Strikethrough As Boolean - Strikethrough?

Assumptions

Make sure that your drawing canvas has the "AutoRedraw" property set to true, otherwise your text may dissappear off the control.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 93 times

Categories

Visual Basic 6

Attachments

Font_Rotat729144172002.zip
Posted: 9/3/2020 3:45:00 PM
Size: 4,052 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.