ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: wrong mlib process calls
Date: Tue, 16 Aug 2011 11:07:05 +0200	[thread overview]
Message-ID: <4E4A3339.5020702@gmx.net> (raw)

[-- 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
___________________________________________________________________________________

                 reply	other threads:[~2011-08-16  9:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E4A3339.5020702@gmx.net \
    --to=indiego@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).