Results 1 to 5 of 5

Thread: ink canvas

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2009
    Posts
    32

    ink canvas

    Hi,

    I have a ink canvas control in my application. When the user draw the graphic they want in the ink canvas and click on ok button, that graphic that the user had drawn will be saved. Can it be done...? If yes, can it be done using Visual Studio (VB.NET). I'm using WPF application

    Thanks

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: ink canvas

    The ink canvas has a Strokes property which stores all of the lines that have been drawn onto it so you can use that to save/load them

    For example:
    Storing in a variable
    vb.net Code:
    1. Dim SavedStrokes As New Ink.StrokeCollection
    2.  
    3. For Each stroke As Ink.Stroke In InkCanvas1.Strokes
    4.     SavedStrokes.Add(stroke)
    5. Next
    Last edited by chris128; Feb 10th, 2009 at 06:12 AM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Re: ink canvas

    Also, if it's newly drawn you should be careful not to smother it all over the file when saving.

    ...

    I'm the king of hi-larious...
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: ink canvas

    king of crap more like (with jokes like that anyway!)
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  5. #5
    Lively Member
    Join Date
    Jul 2007
    Posts
    127

    Re: ink canvas

    http://www.centrolutions.com/Home/ta...5/Default.aspx

    i know the link is c# but theres not much to it, so it was easy to convert to vb. give it a shot and see how far you can get. if not ill dig through my code to help u

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