ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Denis B. Roegel" <Denis.Roegel@loria.fr>
Cc: roegel@lorraine.loria.fr
Subject: shading question
Date: Tue, 31 Oct 2000 22:29:46 +0100 (MET)	[thread overview]
Message-ID: <200010312129.WAA23455@bar.loria.fr> (raw)

In the following example, the top parts of the circles are
slightly trimmed, at least when I view them with acroread.
Is this normal?

Thanks,

Denis

\setupcolors[state=start]
\starttext

\definecolor[a][darkyellow]
\definecolor[b][s=.8]
\definecolor[c][darkred]

\startuniqueMPgraphic{CircularShade}
  path p;
  p:= unitsquare xscaled \overlaywidth yscaled \overlayheight ;
  circular_shade(p,0,\MPcolor{a},\MPcolor{b});
\stopuniqueMPgraphic

\startuniqueMPgraphic{LinearShade}
  path p;
  p:= unitsquare xscaled \overlaywidth yscaled \overlayheight ;
  linear_shade(p,0,\MPcolor{a},\MPcolor{b});
\stopuniqueMPgraphic

\defineoverlay[circular shade][\uniqueMPgraphic{CircularShade}]
\defineoverlay[linear shade]  [\uniqueMPgraphic{LinearShade}]

\framed
  [background=circular shade,frame=off]
  {\bf \white Hi there, I'm Circular!}

\framed
  [background=linear shade,frame=off]
  {\bf \white Whow, this is Linear!}

\startuniqueMPgraphic{test}
path p; p:=fullcircle scaled 1cm;
for i:= 0 step 2cm until 8cm:
  circular_shade(p shifted (i,0),0,\MPcolor{a},\MPcolor{b});
endfor;
\stopuniqueMPgraphic

\useMPgraphic{test}

\startuniqueMPgraphic{test1}
circular_shade(fullcircle scaled 1cm,0,\MPcolor{a},\MPcolor{b});
picture s; s:=currentpicture; currentpicture := nullpicture;
for i=0 step 2cm until 8cm:
  addto currentpicture also s shifted (i,0);
endfor;
\stopuniqueMPgraphic

\useMPgraphic{test1}

\startuniqueMPgraphic{test2}
sh:=define_circular_shade(origin,origin,0,8cm,\MPcolor{a},\MPcolor{b});
for i=0 step 2cm until 8cm:
  fill fullcircle scaled 1cm shifted (i,0) withshade sh;
endfor;
\stopuniqueMPgraphic

\useMPgraphic{test2}

\stoptext


             reply	other threads:[~2000-10-31 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-31 21:29 Denis B. Roegel [this message]
2000-10-31 22:02 ` shading, Trying shading example, missing metafun.mem Thomas Porter
2000-10-31 22:45   ` Christopher Tipper
2000-11-01  8:12 ` shading question 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=200010312129.WAA23455@bar.loria.fr \
    --to=denis.roegel@loria.fr \
    --cc=roegel@lorraine.loria.fr \
    /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).