[NTG-context] hatching an area without drawing its borders

2021-10-07 Thread Damien Thiriet via ntg-context
Hi,

I read the 2015 thread Hatch an area with Metapost (Metafun)
and started playing with anglestriped. However in my maps
I would like to get my shapes hatched with no borders drawn. 
How can I achieve it? 

path p;
p := fullcircle scaled 50 randomized 5;
draw p anglestriped (1,60,4);


Damien Thiriet 
___
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
___


Re: [NTG-context] Placing SVG icons and text side by side

2021-10-07 Thread Hans Hagen via ntg-context

On 10/7/2021 11:24 AM, noib3 via ntg-context wrote:
How can I place an SVG icon "inline", i.e. side by side to some text? 
Here's my MWE


```
\useURL
   [github]
   [https://github.com/test ]
   []
   [github.com/test ]

\starttext
   \placefigure[none]{}{\externalfigure[github.svg][width=17.5pt]}
   \from[github]
\stoptext

\figuresymbol[github.svg][conversion=mp,height=2ex]


-
  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
___


[NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-07 Thread Rudd, Kevin via ntg-context
Hey---

I'm trying to insert outlined text (derived from MetaFun example code) into a 
document and it seems to work up to the point that the text has depth 
(descenders). There's a previous post that mentions using textcommand for 
titles to ensure that the appropriate baseline is used but I haven't figured 
out why that would work; for my purposes, I'm insert the text inline so that 
solution wouldn't work here. I have included a MWE that demonstrates the 
problem; I've tried putting both the text and the outlined text in a box, then 
adjusting the outlined text by the depth of the text itself but that doesn't 
seem to work. I expect that there's an easy way either in MP or ConTeXt, but I 
haven't found it yet.



% \OutlinedText[glyph][outline]{text}
\def\OutlinedText{\dodoubleempty\doOutlinedText}

\def\doOutlinedText[#1][#2]#3%
{%
% \type{#1}::\type{#2}::\type{#3}
\ifsecondargument
\makeOutlinedText{#1}{#2}{#3}%
\else\iffirstargument
\makeOutlinedText{#1}{black}{#3}%
\else
\makeOutlinedText{white}{black}{#3}%
\fi\fi
}

\def\makeOutlinedText#1#2#3%
{%
\startMPcode
draw outlinetext.b("#3")
 (withcolor "#1")
 (withcolor "#2" withpen pencircle scaled 1/16);
\stopMPcode
\autoinsertnextspace
}

\starttext
start
 \OutlinedText{aaa}
and  \OutlinedText{Bbb}
and  \OutlinedText{ggg}
and  \OutlinedText{Yyy}
finish
\stoptext




(Here is the code with my attemps to shift the baseline; the \dp & \wd approach 
seems to do nothing, and the \lower doesn't compile and I haven't pursued why 
yet.)




% \def\makeOutlinedText#1#2#3%
% {%
% \newbox\tBox
% \newbox\uBox
% \setbox\tBox\hbox{#3}
% \setbox\uBox
% \hbox{%
% \startMPcode
% draw outlinetext.b("#3")
%  (withcolor "#1")
%  (withcolor "#2" withpen pencircle scaled 1/16);
% \stopMPcode
% }%
% % \lower\uBox\dp\tBox
% \ht\uBox=\ht\tBox
% \dp\uBox=\dp\tBox
% \unbox\uBox
% \autoinsertnextspace
}




Any feedback or suggestions would be appreciated.
 ---K

Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)

Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)

443-654-7878
ke...@lps.umd.edu

Visiting Research Professor
United States Naval Academy

r...@usna.edu

___
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
___


Re: [NTG-context] Placing SVG icons and text side by side

2021-10-07 Thread Henning Hraban Ramm via ntg-context


> Am 07.10.2021 um 11:24 schrieb noib3 via ntg-context :
> 
> How can I place an SVG icon "inline", i.e. side by side to some text? Here's 
> my MWE
> 
> ```
> \useURL
>   [github]
>   [https://github.com/test]
>   []
>   [github.com/test]
> 
> \starttext
>   \placefigure[none]{}{\externalfigure[github.svg][width=17.5pt]}
>   \from[github]
> \stoptext
> ```

Just use \externalfigure, since \placefigure creates a float.

If that’s not enough to keep it together, try a \hbox{}

Hraban
___
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
___


[NTG-context] Placing SVG icons and text side by side

2021-10-07 Thread noib3 via ntg-context
How can I place an SVG icon "inline", i.e. side by side to some text?
Here's my MWE

```
\useURL
  [github]
  [https://github.com/test]
  []
  [github.com/test]

\starttext
  \placefigure[none]{}{\externalfigure[github.svg][width=17.5pt]}
  \from[github]
\stoptext
```

I have attached a screenshot of the output and the SVG file.
___
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
___