[scribus] another API question - quick one

ZASKE Martin zm at revue-gugu.org
Thu Nov 2 10:46:57 UTC 2017

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,

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.

I found another command which controls in the Text-Properties, Colour &
Effects-tab "saturation of colour of text fill" (0 - 100%) but that is
not nice for fading in, because a low saturation gives me ugly white
text on top of a coloured background. In contrast, a low opacity value
gives me almost invisible text on top of coloured background and then
gets nicely more and more visible.

I somebody could please point me to the online folders, where all the
scripter "commands" are created/hosted, I could learn to "read the
source" - not for programming, but for spying into all available
commands. Then I would not need to bother this list with my API questions.

I remember that I did this once, a good while ago, when I needed to find
details about png-bitmap exports. It took me a lot of time, but gave me
valuable details I believe.

Thanks. Sorry it got long again, subject line is now a lie...


On 01.11.2017 23:27, Gregory Pittman wrote:
> On 11/01/2017 04:14 PM, ZASKE Martin wrote:
>> Dear list,
>> can I have access in the scripter API to the command which is here:
>> Properties window,
>> Transparency tab,
>> Solid tab,
>> Opacity (from 0 to 100%)
>> I know about "import scribus",
>> I just can not find the command in my help.
> Hi Martin,
> Something like this is going to be considered in the category of Set
> Object Properties.
> There are two commands:
> setFillTransparency(transparency, [name]) and
> setLineTransparency(transparency, [name])
> I presume that transparency as a variable is a decimal (0.9 = 90%). You
> only need to specify a name if it's not the selected object you're
> operating on.
> In the main window, when you set Fill transparency, you are also setting
> the transparency of the content, text if a text frame, image if an image
> frame, so presumably this works that way.
> Greg
> ___
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net
> __________ Hinweis von ESET NOD32 Antivirus, Version der Erkennungsroutine 16343 (20171102) __________
> E-Mail wurde geprüft mit ESET NOD32 Antivirus.
> http://www.eset.com

ZASKE Martin
responsable GʊGʊ
BP 50 - Bassila - Bénin
tel GʊGʊ
tel pers

More information about the scribus mailing list