Page 1 of 1

UNO access pixel coordinates of shapes during presentation

Posted: Tue Jul 26, 2016 6:43 pm
by urbov
Hello,

I'd like to access the bounding-box of each shape on the current slide of my presentation in screen (pixel) coordinates. Could someone point me into the right directions.

XShape getPosition/getSize: https://www.openoffice.org/api/docs/com ... Shape.html

but how to tranform these units into pixel coordinates?

How does Shape:HomogenMatrix3 play its role here?

https://www.openoffice.org/api/docs/com ... Shape.html


Thanks for your help.

Re: UNO access pixel coordinates of shapes during presentati

Posted: Fri Jul 29, 2016 7:43 am
by Zizi64
but how to tranform these units into pixel coordinates?
The Impress is a vectorgraphic application. Therefore it has not a fixed display/slide resolution value. The actual pixel resolution of a slide (what is containing some vectorgraphic shapes) will depend on the zoom level, and the physical display resolution. The "pixel resolution" of the actual view of the shapes will be recalculated for every zoom level...

You can try make a estimating calculation of the pixel-coordinates based on the slide and shape size (mm or inch), the coordinates of the shapes (mm or inch) and the zoom level and the resolution of the display (pixels). At the "Full screen" view, the resolution of the slide and the resolution of the display will be approximately equal - but only when the ratio of the display and theratio of slide (4/3; 16/9; 16/10; etc...) is same).