From: "Rudd, Kevin" <kevin@lps.umd.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Rudd, Kevin" <kevin@lps.umd.edu>
Subject: another MetaPost question (this time on ConTeXt->MetaPost
Date: Thu, 22 Jul 2021 12:59:04 +0000 [thread overview]
Message-ID: <1DE2F1FD-DB29-4E1D-955E-2E0E89DCFB9B@lps.umd.edu> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2297 bytes --]
Hey---
There seems to be a change with color transfer from ConTeXt to MetaPost. Using string references to defined (spot?) colors seemed to work but now does not; all of my colorful figures are now rendered only in shades of gray when using defined (spot?) colors….
The figure drawn by the MWE should have a dark orange border and a transparent (thin) orange fill. However, all colors of this sort seem to end up being a single shade of gray (e.g. black), rendering a box perfect for Halloween use but not for my current purposes. Is there a change to how colors defined in ConTeXt are referenced in MetaPost that I've missed or is there an issue with transferring color (name or parameter) information to MetaPost? Defined (spot?) colors work fine in ConTeXt but not in MetaPost.
Many thanks,
---K
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% system > ConTeXt ver: 2021.07.21 19:54 LMTX fmt: 2021.7.22 int: english/english
\startMPdefinitions
presetparameters "parameters_Test"
[
]
def Test =
applyparameters "parameters_Test" "do_Test"
enddef;
def do_Test =
pushparameters "parameters_Test";
string p; p = getparameter "prefix"; show p;
string c; c = getparameter "color"; show c;
path s; s = unitsquare scaled 10cm; show s;
fill s withpen pencircle scaled 5pt withcolor p&c;
draw s withpen pencircle scaled 5pt withcolor c;
enddef;
\stopMPdefinitions
\starttext
\definespotcolor[Thin:orange][orange][p=1,a=normal,t=0.5]
\color[orange]{hello}
\startalignment[center]
\startplacefigure
\startMPcode
Test [ prefix = "Thin", color = "orange" ];
\stopMPcode
\stopplacefigure
\stopalignment
\color[Thin:orange]{goodbye}
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)
Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)
443-654-7878
kevin@lps.umd.edu<mailto:kevin@lps.umd.edu>
Visiting Research Professor
United States Naval Academy
rudd@usna.edu<mailto:rudd@usna.edu>
[-- Attachment #1.2: Type: text/html, Size: 5826 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2021-07-22 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 12:59 Rudd, Kevin [this message]
2021-07-22 14:13 ` another MetaPost question (this time on ConTeXt->MetaPost color transfer) Rudd, Kevin
2021-07-22 14:44 ` another MetaPost question (this time on ConTeXt->MetaPost Hans Hagen
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=1DE2F1FD-DB29-4E1D-955E-2E0E89DCFB9B@lps.umd.edu \
--to=kevin@lps.umd.edu \
--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).