Watermark printing
-
hi guys, In my current assignment, i am looking to print watermark on the page as per the type of the page, say on the introduction page i wish a watermark of "INTRODUCTION". i firstly tried some googling. but so far no lucks :((.. I guess i am clear what i need.. any body please help..
HARSH Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
-
hi guys, In my current assignment, i am looking to print watermark on the page as per the type of the page, say on the introduction page i wish a watermark of "INTRODUCTION". i firstly tried some googling. but so far no lucks :((.. I guess i am clear what i need.. any body please help..
HARSH Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
Well I guess the best thing to do would be to add some code to your print routine to overlay your printed page with the word "INTRODUCTION" in light gray or some other colour of your choosing.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
-
Well I guess the best thing to do would be to add some code to your print routine to overlay your printed page with the word "INTRODUCTION" in light gray or some other colour of your choosing.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
Hi, First of all thanx replying Richard, Well if i'll pring or draw something and then if something will come over it, it will be gone. Even Suppose I'll make the impression of "INTRODUCTION" on the DC and in some next step i'll draw a text like "abc<10-20spaces>xyz", what ever will be written bellow the white spaces will again be gone.. I hope you got the problem
HARSH Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
-
Hi, First of all thanx replying Richard, Well if i'll pring or draw something and then if something will come over it, it will be gone. Even Suppose I'll make the impression of "INTRODUCTION" on the DC and in some next step i'll draw a text like "abc<10-20spaces>xyz", what ever will be written bellow the white spaces will again be gone.. I hope you got the problem
HARSH Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
You can draw the superimposed text last, using a mode that only draws the text but keep the background transparent. SetBkMode(TRANSPARENT) will do the trick. The above superimposed text will block whatever behind it because the superimposed text is opaque. To make a true superimposed text, you have to make them semi-transparent. To achieve this, you need to use a certain way to blend the text to the existing drawings. This is more complicated. You may need to create a couple of image buffers to conduct these operations, and print the final result. -modification- As Richard MacCutchan pointed out, you can print your superimposed text first, then render everything else. When you render text, make sure the background mode is set to transparent. That way, only the text itself is rendered, the background will be see-through. Your problem is probably caused by the fact that the background mode is not set to transparent. Check the documentation out: http://msdn.microsoft.com/en-us/library/dd162965(VS.85).aspx[^]
modified on Thursday, February 11, 2010 9:37 AM
-
Hi, First of all thanx replying Richard, Well if i'll pring or draw something and then if something will come over it, it will be gone. Even Suppose I'll make the impression of "INTRODUCTION" on the DC and in some next step i'll draw a text like "abc<10-20spaces>xyz", what ever will be written bellow the white spaces will again be gone.. I hope you got the problem
HARSH Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
Harsh Shankar wrote:
what ever will be written bellow the white spaces will again be gone..
I don't think this is strictly true; when you print on a DC only the colours are rendered so all white space remains as it was. Thus if you print your watermark first and then your text on top, only the parts of the watermark that get overprinted will disappear. Why not try a small test to see what results you might get?
txtspeak is the realm of 9 year old children, not developers. Christian Graus