On 03/09/10 14:14, Jan Holst Jensen wrote:
I am dabbling with in-cell rendering of molecules and proteins in Calc. I have made a custom build of DEV300_M60 (I know - it's old now) where I have added code that to some extent can do the job. You can take a look at my progress so far at

http://www.biochemfusion.com/work/in-cell/status1.html

I haven't found myself able to sufficiently grok the logic in output2.cxx's ScOutputData::DrawStrings() so I can override the cell rendering reliably enough. Also, I could use a hint as to how I should implement proper preview and print support - seems like it is mostly a matter of scaling (?).

ScOutputData has member variables nPPTX and nPPTY for the factor of pixels per twip. Just use those instead of a fixed factor, and scaling will adjust to the printer (or different zoom in the view).

There is still a special case to be handled though: If the configuration option "User printer metrics for text formatting" is set, the bPixelToLogic parameter to DrawStrings is TRUE, and PixelToLogic / LogicToPixel has to be used.

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to