CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 16

Threaded View

  1. #1
    Join Date
    Jun 2012
    Posts
    8

    Question Algoritme for doubling a line

    howdy !
    i'm working on a program with VC++ 6.0, a part of it consits of importing a BMP file that contains in it a drawing of a non closed line or curve.

    In that file i've already set the background color to Black and the curve color to Green so that my program can locate easily the green pixels of the curve then buffering them in the desired order.

    please take a look at the picture bellow.

    well this is a simple of the result i want to get .

    actualy i want to double the green line by drawin two parallel red lines that follow the green one !

    but !!
    as you can see thoes lines arn't a duplicate of the green one !

    the external red line gets more pixels than the internal one, obviousely cause they don't use the same angle when the green line changes direction!

    i managed to make programe tha can do this operation for horizontal and vertical line, as well for curves with 45 Dergrees rotation angle, but i fount it a bit hard to automate the procedure for the other angles.

    i don't know if there is a mathematical function that can do this easily or i have to figure out one


    please...a litle help here would be verry apreciated !

    i need just head lines

    thanks in advance
    Attached Images Attached Images

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

Featured