ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MetaPost circular_shade Command
@ 2012-05-02 22:41 Troy Henderson
  2012-05-03  1:12 ` Troy Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Troy Henderson @ 2012-05-02 22:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: MetaPost circular_shade Command
  2012-05-02 22:41 MetaPost circular_shade Command Troy Henderson
@ 2012-05-03  1:12 ` Troy Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Troy Henderson @ 2012-05-03  1:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

It seems that I should do something like

fill fullcircle scaled 4in withshade
define_circular_shade(origin,origin,0   ,2in,white,red);

Sorry for the premature question.

Troy

[-- Attachment #1.2: Type: text/html, Size: 200 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-03  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02 22:41 MetaPost circular_shade Command Troy Henderson
2012-05-03  1:12 ` Troy Henderson

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).