[scribus] Problem with getProperty
gpittman at iglou.com
Sat Jun 6 18:58:56 UTC 2020
On 6/6/20 12:48 PM, JLuc wrote:
> Le 06/06/2020 à 15:12, Gregory Pittman a écrit :
>>> So I have now an explanation at least but It is a little "weird" as what you see is not what you get when in mm unit and that I am storing those values for further use in another script :(
>> This is one of those things that "is what it is".
>> From the manual:
>> getImageOffset(["name"]) -> (x,y)
>> Returns a (x, y) tuple containing the offset values in point unit of the image frame "name". If "name" is not given the currently selected item is used.
> I guess a scribus scripter API function would be helpfull
> to convert points to cm or inches and reverse
> in the very same way scribus does it
> (= with the exact same ratios and roundings)
But I think one could manage to do this in python itself. There is only a certain level of precision which is possible. For example, when I tried this out, I had an image scaled at 77% and 89%. The results of the script came back 0.77 and 0.8900000001
More information about the scribus