Re: [NTG-context] image with rounded corners

2022-08-12 Thread Henning Hraban Ramm via ntg-context

Am 12.08.22 um 13:10 schrieb Wolfgang Schuster via ntg-context:

Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57:

Hi, can ConTeXt make rounded image corners?



\setupexternalfigures[location=default]

\starttext

\startMPclip{rounded corner}
clip currentpicture to (roundedsquare(OverlayWidth,OverlayHeight,EmWidth));
\stopMPclip

\clip[nx=1,ny=1,mp=rounded corner]{\externalfigure[mill]}

\stoptext


Thank you!

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] image with rounded corners

2022-08-12 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57:

Hi, can ConTeXt make rounded image corners?
Both of my approaches don’t work:


\externalfigure[mill][
  width=3cm,
  frame=on,
  corner=round,radius=1cm,
  backgroundcorner=round,backgroundradius=1cm,
]

\defineoverlay[Mill][{%
  \externalfigure[mill][width=\overlaywidth]
}]
\framed[background=Mill,width=3cm,height=4cm,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
offset=overlay]{}


\setupexternalfigures[location=default]

\starttext

\startMPclip{rounded corner}
clip currentpicture to (roundedsquare(OverlayWidth,OverlayHeight,EmWidth));
\stopMPclip

\clip[nx=1,ny=1,mp=rounded corner]{\externalfigure[mill]}

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] image with rounded corners

2022-08-12 Thread Henning Hraban Ramm via ntg-context

Hi, can ConTeXt make rounded image corners?
Both of my approaches don’t work:


\externalfigure[mill][
  width=3cm,
  frame=on,
  corner=round,radius=1cm,
  backgroundcorner=round,backgroundradius=1cm,
]

\defineoverlay[Mill][{%
  \externalfigure[mill][width=\overlaywidth]
}]
\framed[background=Mill,width=3cm,height=4cm,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
offset=overlay]{}

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___