Hi, A new feature ... not sure if i need to add the defineoverlays ... \unprotect \def\overlayradius{\framedparameter\c!frameradius} \protect \dontcomplain \starttext \testfeatureonce{25}{\dontleavehmode \ruledhbox\bgroup \red \frule width 2cm height 2cm depth 1cm radius 2mm type fill line 2pt \relax \hskip-2cm \green \frule width 2cm height 2cm depth 1cm radius 2mm line 2pt \relax \egroup \space} \blank \startuseMPgraphic{demoshape:back} fill unitcircle xysized (RuleWidth,RuleHeight+RuleDepth) withcolor RuleColor ; \stopuseMPgraphic \startuseMPgraphic{demoshape:fore} draw unitcircle xysized (RuleWidth,RuleHeight+RuleDepth) withcolor RuleColor withpen pencircle scaled RuleThickness ; \stopuseMPgraphic \testfeatureonce{100}{\dontleavehmode \ruledhbox\bgroup \red \frule width 1cm height 3mm depth 1mm type mp data {\includeMPgraphic{demoshape:back}} line 2pt \relax \hskip-1cm \green \frule width 1cm height 3mm depth 1mm type mp data {\includeMPgraphic{demoshape:fore}} line 2pt \relax \egroup \space} \blank \defineoverlay[normalframe] [\frule width \overlaywidth height\overlayheight line \overlaylinewidth \relax] \defineoverlay[ovalframe] [\frule width \overlaywidth height \overlayheight line \overlaylinewidth radius \overlayradius \relax] \dontleavehmode \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed {test}}} \framed {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=normalframe,frame=off]{test}}} \framed[background=normalframe,frame=off]{test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[corner=round] {test}}} \framed[corner=round] {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=off] {test}}} \framed[background=ovalframe,frame=off] {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=on] {test}}} \framed[background=ovalframe,frame=on] {test} \stoptext -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Even though it says "\dontcomplain"... ;-)
I am not sure that I understand the demonstration of the second part,
with the defineoverlays...
Alan
On Mon, 15 Feb 2016 11:34:57 +0100
Hans Hagen
Hi,
A new feature ... not sure if i need to add the defineoverlays ...
\unprotect \def\overlayradius{\framedparameter\c!frameradius} \protect
\dontcomplain
\starttext
\testfeatureonce{25}{\dontleavehmode \ruledhbox\bgroup \red \frule width 2cm height 2cm depth 1cm radius 2mm type fill line 2pt \relax \hskip-2cm \green \frule width 2cm height 2cm depth 1cm radius 2mm line 2pt \relax \egroup \space}
\blank
\startuseMPgraphic{demoshape:back} fill unitcircle xysized (RuleWidth,RuleHeight+RuleDepth) withcolor RuleColor ; \stopuseMPgraphic
\startuseMPgraphic{demoshape:fore} draw unitcircle xysized (RuleWidth,RuleHeight+RuleDepth) withcolor RuleColor withpen pencircle scaled RuleThickness ; \stopuseMPgraphic
\testfeatureonce{100}{\dontleavehmode \ruledhbox\bgroup \red \frule width 1cm height 3mm depth 1mm type mp data {\includeMPgraphic{demoshape:back}} line 2pt \relax \hskip-1cm \green \frule width 1cm height 3mm depth 1mm type mp data {\includeMPgraphic{demoshape:fore}} line 2pt \relax \egroup \space}
\blank
\defineoverlay[normalframe] [\frule width \overlaywidth height\overlayheight line \overlaylinewidth \relax]
\defineoverlay[ovalframe] [\frule width \overlaywidth height \overlayheight line \overlaylinewidth radius \overlayradius \relax]
\dontleavehmode \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed {test}}} \framed {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=normalframe,frame=off]{test}}}
\framed[background=normalframe,frame=off]{test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[corner=round] {test}}} \framed[corner=round] {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=off] {test}}}
\framed[background=ovalframe,frame=off] {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=on] {test}}}
\framed[background=ovalframe,frame=on] {test}
\stoptext
-- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS UMR 3680 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.braslau@cea.fr
On 2/15/2016 6:17 PM, Alan BRASLAU wrote:
Even though it says "\dontcomplain"... ;-)
I am not sure that I understand the demonstration of the second part, with the defineoverlays...
basically we use rules that get replaced by graphics (a normal framed has 4 overlapping rules, the example has one continuous shape)
Alan
On Mon, 15 Feb 2016 11:34:57 +0100 Hans Hagen
wrote: Hi,
A new feature ... not sure if i need to add the defineoverlays ...
\unprotect \def\overlayradius{\framedparameter\c!frameradius} \protect
\dontcomplain
\starttext
\testfeatureonce{25}{\dontleavehmode \ruledhbox\bgroup \red \frule width 2cm height 2cm depth 1cm radius 2mm type fill line 2pt \relax \hskip-2cm \green \frule width 2cm height 2cm depth 1cm radius 2mm line 2pt \relax \egroup \space}
\blank
\startuseMPgraphic{demoshape:back} fill unitcircle xysized (RuleWidth,RuleHeight+RuleDepth) withcolor RuleColor ; \stopuseMPgraphic
\startuseMPgraphic{demoshape:fore} draw unitcircle xysized (RuleWidth,RuleHeight+RuleDepth) withcolor RuleColor withpen pencircle scaled RuleThickness ; \stopuseMPgraphic
\testfeatureonce{100}{\dontleavehmode \ruledhbox\bgroup \red \frule width 1cm height 3mm depth 1mm type mp data {\includeMPgraphic{demoshape:back}} line 2pt \relax \hskip-1cm \green \frule width 1cm height 3mm depth 1mm type mp data {\includeMPgraphic{demoshape:fore}} line 2pt \relax \egroup \space}
\blank
\defineoverlay[normalframe] [\frule width \overlaywidth height\overlayheight line \overlaylinewidth \relax]
\defineoverlay[ovalframe] [\frule width \overlaywidth height \overlayheight line \overlaylinewidth radius \overlayradius \relax]
\dontleavehmode \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed {test}}} \framed {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=normalframe,frame=off]{test}}}
\framed[background=normalframe,frame=off]{test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[corner=round] {test}}} \framed[corner=round] {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=off] {test}}}
\framed[background=ovalframe,frame=off] {test} \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=on] {test}}}
\framed[background=ovalframe,frame=on] {test}
\stoptext
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, 15 Feb 2016 18:36:15 +0100
Hans Hagen
basically we use rules that get replaced by graphics (a normal framed has 4 overlapping rules, the example has one continuous shape)
Nice, but I still don't understand the demonstration. Alan -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS UMR 3680 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.braslau@cea.fr
On 2/15/2016 6:39 PM, Alan BRASLAU wrote:
On Mon, 15 Feb 2016 18:36:15 +0100 Hans Hagen
wrote: basically we use rules that get replaced by graphics (a normal framed has 4 overlapping rules, the example has one continuous shape)
Nice, but I still don't understand the demonstration.
it's more the kind of stuff wolfgang or aditya might use (or run into) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Alan BRASLAU
-
Hans Hagen