winzip icon

Line Art

Submitted on: 1/4/2020 12:40:50 AM
By: Kenneth Foster 
Level: Intermediate
User Rating: By 1 Users
Compatibility: VB 6.0
Views: 2628
author picture
     This was written by Jerome A. Simon and is one of my favorites. I've added some new features, I've found some code by Tanner Helland to flood fill my pictures. This app is not perfect but with a little practice it can do a good job. Rate it if you want, but give it a try. Made another Update.12/21/2019. Added undo to program (lets you do five undo's now) modified code a little to stream line it and added some eye candy. Hope you like it. Comments are always welcome.12/25/2019: made an update.Got the straight line drag to work right.

winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net

Other 14 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

12/21/2019 5:50:01 PMKenneth Foster

with Straight Lines , I have'nt been able to get the line width to change. Not sure whats going on there.
(If this comment was disrespectful, please report it.)

12/21/2019 10:29:20 PMKenneth Foster

I think I've got the bugs fixed and the line width problem fixed.
(If this comment was disrespectful, please report it.)

12/23/2019 8:52:37 PMEddie Bole

Hey Kenneth,
About auto filling your pattern. I thought I had a checkerboard pattern program from ages ago that someone else did (which I opened up randomly about a month ago), but I was unable to find it (sorry about that). One possible way to autofill the pattern shown in your above screen capture is to find midpoints of the bottom line by splitting it up into TWICE the number of pieces (this will give you x ordinates). Just add half the increment distance to the existing intersections at the bottom line. For the y cordinates just select a few pixels above the bottom line (in other words find the y ordinate of the bottom line at a given point and then subtract a small amount). I usually try to do the fill in the mouseup event. Sometimes there may be XORing at a point so a small Pset poinnt may need to be placed there to fill a particular triangle.
(If this comment was disrespectful, please report it.)

12/23/2019 8:53:22 PMEddie Bole

Another most accurate way is to find the centroid of each triangle made by adding each xordinate and dividing by 3 and then adding each yordinate and dividing this by three. For your net patterns with 4 sided quadrilateral shapes add each xodinate and divide by 4 and each yordinate and divide that by 4 as well. If you look at my filled kite example and my filled regular polygon example that is exactly what I did to fill each shape. I generally found it was better to put the fill code in the mouseup event to reduce the flickering and have the shapes fill more consistently. Hoping this helps you out. Regards Ed.
(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.