locked
DrawText text looks not clear in SurfaceImageSource unlike in SwapChainBackgroundPanel

    Question

  • Hi, I tried to make Text Reader for Windows Store App. For draw text,  I used DirectX (SharpDX) and Direct2D's DrawText method. 

    When I draw text to SwapChainBackgroundPanel (full screen directx), the text is very clear. But I draw to SurfaceImageSource completely same text, the text was very blurred.

    The class which I used to draw text is here. http://pastebin.com/afc79uyA

    Then, SurfaceImageSource and SwapChainBackgroundPanel are implemented like this. (SharpDX official sample)

    http://pastebin.com/b3ry87QZ

    http://pastebin.com/q7w14DQD

    I used SurfaceImageSource to fill Rectangle class (XAML). Then result image is here. 

    http://sdrv.ms/TnOQSO (left is on SurfaceImageSource, right is on SwapChainBackgroundPanel)

    I can't figure out what is problem. How can I draw text clearly to SurfaceImageSource ?


    • Edited by Kichang Kim Sunday, November 25, 2012 9:31 AM
    Sunday, November 25, 2012 9:30 AM

Answers

  • I solved this problem myself :)

    The reason is Stretch property of ImageBrush. To solve this problem, se to Stretch mode to Stretch.None.

    Monday, November 26, 2012 9:11 AM

All replies

  • I solved this problem myself :)

    The reason is Stretch property of ImageBrush. To solve this problem, se to Stretch mode to Stretch.None.

    Monday, November 26, 2012 9:11 AM
  • Thanks for sharing the solution.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, November 26, 2012 9:14 AM
    Moderator