|
April 28, 2000 Page Watermarks Tips: April 2000
Yehuda Shiran, Ph.D.
|
|
Page watermarks are images that stick to the page in a certain location with respect to the window and not with respect to the document. A page watermark placed in your windows's bottom right corner will continue to show up there, even if you scroll the page up and down. Our implementation of page watermarks consists of the waterMark() function and two statements:
makeLinkedImage(): creates the linked image of the watermark.
doThisCommandEveryIntervalMS: calls waterMark() repeatedly to check for changes in the window's or scroll area's size.
The
Notice how the position of the top left corner of the image is computed. It depends on the window size (
Also, notice that the highest
Learn more about our page watermarks and DOCJSLIB in Column 29, DOCJSLIB Version 3.0: Supporting Watermarks, and Column 33 DOCJSLIB Version 4.0: Scrollers, Watermarks, and Games.
People who read this tip also read these tips: Look for similar tips by subject: |