I would like to do something like this http://weblogs.asp.net/broux/archive/2011/02/08/silverlight-how-to-watermark-a-writeablebitmapimage-with-a-text.aspx. I am having a tough time getting this to work in WinRT. I am using the WriteableBitmap extensions to "render" some text but I want it to look exactly like it looks in this example. Any suggestions or help?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
This gets the job done visually:
It's certainly the same effect without all the work. If you are wanting to get it to literally make the watermark part of the original image, offloading to a service is your only current option. Without the
Render()
method on theWriteableBitmap
there is no other option for you. Not even the XAML Toolkit solves this problem. It's a common request.But depending on your use case, this might just be exactly what you want!
I hope it is. Best of luck.
You could render that text to a png asset and blit it on top of the bitmap. Unless the text needs to be dynamic - then you'd need DirectWrite. WinRT XAML Toolkit has an extension method you could use to render text to a WriteableBitmap.