|
-
Feb 13th, 2001, 06:03 PM
#1
Thread Starter
New Member
I want to use a custom bush for my calligraphy programme. It's no problem to paint with this brush. I just use BitBlt while the mouse button is pressed.
But when I move the mouse a little more faster I won't get a line of course. It's also no problem to remember the last point and draw a line between the last and the current point but that makes no sense when using a custom brush.
Is there any possiblity to solve this problem? I'm feeling so bad when I look at the calligraphy brush in Adobe Illustrator because this is excactly what I want. How do they do that?
-
Feb 13th, 2001, 06:19 PM
#2
Addicted Member
Try this:
Code:
Dim lX As Long, lY As Long ' new starting coordinates
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
' If the left MB is clicked, set up new coordinates
If (Button And vbLeftButton) = vbLeftButton Then
lX = X
lY = Y
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
' If the left MB is pressed, draw a line from lX, lY to X, Y and set new starting coordinates
If (Button And vbLeftButton) = vbLeftButton Then
Line (lX, lY)-(X, Y)
lX = X
lY = Y
End If
End Sub
-
Feb 14th, 2001, 03:57 PM
#3
Thread Starter
New Member
Thanks, but I already know that. That only makes sense when using PSet to draw. But I have my own brush, it has the form of a crooked circle, like a pen-nib. So I can't just use The line method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|