ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* wrong mlib process calls
@ 2011-08-16  9:07 Peter Rolf
  0 siblings, 0 replies; only message in thread
From: Peter Rolf @ 2011-08-16  9:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

Hi,

I have added the 'mtr' process in front of the normal 'tr'
process.

[mlib-pps.lua]
...
appendaction(processoractions,"system",fg_process)
appendaction(processoractions,"system",mtr_process)
appendaction(processoractions,"system",tr_process) -- last, as color can
be reset
...

Strangely the 'mtr' process is also(!) called, if normal transparency
('tr') or text ('tx') is used. You can imagine that the 'cleanup
code' has unwanted side effects here. :-)
A change of the 'appendaction' order has no impact.

I simply added

    commands.writestatus('mtr_process',table.serialize(prescript))

at the start of mtr_process and this is what I get for the attached example:

mtr_process     > t={
 { "tr_transparency", "0.5" },
 { "tr_alternative", "1" },
 ["tr_alternative"]="1",
 ["tr_transparency"]="0.5",
}
mtr_process     > t={
 { "tr_transparency", "0.5" },
 { "tr_alternative", "1" },
 ["tr_alternative"]="1",
 ["tr_transparency"]="0.5",
}
mtr_process     > t={
 { "tx_stage", "final" },
 { "tx_number", "1" },
 ["tx_number"]="1",
 ["tx_stage"]="final",
}

Any ideas what goes wrong here? Example and patched file added.


Peter


mtx-context     | current version: 2011.08.04 00:42
This is LuaTeX, Version beta-0.70.1-2011051907 (rev 4277)

[-- Attachment #2: test.tex --]
[-- Type: text/x-tex, Size: 889 bytes --]

\nopdfcompression
\setuppagenumber[state=stop]


\definecolor[foo][r=1,g=0,b=0,,a=1,t=.5]
%\definecolor[foo][r=1,g=0,b=0]

\startuniqueMPgraphic{foo}{color}
    rgbcolor c;
    % this only works with non transparent colors; otherwise...
%    c:= \MPvar{color}; % ...:  ! Equation cannot be performed (color=numeric).
    % works with non|transparent colors, but grayscale conversion!!
    c:= \MPcolor{\MPvar{color}};

    fill OverlayBox scaled .25 withcolor c;
    fill OverlayBox scaled .50 withcolor transparent(normaltransparent,.5,c);
    fill OverlayBox scaled 1.0 withcolor c withtransparency(normaltransparent,.5);

    label(decimal(redpart c) & "," & decimal(greenpart c) & "," & decimal(bluepart c),center(OverlayBox));
\stopuniqueMPgraphic

\defineoverlay[foo][\uniqueMPgraphic{foo}{color=foo}]

\starttext

\framed[width=10cm,height=2cm,frame=on,background=foo]{}

\stoptext

[-- Attachment #3: mlib-pps.7z --]
[-- Type: application/octet-stream, Size: 8084 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-16  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-16  9:07 wrong mlib process calls Peter Rolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).