Advertisement

05.04.2008 at 07:58PM PDT, ID: 23375621 | Points: 500
[x]
Attachment Details

Drawing a rectangle such that it apears to be hand drawn

Hi, I'd like some advice (code would be nice too) on the following problem.

I would like to draw a rectangle (speed does not matter) such that it looks as if it has been 'hand drawn'.. no doubt one could do this in Photoshop with some special brush, but I want to do it in Delphi.

To appear "hand drawn" the line must vary in thickness (maybe with a sine function plus some randomness) and must wobble around its true course a bit.

I have been reading around, and without going to GDI+ (I don't have the brain space at the moment, nor am I sure that it will do what I want), I am starting to think that path functions (which I have never used) might do the job. .. BeginPath, StrokePath, FillPath etc . I also thought there was something that would return the coordinates of the path and allow you to generate a new path, but I can't find it at the moment. (anyone?)

It also appears that I can use PolyBezier in a path context, so that might help with some of the induced "wobble", and maybe even thickness.

I am also thinking along the lines of "layers" .. drawing multiple slightly different paths over the top of each other - however, that might end up looking just a fuzzy mess.

As I said, I have never played around in this area so advice/test code would be a great start.

thanks.

Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: Mutley2003
Question Asked On: 05.04.2008
Participating Experts: 1
Points: 500
Views: 0
Translate:
Loading Advertisement...
05.04.2008 at 08:37PM PDT, ID: 21498026

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.04.2008 at 09:57PM PDT, ID: 21498183

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628