ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Keith McKay <mckaymeister@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: Missing graphic in MPpage when viewing in Apple MAC Preview or GIMP 2.10 but not Adobe
Date: Sun, 16 Aug 2020 11:55:15 +0100	[thread overview]
Message-ID: <f9243db6-08f8-3604-74a4-868c48402b90@gmail.com> (raw)
In-Reply-To: <CFF7CDC9-0D42-4287-A30D-6505A0F5FB13@elvenkind.com>

Thanks Taco!

I have been playing about with an example from this site

https://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html

which was originally for a square and I obviously didn't get my angles 
right. Thanks for spotting it. I'm beginning to appreciate where the Fun 
in MetaFun comes from.

Best Wishes

Keith

On 15/08/2020 18:35, Taco Hoekwater wrote:
> Hi Keith,
>
> It took me a while before I saw it, but I think you wanted to type in
>
>    z0 = (60,60);
>    z1 = z0 rotated 120;
>    z2 = z0 rotated 240;
>
> instead of
>
>    z0 = (60,60);
>    z1 = z0 rotated 120;
>    z2 = z1 rotated 240;
>
> because the latter puts z2 at z0, resulting in a path that is a straight line. The fact that AR displays anything at all is probably some form of correction like "fill of empty path == single pixel line”.
>
> Best wishes,
> Taco
>
>> On 15 Aug 2020, at 17:39, Keith McKay <mckaymeister@gmail.com> wrote:
>>
>> Dear List
>>
>> I have come across a problem which I don't think is due to ConTeXt but I'm hopping the great and the good of this list may be able to explain what is going on.
>>
>> The code below produces an MPpage with a shaded background and two graphics along with a line of outlined text. When I view in Adobe (or the output from TeXworks) I see everything as it should be. However, I wanted to convert the MPpage to a jpeg file and when I opened the pdf in either Apple MAC Preview or Gimp 2.10 the two graphics are missing, and I have no idea why.
>>
>> Could someone explain a way round this?  Here is the code.
>>
>> Thanks
>>
>> Keith
>>
>> %%%%%%%%%%%%%%%%%%%%%%%%%%
>> system          >
>>
>> system          > ConTeXt  ver: 2020.07.29 18:36 LMTX  fmt: 2020.7.29  int: english/english
>> system          >
>>
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%
>>
>>
>> \setuppapersize [A5, portrait]
>> \usecolors[crayola]
>> \starttext
>> \startMPpage
>> StartPage;
>> width := PaperWidth ; height := PaperHeight ; unit := cm ;
>> definecolor [ name = "MyColor1", r = 0.781, g = 0.5, b = 0.5 ] ;
>> definecolor [ name = "MyColor3", r = 1, g = 1, b = 0.7983 ] ;
>> draw lmt_shade [
>> path = unitsquare xscaled 14.8cm yscaled 21cm,
>> direction = "up",
>> alternative = "linear",
>> colors = { "MyColor1", "MyColor3" },
>> ] ;
>> z0 = (60,60);
>>    z1 = z0 rotated 120;
>>    z2 = z1 rotated 240;
>>    path carre;
>>    carre = z0--z1--z2--cycle;
>>    picture pic;
>>    pic := image(
>>   numeric d; d := 0.0005;
>>   for i=1 step -d until d:
>> 	fill carre scaled i shifted (3.9cm,17cm) withcolor((1 + i)*(\MPcolor{VividTangerine})) ;
>>      	fill carre rotated (45) scaled i shifted (3.9cm,17cm)  withcolor((1 + i)*(\MPcolor{VividTangerine})) ;
>>     	fill carre rotated (90) scaled i shifted (3.9cm,17cm)  withcolor((1 + i)*(\MPcolor{VividTangerine})) ;
>>      	fill carre rotated (135) scaled i shifted (3.9cm,17cm)  withcolor((1 + i)*(\MPcolor{VividTangerine})) ;
>>      	fill carre rotated (180) scaled i shifted (3.9cm,17cm)  withcolor((1 + i)*(\MPcolor{VividTangerine})) ;
>>      	fill carre rotated (225) scaled i shifted (3.9cm,17cm)  withcolor((1 + i)*(\MPcolor{VividTangerine})) ;
>> endfor;);
>> draw pic rotatedaround(center pic, 270);
>> draw pic rotatedaround(center pic, 90) shifted (7cm,-13cm) ;
>> draw lmt_outline [
>> text = "Page 18"
>> kind = "draw",
>> drawcolor = "VividTangerine",
>> ] xsized TextWidth shifted (1cm,7.67cm);
>> StopPage;
>> \stopMPpage
>> \stoptext
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
>>
> Taco Hoekwater
> Elvenkind BV
>
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2020-08-16 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15 15:39 Keith McKay
2020-08-15 17:35 ` Taco Hoekwater
2020-08-16 10:55   ` Keith McKay [this message]

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=f9243db6-08f8-3604-74a4-868c48402b90@gmail.com \
    --to=mckaymeister@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).