Re: [NTG-context] about \startMPanimation

2019-05-13 Thread Jeong Dal
Dear Hans,

Thank you for the clear explanation.
I thought “” is appeared because of the font problem in my system.

I did something wrong when I run the sample code, which didn’t work.

Yes, it is working well in my code now.
It makes the procedure of creating animation simpler.

Thank you and thanks Wolfgang!

Best regards,

Dalyoung 


> 2019. 5. 13. 오후 10:04, Hans Hagen  작성:
> 
> On 5/13/2019 2:14 PM, Jeong Dal wrote:
>> Dear Wolfgang,
>> I found the following code with a comment “code by Wolfgang” at
>> https://adityam.github.io/context-blog/post/metapost-animation/
>> |\unprotect|
>> |\installnamespace{MPanimationvariables}\unexpanded\def\startMPanimation{\dodoublegroupempty\meta_start_animation}
>>  
>> \def\meta_start_animation#1%{\normalexpanded{\meta_start_animation_indeed{#1}}}
>>  
>> \unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%\setgvalue{\??mpgraphic
>>  
>> animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}\let\stopMPanimation\relax\unexpanded\def\useMPanimation%{\dosingleargument\use_meta_animation}\def\use_meta_animation[#1]#2%{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%\startanimation[#1]\dorecurse{\c_MP_animation_frames}{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel\stopanimation}\protect|
>> In the code, there are many “”.(\MPanimationvariables#1, 
>> {\??mpgraphic animation:#1})
>> I wonder it is correct or not.
>> Would you please check it?
> these ??  etc indicate (protected) namespaces so it's correct
> 
> Hans
> 
> 
> 
> -
>  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
___


Re: [NTG-context] about \startMPanimation

2019-05-13 Thread Hans Hagen

On 5/13/2019 2:14 PM, Jeong Dal wrote:

Dear Wolfgang,

I found the following code with a comment “code by Wolfgang” at
https://adityam.github.io/context-blog/post/metapost-animation/

|\unprotect|

|\installnamespace{MPanimationvariables}\unexpanded\def\startMPanimation{\dodoublegroupempty\meta_start_animation} 
\def\meta_start_animation#1%{\normalexpanded{\meta_start_animation_indeed{#1}}} 
\unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%\setgvalue{\??mpgraphic 
animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}\let\stopMPanimation\relax\unexpanded\def\useMPanimation%{\dosingleargument\use_meta_animation}\def\use_meta_animation[#1]#2%{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%\startanimation[#1]\dorecurse{\c_MP_animation_frames}{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel\stopanimation}\protect|



In the code, there are many “”.(\MPanimationvariables#1, 
{\??mpgraphic animation:#1})

I wonder it is correct or not.

Would you please check it?

these ??  etc indicate (protected) namespaces so it's correct

Hans



-
  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] about \startMPanimation

2019-05-13 Thread Jeong Dal
Dear Wolfgang,

I found the following code with a comment “code by Wolfgang” at 
https://adityam.github.io/context-blog/post/metapost-animation/ 


\unprotect
\installnamespace{MPanimationvariables}

\unexpanded\def\startMPanimation
{\dodoublegroupempty\meta_start_animation}

\def\meta_start_animation#1%
{\normalexpanded{\meta_start_animation_indeed{#1}}}

\unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation
{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%
 \setgvalue{\??mpgraphic 
animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}

\let\stopMPanimation\relax

\unexpanded\def\useMPanimation%
{\dosingleargument\use_meta_animation}

\def\use_meta_animation[#1]#2%
{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%
 \startanimation[#1]
\dorecurse{\c_MP_animation_frames}

{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel
 \stopanimation}

\protect

In the code, there are many “”.(\MPanimationvariables#1, {\??mpgraphic 
animation:#1})
I wonder it is correct or not.

Would you please check it?

Best regards,

Dalyoung


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