ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metafun: is it possible to redefine dotlabel to draw a square ?
@ 2020-12-10 17:30 Otared Kavian
  2020-12-10 17:44 ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Otared Kavian @ 2020-12-10 17:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

In Metafun when representing a point I woul dlike to have some dots represented by a square (or even by another scalable symbol): for instance in the following I would like the dot at the point B to be a square:

\starttext
\startMPcode
draw (2cm,3cm) -- (3cm,5cm) ;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
	withpen pencircle scaled 12pt 
	withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
	withpen pencircle scaled 12pt 
	withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext

I wonder whether it is possible to define something like « drawsquaredot » or « squaredotlabel » in order to do this.
If I use for B the command
	withpen pensquare scaled 12pt
then the dot is a square, but the label B is drawn in a strange way.

Thanks for any help: Otared
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-10 21:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 17:30 Metafun: is it possible to redefine dotlabel to draw a square ? Otared Kavian
2020-12-10 17:44 ` Aditya Mahajan
2020-12-10 17:57   ` Otared Kavian
2020-12-10 18:04     ` Aditya Mahajan
2020-12-10 18:50       ` Hans Hagen
2020-12-10 18:07   ` Hans Hagen
2020-12-10 19:37     ` Aditya Mahajan
2020-12-10 21:36       ` Hans Hagen

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).