How can I draw a line with pencil like effect ?

I'd like to draw a line with GDI+ like a line on a paper created with a pencil.
Can anybody point me to an example or an article that explain the technique?
Thank you,
Andrea

[195 byte] By [AndreaN.] at [2008-2-22]
# 1
You're saying that you want the line to be irregular, instead of being solid ? Or you just want to draw a line ?
cgraus at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2
Hello Christian,
I'm looking for a variable thinckness line or curve with a texture like paper and a dark gray color.
Andrea
AndreaN. at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 3
Hi Andrea. I thought this was probably what you were after. A Pen in GDI+ has a fixed width, I would imagine that perhaps the easiest way to go about this would be to create several pens, of varying width, and using a sample like the one you were pointed to ( which actually is based on a C# sample I wrote on the same site, if you wanted C# code instead ), and modifying it so that as the path is built, the code changes which pen it uses from section to section. As the sections are created in the mousemove event, I'd imagine most of them would be quite small in length.

I'm still trying to think of a way that a texture brush would help here, but nothing is coming to mind...

cgraus at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 4

I will try your idea Christian.

I will break my lines or curves into several segments and for each one I will assign different thickness.

Your help is really appreciated
Andrea

AndreaN. at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 5
Glad to help. I hope it looks OK, I've not actually tried it.
cgraus at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...