ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Troy Henderson <thenders@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: MetaPost circular_shade Command
Date: Wed, 2 May 2012 17:41:35 -0500	[thread overview]
Message-ID: <CAFP+xFLVMFVrGrx0KTHUDwP1tk1Ad5kcy2=ux5-zHJ0WBfRT+A@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1098 bytes --]

The command

circular_shade(fullcircle scaled 4in,0,white,red);

in MetaPost does not act as I think it should.  It performs a gradient fill
starting at the center of the circle by filling this center in white (which
is expected), and changing the color as the radius/diameter changes (which
is also expected), but the final radius appears to have a RGB color of
about (1,0.29,0.29) which is not red (thus is unexpected) since red =
(1,0,0).  However, the command

circular_shade(unitsquare shifted (-0.5,-0.5) scaled 4in,0,white,red);

creates a gradient filled square whose center is white and whose northeast,
northwest, southwest, and southeast corner are red (as somewhat expected)
and thus whose east, north, west, and south tip are about (1,0.29,0.29)
like the circle.

I would appreciate an explanation of why this acts like it does, and (more
importantly), let me know how I can get a gradient filled circle whose
center gets filled with a RGB color c and outer radius color d.  Clearly,

circular_shade(fullcircle scaled 4in,0,c,d);

does not do this.

Thanks in advance,

Troy Henderson

[-- Attachment #1.2: Type: text/html, Size: 1169 bytes --]

[-- Attachment #2: 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:[~2012-05-02 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 22:41 Troy Henderson [this message]
2012-05-03  1:12 ` Troy Henderson

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='CAFP+xFLVMFVrGrx0KTHUDwP1tk1Ad5kcy2=ux5-zHJ0WBfRT+A@mail.gmail.com' \
    --to=thenders@gmail.com \
    --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).