Ok... I don't know about you, but when I look at drawing a graphic for a watermark or drawing whatever to the canvas (both wPDF and wpTools) I sometimes just glaze over. Mainly because I have only done it a few times and haven't done an in depth study of the different calculations and all the different units that might be used and what coordinate system and so forth.
So what I thought would be useful would be someone giving a good fundamentals of drawing to the canvas and the mathmatical background behind it and the units being used... especially pertaining to wptools and wpdf.
For instance when you look at some of the source code or examples you see things that might reference CM (Centimeters) or pixels or twips or x per inch, or MulDiv this or round that. And what happens if you switch from dealing with the screen and now deal with the printer. In some areas I see it changes things all over again.
My point is it can be a little confusing when you first start looking at this and it would be great if we had a good tutorial along with clear examples of things like:
wPDF Canvas and WPTools Canvas and when printing...
- Drawing a graphic to fill the entire page
- Drawing a graphic to be positioned in the center of the page and stay the original dimensions (no streching)
- Drawing a graphic and rotating it x degrees on the center of the page
- Positioning text
- Drawing graphics to be in the various corners of the canvas.
- What to do when printing versus to the screen if anything.
On reason I bring this up is because I am simply trying to use the DrawTGraphic to place a graphic (like a watermark) on the cavas of the wpdf and I am having a heck of a time just centering the stink'n thing. In other areas I see the MulDiv(w, xres, WPScreenPixelsPerInch) and xres and yres get their falues from the FFont?PixeslPerInch so then I start wondering what the heck do I use for x, y, w, h of the DrawTGraphic to get this thing in the center of the page, but no matter what I just miss the mark.
Like when do I need to use the MulDiv and when not?
Anyway... I think you get the picture and any feedback or helpful things you do to help you follow the Delphi coordinate, graphic, unit system would be helpful.