From: Alfredo Catalina via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Alfredo Catalina <alfredo.catalina@gmail.com>
Subject: Re: Laundry symbols (now: altered picture)
Date: Sun, 2 Jan 2022 15:12:21 +0100 [thread overview]
Message-ID: <CAJ0n9ecc-DuOCe2xcWgnvxNE_bvAA96pG=7JFwcpghYN-7VF=Q@mail.gmail.com> (raw)
In-Reply-To: <op.wfflxpaltpjj8f@lpr>
[-- Attachment #1.1: Type: text/plain, Size: 943 bytes --]
I'm trying to use ConTeXt with Metafun to produce a map of a videogame I
am working on. In fact I did it 9 years ago but it seems that now it
doesn't work.
I have two 32 pixels wide by 40 pixels high sprites. They are saved in the
skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5 x 8,
the width/height ratio is 4/5.
This should produce a page with a sky sprite and a sand sprite, one
below the other. It worked in the past. Each sprite should be 4 x 0.095 cm
= 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:
\starttext
\setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
\startuseMPgraphic{mapa}
u:=.095cm;
draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted
(0u,-0u);
draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted
(0u,-5u);
\stopuseMPgraphic
\useMPgraphic{mapa}
\stoptext
But instead I got two huge sprites of 2.8 cm x 4.4 cm.
Am I forgetting something?
Thanks
[-- Attachment #1.2: Type: text/html, Size: 1202 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 prev parent reply other threads:[~2022-01-02 14:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 13:18 Procházka Lukáš Ing. - Pontex s. r. o.
2012-06-05 14:26 ` Marco
2012-06-05 14:32 ` Wolfgang Schuster
2012-06-05 14:57 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-06-05 15:01 ` Wolfgang Schuster
2012-06-05 15:13 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-06-05 16:06 ` Wolfgang Schuster
2012-06-06 6:40 ` Procházka Lukáš Ing. - Pontex s. r. o.
2022-01-02 14:12 ` Alfredo Catalina via ntg-context [this message]
2022-01-02 14:36 ` Hans Hagen via ntg-context
2022-01-02 17:10 ` Alfredo Catalina via ntg-context
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='CAJ0n9ecc-DuOCe2xcWgnvxNE_bvAA96pG=7JFwcpghYN-7VF=Q@mail.gmail.com' \
--to=ntg-context@ntg.nl \
--cc=alfredo.catalina@gmail.com \
/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).