Results 1 to 4 of 4

Thread: [02/03] GDI+ Thick Diagonal Lines

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2005
    Posts
    48

    [02/03] GDI+ Thick Diagonal Lines

    Hey,

    I have to draw diagonal lines with GDI+ which is fine using .DrawLine but I need the lines to be a little more bolder then the default.

    Anybody have any suggestions?

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: [02/03] GDI+ Thick Diagonal Lines

    Just like in real life, you'd use a thicker nib on your pen...

    VB Code:
    1. .DrawLine(new Pen(Color.Red, [B][COLOR=Red]10[/COLOR][/B]), 30, 30, 200, 200)
    I don't live here any more.

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2005
    Posts
    48

    Re: [02/03] GDI+ Thick Diagonal Lines

    Ahhh good call... didn't know there was another constructor.

    THANKS!

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,683

    Re: [02/03] GDI+ Thick Diagonal Lines

    Everytime you use the "new" keyword with the name of a class (ie... new Pen), look at the dropdown box that appears, this has a complete list of all of the constructors available for this class.

    (this actually happens with normal functions and subs too, use the up and down arrow keys to choose the one you want and then follow the intellisense hints to fill in the correct items in the parameter list).

    That Intellisense dropdown is your BEST friend in .NET. Don't forget it

    Take a look at the dropdown for .DrawImage, it has around 30 different overloads!!! As soon as you learn how to use intellisense to your advantage you will be a better coder than 70% of the people on this forum. I keep raving about it but nobody ever listens. Good luck.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width