From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Henri Menke <henrimenke@gmail.com>,
Gerhard Kugler <G.W.Kugler@posteo.de>
Subject: Re: Circled text in metapost
Date: Thu, 29 Mar 2018 12:17:14 +0200 [thread overview]
Message-ID: <a7aaef4b-e0e5-2ffa-429f-457b6b06190b@xs4all.nl> (raw)
In-Reply-To: <9a001e52-9656-9251-ff7c-34be6e379024@gmail.com>
On 3/29/2018 11:52 AM, Henri Menke wrote:
> On 03/29/2018 10:28 PM, Gerhard Kugler wrote:
>> Hi,
>>
>> in documentations I can find various examples of circled text. But
>> copying them I had no success till now.
>>
>> I want to place text in half circles of various radiuses. Is there
>> anywhere a simple example?
>
> The Metafun experts would probably tear this apart...
>
> \startuniqueMPgraphic{half circle}
> path p, q ;
> p := fullcircle scaled OverlayWidth;
> q := (p cutafter (point .5 along p)) shifted (0,-.5BodyFontSize) ;
> fill q -- cycle withcolor lightgray ;
> draw q withpen pencircle scaled 2pt withcolor darkred ;
> setbounds currentpicture to boundingbox p ;
> \stopuniqueMPgraphic
>
> \defineoverlay[half circle][\uniqueMPgraphic{half circle}]
>
> \starttext
>
> \framed[background=half circle,frame=off]{Text width half circle.}
>
> \stoptext
Well, if you really want a tear down ...
\startuniqueMPgraphic{half circle}
path p ; p := halfcircle scaled OverlayWidth shifted center
OverlayBox ;
path q ; q := p shifted (0,-StrutDepth) ;
draw image (
fill q -- cycle withcolor OverlayColor ;
draw q withcolor OverlayLineColor ;
) withpen pencircle scaled 2pt ;
setbounds currentpicture to boundingbox OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[half circle][\uniqueMPgraphic{half circle}]
\starttext
\framed
[background=half circle,
frame=off,
framecolor=red,
backgroundcolor=lightgray]
{Text width half circle.}
\framed
[background=half circle,
frame=off,
framecolor=red,
backgroundcolor=lightgray]
{Text width half circle and more.}
\stoptext
>>
>> My greatest problems seem to be in the embedding code.
>>
>> Gerhard
>>
>>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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:[~2018-03-29 10:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 9:28 Gerhard Kugler
2018-03-29 9:52 ` Henri Menke
2018-03-29 10:17 ` Hans Hagen [this message]
2018-03-29 10:43 ` Gerhard Kugler
2018-03-29 13:11 ` Alan Braslau
2018-03-29 16:05 ` Gerhard Kugler
2018-03-30 11:31 ` Gerhard Kugler
2018-03-30 14:44 ` Alan Braslau
2018-03-30 15:51 ` Gerhard Kugler
2018-03-30 23:22 ` Henri Menke
2018-03-30 23:25 ` Henri Menke
2018-03-31 17:22 ` Gerhard Kugler
2018-04-02 13:16 ` Hans Hagen
2018-04-02 14:51 ` Alan Braslau
2018-04-02 15:52 ` Gerhard Kugler
2018-04-02 16:08 ` Hans Hagen
2018-04-02 16:34 ` Gerhard Kugler
2018-04-02 17:21 ` Gerhard Kugler
2018-04-02 17:30 ` Alan Braslau
2018-04-02 17:48 ` Gerhard Kugler
2018-04-05 5:32 ` Gerhard Kugler
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=a7aaef4b-e0e5-2ffa-429f-457b6b06190b@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=G.W.Kugler@posteo.de \
--cc=henrimenke@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).