UNO access pixel coordinates of shapes during presentation

The Application Programming Interface and the OASIS Open Document Format

UNO access pixel coordinates of shapes during presentation

Postby urbov » Tue Jul 26, 2016 6:43 pm

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.
OpenOffice 4.1.2 on Windows 8
urbov
 
Posts: 1
Joined: Tue Jul 26, 2016 6:38 pm

Re: UNO access pixel coordinates of shapes during presentati

Postby Zizi64 » Fri Jul 29, 2016 7:43 am

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).
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.2 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6065
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 1 guest