locked
How to pen draw in a d2dcontext?

    Question

  • Hi All,

    I have a swapchain -directx windows store application.

    I have drawn an image from a RandomAccessStream to the d2dcontext.

    Now I wanna draw lines over this image when I move my mouse.

    Am now using d2dcontext->DrawLine() to achieve the feature, but I gets some straight lines while I speed up the mouse.

    how can I draw smooth curves which continues with mouse.

    ---

    now saves the mouse points to a vector and pass it to render class for drawing each time.

    is there any other ideas/ways that I can draw lines to the context?

    Monday, December 10, 2012 10:44 AM

Answers

  • Hi Jesse,

    Solved!!!

    Actually am adding mouse points to a vector, and this vector is used while drawing in render class.

    Regards.

    _Sujith

    • Marked as answer by Jesse Jiang Tuesday, December 18, 2012 7:04 AM
    Monday, December 17, 2012 5:19 AM

All replies

  • Hi,

    Would you please show us some codes in your project?

    How do you draw line in OnPointerMoved.

    Best regards,

    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 12, 2012 8:02 AM
  • Hi Jesse,

    Solved!!!

    Actually am adding mouse points to a vector, and this vector is used while drawing in render class.

    Regards.

    _Sujith

    • Marked as answer by Jesse Jiang Tuesday, December 18, 2012 7:04 AM
    Monday, December 17, 2012 5:19 AM