[scribus] another API question - quick one
Gregory Pittman
gpittman at iglou.com
Thu Nov 2 13:38:10 UTC 2017
On 11/02/2017 06:46 AM, ZASKE Martin wrote:
> Dear Greg and List,
>
> inspired by your mail, I went and created a testing document with one
> object which I filled with a solid colour and experimented with
> combinations of settings.
>
> I found that in the properties window, there is Colours-tab with
> Fill-tab (Fill Mode is "Solid") and I have Shade, which translates in my
> .sla <PAGEOBJECT .../> to entries like this:
>
> Shade 15% >>> SHADE="15"
> Shade 40% >>> SHADE="40"
> Shade 100% >>> no entry
>
>
> Then below there is Transparency-tab with Solid-tab and I have Opacity,
> which translates in my .sla <PAGEOBJECT .../> to entries like this:
>
> Opacity 100% >>> no entry
> Opacity 75% >>> TransValue="0.25"
> Opacity 60% >>> TransValue="0.4"
> Opacity 40% >>> TransValue="0.6"
> so this one is working "backwards"; because of the definitions of
> opacity versus transparency I suppose
>
>
> I had found in the help about the API the command that you also gave me,
> namely
>
> setFillTransparency(transparency, [name])
>
> which I believe belongs to the first series above called "Shade".
>
>
> I am still looking for a command which gives me access to the second
> series called "TransValue". Why? Because in my little video-animation it
> would give me a very sexy way of fading-in my text (the proverb), while
> the ants are marching below.
Hi Martin,
I just made a little script with a single command:
scribus.setFillTransparency(0.9)
which works as expected. The value of 0.9 corresponds to an opacity of
90%. I will edit the manual information to explain this. As with working
with Fill opacity in the main window, this not only affects the fill,
but also the content, i.e., text. So it should accomplish what you're
looking for, as I understand it.
Greg
More information about the scribus
mailing list