I am using WPF, and need to print some short strings on an engraving printer... The problem is that they need to be printed in "high" and all the blank space must be dug away, so I need to fill all the blank space with concentric shapes depending on the string being sent, something like this image:
I really don't know where to begin, could someone please point me in the right direction? Is there an easy way to accomplish this?
Thanks in advance.
I don't know of a WPF specific way to accomplish it easily. I mean, short of pre-determining shapes for each character to draw and manually coding it...
However, can you use a custom font? If you can, why don't you make your own font with those shapes baked in, and reduce the character spacing to 0, no margins?
Related
I want to create an image processing application with SDL.
My problem is that I want to rotate a surface. I tried to write the algorithm for accessing the pixels and putting them in the right position but I get really jaggy results.For this reason,I thought that the easiest solution would be to take advantage of the SLD_RenderCopyEx.
However, as I expected, this function doesn't affect the surface but the renderer, and if I want to save the result(after rotation) I will not get the rotated version of the image. Do you guys know if there is any way of saving the image as I see it on the screen? And if not, what do you guys suggest me to do ?
You can use SDL_RenderReadPixels() to read pixels from the current rendering target.
I can't find solution. I want to leave "red corner" when user update grid cell (and to remove red corner now is quite easy - in afretedit call data.record.commit()) but I don't know how to do it in runtime. I meke some loops to calculate something (sum of raw e.g.) and this value I want to write in one, special cell but WITHOUT RED MARK.
Be so kind to prompt me how.
Sorry guys, I found proper soolution. Good way is to read manual, I just commited store of this grid after described above loops:
store.commitChanges()
With CSS you can target Screen and Print. How would you do this with WPF?
I have elements that I want to display on screen differently than when they are printed.
Right now I'm hacking two instances of the same element, and setting visibility in code, which just feels really really wrong.
Thank you!
In that case, check here, here and here.
I have a problem. I need to fill (or repaint) some pixels at image, stored in Image control. This is a png image. I mean, that all black pixels should be filled with, for example, red color. How can I do this? I thought I can access directly to pixels and using XOR change special bits, but I don't know how to do this. Or maybe there is an easier way?
The GetPixel and SetPixel methods should work for what you need.
This answer has a code sample that you should be able to adopt for your use.
I've just created my first WPF application (3 calculators inside 3 different tabs).
The entire application has been built using widths/margins/paddings as static values, since I originally didn't know that dynamic values can be used by just putting an asterix after the value.
The client has come back to me though and has asked me to increase the size of the app, that includes form fields, tabs, font-sizes, grids etc...
What would be the easiest (and/or quickest) way to do this? I'd hate to go value by value resizing every single element since there are quite a few.
I can provide code but there is lots of it and I'm not sure of how much help it would be.
Appreciate your help,
Marko
Put it all in one ViewBox, play with viewbox size to change the app size
Write an XSLT transform to take your XAML as input and spit out appropriate modified XAML, which you put back in your app.