[NTG-context] MetaObj with labels in built-in objects (MetaObj Standard Library)

2011-09-20 Thread Stefan Müller

Hi list,

some time ago I posted on this list about problems with MetaObj in 
ConTeXt when using labels.  There's a wiki article about this now [1]. 
Just recently I was forced to notice that this solution does not work 
when the label to be drawn is part of the object definition.  So the 
example from [1] works fine with the added boolean flag, but the 
following example (which means basically all built-in MetaObj objects 
with text) does not.  It compiles well but there is no text.


--8start8--
\startMPinclusions[+]
input metaobj;
boolean firstrun; firstrun := true;
\stopMPinclusions

\startMPpage
if firstrun:
newBox.a(\sometxt{Text});
a.c = origin;
fi;
drawObj(a);
firstrun := false;
\stopMPpage
--8stop8--

I'm out of ideas how to fix this.  I tried putting the text into a 
separate pictrue variable and use this in newBox.  In addition, I 
thought it should be possible to modify metaobj.mp to check for a 
boolean variable (e.g. firstrun) and let the macros there react to its 
value accordingly , but I always got either no text or errors.


I can draw the picture I wanted to get in the first place with plain 
MetaFun, but I thought MetaObj would be even more fun.  Now I'm very 
curious if someone on this list can come up with something.  I think it 
would be great if MetaObj could be fully used within ConTeXt.


Thanks in advance for taking the time to think about this and any hints!
Kind regards,
Stefan.


[1] http://wiki.contextgarden.net/MetaObj_and_Labels
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metaobj

2010-11-15 Thread Martin 'golodhrim' Scholz
Hi everybody,
   again a question by me, I found out that metaobj is included in
   ConTeXt minimals and now try to figure out how to input this in a
   ConTeXt document so I can use it in a 
 \startuseMPgraphic{name}
   METAOBJ code
 \stopuseMPgraphic
   environment.
   Thanks everybody for your help...
-- 
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516 Ederbringhausen
Germany
Phone: +49 6454 799623
mobile: +49 176 63301749
Fax: +49 6454 7990138
e-Mail: scholz@googlemail.com

The difference between genius and stupidity is that genius has its limits.

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metaobj

2010-11-15 Thread Martin 'golodhrim' Scholz
In article slrnie28qp.cnd.scholz@lorien.mittelerde.lan, Martin 
'golodhrim' Scholz wrote:
 Hi everybody,
again a question by me, I found out that metaobj is included in
ConTeXt minimals and now try to figure out how to input this in a
ConTeXt document so I can use it in a 
  \startuseMPgraphic{name}
METAOBJ code
  \stopuseMPgraphic
environment.
Thanks everybody for your help...

first of all here is a minimal example:

\starttext
 
\startMPinclusions
input metaobj;
\stopMPinclusions
 
\startuseMPgraphic{commutativediagram}
  newCircle.m(btex M etex) framed(false);
  newCircle.n(btex M' etex) framed(false);
  newCircle.o(btex M'' etex) framed(false);
  newMatrix.mat(2,2)(m,n,nb,o) hsep(1cm), vsep(2cm);
  mcline.mat(1,1,1,2) nodesepA(3pt);
  mcline.mat(1,2,2,2) nodesepA(3pt);
  mcline.mat(1,1,2,2) nodesepA(3pt);
  mat.c=origin;
  drawObj(mat);
\stopuseMPgraphic
\useMPgraphic{commutativediagram}
\stoptext

what I don't understand is that this examples builds and runs fine under
mkii but not under mkiv, what did I do wrong, where is my error in this
code so it will not build?

Greetings
-- 
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516 Ederbringhausen
Germany
Phone: +49 6454 799623
mobile: +49 176 63301749
Fax: +49 6454 7990138
e-Mail: scholz@googlemail.com

Boling's postulate:
If you're feeling good, don't worry.  You'll get over it.

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metaobj problem

2010-05-18 Thread Taco Hoekwater

Shiv Shankar Dayal wrote:

Hi,

I was trying to run following code from its manual i.e. metaobj's manual.

newCircle.a(btex A etex);
newCircle.b(btex B etex);
newCircle.c(btex C etex);
newCircle.d(btex D etex);
newCircle.e(btex E etex);
verbatimtex \small etex;


This verbatimtex seems to be confusing the btex ... etex replacement
lua code (odd btex's and etex's remain in the MPlib input). Hans has
to look into this, I don't quite understand what goes wrong.

Best wishes,
Taco

PS Next time, please post a complete test file, not just a section.



___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metaobj problem

2010-05-17 Thread Shiv Shankar Dayal
Hi,

I was trying to run following code from its manual i.e. metaobj's manual.

newCircle.a(btex A etex);
newCircle.b(btex B etex);
newCircle.c(btex C etex);
newCircle.d(btex D etex);
newCircle.e(btex E etex);
verbatimtex \small etex;
newMatrix.mat(3,3)(nb,a,nb,b,e,c,nb,d,nb) hsep(2cm), vsep(2cm);
mcline.mat(2,2,2,3) name(a);
ObjLabel.mat(btex a etex) labpathname(a),labpos(0.75), labdir(top);
mcline.mat(2,2,2,1) name(b);
ObjLabel.mat(btex b etex) labpathname(b),labdir(bot);
mcline.mat(3,2,2,1) name(c);
ObjLabel.mat(btex c etex) labpathname(c),labdir(llft);
mcarc.mat(3,2,1,2)
arcangleA(-40),arcangleB(-40), border(3pt), name(d);
ObjLabel.mat(btex d etex) labpathname(d),labdir(lrt), labpos(0.3);
ObjLabel.mat(btex e etex) labpathname(d),labdir(llft), labpos(0.7);
mcarc.mat(1,2,2,1) arcangleA(12),arcangleB(12), name(f);
ObjLabel.mat(btex f etex) labpathname(f),labdir(lrt);
mcarc.mat(2,1,1,2) arcangleA(12),arcangleB(12), name(g);
ObjLabel.mat(btex g etex) labpathname(g),labdir(ulft);
mat.c=origin;
drawObj(mat);

The problem is that the computer kind of stops processing. I mean it
is taking too long.
My pool_size is 100MB. I have increased it.

-- 
Best regards,
Shiv Shankar Dayal
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metaobj and luatex 0.42.0

2009-09-24 Thread Matt Claus

Hi Matthijs,

Thank you for your two follow ups to my original question. Both of the 
techniques you suggested also work for me, so I'm able to continue now.


Cheers,
Matt


___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metaobj and luatex 0.42.0

2009-09-23 Thread Matthijs Kooijman
Hi Matthew,

 However, I've found that cleaning up your objects when you're done pretty much
 solves all my problems. For example, just add a clearObj line to your code
 makes it work for me:
I've found that using save to declare the values as local also works. For
example:

 \startMPinclusions 
 input metaobj; 
 \stopMPinclusions
 
 \starttext 
 \startMPpage 
save a;
 newBox.a(\sometxt{hello world}); 
 a.c = origin;
 drawObj(a);
 \stopMPpage 
 \stoptext

Perhaps this is even slightly more elegant.

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metaobj and luatex 0.42.0

2009-09-16 Thread Matthijs Kooijman
Hi Matthew,

I've been playing with metaobj and luatex 0.43 for a bit, and faced similar
problems. Lots of stuff about redundant equations and other stuff I didn't
understand.

However, I've found that cleaning up your objects when you're done pretty much
solves all my problems. For example, just add a clearObj line to your code
makes it work for me:

\startMPinclusions 
input metaobj; 
\stopMPinclusions

\starttext 
\startMPpage 
newBox.a(\sometxt{hello world}); 
a.c = origin;
drawObj(a);
clearObj a;

\stopMPpage 
\stoptext

I'm not completely sure why this is clearObj a (and not clearObj(a), which
seems to be more logical considering drawObj also takes parentheses), but
that's probably something of the wonderful world of macro programming.

Hope this helps,

Matthijs


signature.asc
Description: Digital signature
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metaobj and luatex 0.42.0

2009-08-06 Thread Matthew Claus
Hello everyone,

First, thanks for making this list such a great resource.

I've installed a fresh minimals on windows using first-setup.bat. This
seems to have installed luatex 0.40.6 which led to errors making the
formats (message indicated at least 0.42 was needed). I think the
presence of the older luatex version for windows was recently noted on
another thread.

So, I installed 0.42.0 and remade the formats.

This minimal example works with texexec example.tex but fails with context
example.tex.

\startMPinclusions 
input metaobj; 
\stopMPinclusions

\starttext 
\startMPpage 
newBox.a(\sometxt{hello world}); 
a.c = origin;
drawObj(a);

\stopMPpage 
\stoptext

Is this expected to work (I realize the 0.42.0 is very new)

Am I doing something wrong?

Thanks very much for any assistance, 
Matt


C:\wk\texcontext example.tex MTXrun | run 1: luatex
--fmt=C:/wk/cm/context/tex/texmf-cache/luatex-cache/cont
ext/e8705fc03b81c76af2e2d42634ded96b/formats/cont-en
--lua=C:/wk/cm/context/te
x/texmf-cache/luatex-cache/context/e8705fc03b81c76af2e2d42634ded96b/formats/cont
-en.lui --backend=pdf ./example.tex This is LuaTeX, Version
beta-0.42.0-2009071712 \write18 enabled.  (example.tex

ConTeXt ver: 2009.07.23 20:11 MKIV fmt: 2009.8.6 int: english/english

system : cont-new loaded
(C:/wk/cm/context/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(C:/wk/cm/context/tex/texmf-context/tex/context/base/cont-new.mkiv))
system : cont-fil loaded
(C:/wk/cm/context/tex/texmf-context/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded
(C:/wk/cm/context/tex/texmf-context/tex/context/user/cont-sys.rme
(C:/wk/cm/cont ext/tex/texmf-context/tex/context/base/type-tmf.tex
(C:/wk/cm/context/tex/texmf- context/tex/context/base/type-tmf.mkiv))
(C:/wk/cm/context/tex/texmf-context/tex /context/base/type-siz.tex
(C:/wk/cm/context/tex/texmf-context/tex/context/base/ type-siz.mkiv))
(C:/wk/cm/context/tex/texmf-context/tex/context/base/type-otf.te x
(C:/wk/cm/context/tex/texmf-context/tex/context/base/type-otf.mkiv)))
system : example.top loaded (example.top) fonts : preloading latin
modern fonts bodyfont : 12pt rm is loaded language : language en is
active systems : begin file example at line 5 mplib : initializing
instance 'metafun' using format 'metafun' mplib : loading 'metafun.mp'
from 'C:/wk/cm/context/tex/texmf-cache/lu
atex-cache/context/e8705fc03b81c76af2e2d42634ded96b/formats/cont-en-metafun.mem'

mplib | mp terminal:
(C:/wk/cm/context/tex/texmf/metapost/metaobj/metaobj.mp) !
Inconsistent equation (off by 1).  to be read again ;
assignObj-(SUFFIX0)=incr(nObj_);
iname_[(SUFFIX0)]=str(SUFFIX0);addclass_((S...

newBox-...2))((TEXT4));assignObj((SUFFIX2),Box)
;StandardInterface;Standar...  to be read again ; * ...j.mp;
newBox.a(textext.drt(hello world)); a.c = origin; drawObj(a); ; !
Redundant equation.  to be read again ;
assignObj-...bj_);iname_[(SUFFIX0)]=str(SUFFIX0);
addclass_((SUFFIX0),(EXPR1...

...



___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metaobj and luatex 0.42.0

2009-08-06 Thread Hans Hagen

Taco Hoekwater wrote:

Matthew Claus wrote:
This minimal example works with texexec example.tex but fails with 
context

example.tex.

\startMPinclusions input metaobj; \stopMPinclusions

\starttext \startMPpage newBox.a(\sometxt{hello world}); a.c = origin;
drawObj(a);

\stopMPpage \stoptext

Is this expected to work (I realize the 0.42.0 is very new)


I am not surprised it fails. Most metapost code in mkiv is run at
least twice for some reason, and so equations tend to fail. You could
try with

  \startMPpage
  newBox.a(\sometxt{hello world});
  a.c := origin;
  drawObj(a);
  \stopMPpage


but even then it depends on what newBox does internally.


in general one needs to keep in mind that we're in one run, so even in 
the case of 'single runs' things can bleed from one to the other 
graphic; one should set up graphics as independent as possible


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metaobj and luatex 0.42.0

2009-08-06 Thread Matthew Claus

Thank you Taco and Hans for the very quick explanation.

Regards,
Matt

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metaobj and colors

2006-03-06 Thread Renaud AUBIN

Hi all !

According to previous posts entitled [NTG-context] metafun boxes, I
use metaobj but I have a small problem.
After reading the metaobj manual, I would change the color of several
ellipse shapes... But using b.option_framecolor_:=blue; or
newEllipse.a(btex a framed text etex) framecolor(red); do not work...

Any idea ?

\startuseMPgraphic{grapheliaison1mec}
input metaobj; % here because if I put this in MPinclusions,
   % it corrupts other graphics (i.e. strange
results with drawarrow anglebetween)

newEllipse.a(btex $S_1$ etex) fit(false);
newEllipse.b(btex $S_2$ etex) fit(false);
newEllipse.c(btex $S_3$ etex) fit(false);
newEllipse.d(btex $S_4$ etex) fit(false);
newEllipse.e(btex $S_5$ etex) fit(false);
newEllipse.f(btex $S_6$ etex) fit(false);
newEllipse.g(btex $S_0$ etex) fit(false);

b.option_framecolor_:=blue;

newMatrix.mat(3,5)(nb,b,d,nb,nb, a,nb,nb,f,g, nb,c,e,nb,nb)
hsep(1.5cm), vsep(1.5cm);

mcarc.mat(2,1,1,2) name(ab);
ObjLabel.mat(btex $L_{12}$ etex) labpathname(ab),labdir(ulft);
mcarc.mat(2,1,3,2) name(ac);
ObjLabel.mat(btex $L_{13}$ etex) labpathname(ac),labdir(llft);
mcarc.mat(1,2,1,3) name(bd);
ObjLabel.mat(btex $L_{24}$ etex) labpathname(bd),labdir(top);
mcarc.mat(3,2,3,3) name(ce);
ObjLabel.mat(btex $L_{35}$ etex) labpathname(ce),labdir(bot);
mcarc.mat(1,3,2,4) name(df);
ObjLabel.mat(btex $L_{46}$ etex) labpathname(df),labdir(urt);
mcarc.mat(3,3,2,4) name(ef);
ObjLabel.mat(btex $L_{56}$ etex) labpathname(ef),labdir(lrt);
mcarc.mat(2,4,2,5) name(fg);
ObjLabel.mat(btex $L_{60}$ etex) labpathname(fg),labdir(top);

mat.c = origin;
drawObj(mat);
\stopuseMPgraphic

Cheers,

Renaud

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and colors

2006-03-06 Thread Renaud AUBIN

Ok, very sorry for this beginner's question !

It works with :
newEllipse.a(btex $S_1$ etex) fit(false),framecolor(red);
At first, I have tried without the , !!!

Renaud

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and transparent colors with \MPcolor

2004-08-02 Thread Eckhart Guthöhrlein
On Fri, Jul 30, 2004 at 12:08:33PM +0200, Vit Zyka wrote:
 Here is my current file, which just gives a white background in the box.
 
 \setupcolors[state=start]
 \setupbackgrounds[page][background=color,backgroundcolor=red]
 \definecolor[Transparent][r=0,g=1,b=1,t=0,a=normal]
 \startreusableMPgraphic{test}
  input metaobj;
  color t; t:=\MPcolor{Transparent};
  setObjectDefaultOption(Box)(fillcolor)(t);
  newBox.test(btex Transparent? etex) filled(true);
  Obj(test).c=origin;
  drawObj(test);
 \stopreusableMPgraphic
 \starttext
  \reuseMPgraphic{test}
 \stoptext
 
 Sorry I still do not see your white box. Perhaps something is corrupted 
 in my context installation.
 
 I had a quick look into mpobj source and I tried to remove default white 
 background, but I was not successful.

Me either.

 Vit Zyka
 
 P.S. I played with raw MP code:
 
 input metaobj;
 beginfig(1)
   fill fullcircle scaled 1cm withcolor red;
   color t; t:=(1,1,0);
   %setObjectDefaultOption(Box)(fillcolor)(t);
   newBox.test();
   Obj(test).c=origin;
   drawObj(test);
 endfig;
 
 end.

Your color is not transparent, so it will work as expected: no white
box.

-- 
Eckhart
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and transparent colors with \MPcolor

2004-07-27 Thread Eckhart Guthöhrlein
On Sat, Jul 24, 2004 at 11:28:36AM +0200, Vit Zyka wrote:
 I, of course, checked if the package metaobj is installed and loaded. 
 Perhaps my is too old (v0.83)?

That's the current version.

-- 
Eckhart
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and transparent colors with \MPcolor

2004-07-27 Thread Hans Hagen
Eckhart Guthöhrlein wrote:
The problem seems to be that all objects in metaobj are filled using a
non-transparent white by default. Subsequent filling with a completely
transparent color then of course gives just white.
 

ah, maybe denis uses the metapost 'backgroundcolor' which is white; i'd say: never use that ! just don't fill! 

btw, i recently introduced nocolor, being (-1,-1,-1) 

Hans   

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and transparent colors with \MPcolor

2004-07-24 Thread Hans Hagen Outside
Denis Roegel wrote:
On Fri, Jul 23, 2004 at 09:53:22AM +0200, Eckhart Guthöhrlein wrote:
 

Hi,
I try to achieve transparently filled objects using the metaobj package.
However, transparency is ignored completely in the output, I just get a
normal white. Here is my test file:
   

Hi,
I have never considered transparency in metaobj, and each part of an object
is merely drawn, in some order depending on that object, and with some (opaque) color.
It seems some serious surgery would be needed to seamlessly add transparency
handling. It can certainly be done, be it only by working on an object
structure, but I don't see a quick fix.
 

no, transparency is handled by the colors themselves so if metaobj can carry along a color it's should work ok 

Hans 

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and transparent colors with \MPcolor

2004-07-24 Thread Vit Zyka
Sorry, I can not reproduce your example. I get only red page with black 
page number in header. No white box. And I do not known metaobj macro.
The graphics won't compile without metaobj, which is a very nice macro
package for metapost, available at
CTAN/graphics/metapost/contrib/macros/metaobj/
I, of course, checked if the package metaobj is installed and loaded. 
Perhaps my is too old (v0.83)?

I had a look to metaobj manual and it is good to know about it.
Thank you.
Vit Zyka
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] metaobj and transparent colors with \MPcolor

2004-07-23 Thread Eckhart Guthöhrlein
Hi,

I try to achieve transparently filled objects using the metaobj package.
However, transparency is ignored completely in the output, I just get a
normal white. Here is my test file:

\setupcolors[state=start]
\setupbackgrounds[page][background=color,backgroundcolor=red]

\startMPenvironment[global]
  \definecolor[Durchsichtig][r=1.0,g=1.0,b=1.0,t=0.0,a=normal]
\stopMPenvironment

\startreusableMPgraphic{test}
input metaobj;
setObjectDefaultOption(Box)(fillcolor)(\MPcolor{Durchsichtig});
newBox.test(btex Transparent? etex) filled(true);
Obj(test).c=origin;
drawObj(test);
\stopreusableMPgraphic

\starttext
\reuseMPgraphic{test}
\stoptext


If I use the fillcolor as an argument to the object

newBox.test(btex Transparent? etex) filled(true)
fillcolor(\MPcolor{Durchsichtig});

I get error messages from the mpost run. So it seems that metaobj and
\MPcolor don't like each other.
Any ideas how to circumvent this problem?

Regards,
Eckhart
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and transparent colors with \MPcolor

2004-07-23 Thread Vit Zyka
Sorry, I can not reproduce your example. I get only red page with black 
page number in header. No white box. And I do not known metaobj macro.

But I have a question. It is really needed to surround \definecolor by 
\startMPenvironment? Since \definecolor has to result to \pdfobj and 
\pdfliteral (pdftex primitives) and propagation to mpost (which is EPS 
not PDF generator) has no sence. Only reference to color is needed and 
it is done via \MPcolor. Am I right?

Vit Zyka
I try to achieve transparently filled objects using the metaobj package.
However, transparency is ignored completely in the output, I just get a
normal white. Here is my test file:
\setupcolors[state=start]
\setupbackgrounds[page][background=color,backgroundcolor=red]
\startMPenvironment[global]
  \definecolor[Durchsichtig][r=1.0,g=1.0,b=1.0,t=0.0,a=normal]
\stopMPenvironment
\startreusableMPgraphic{test}
input metaobj;
setObjectDefaultOption(Box)(fillcolor)(\MPcolor{Durchsichtig});
newBox.test(btex Transparent? etex) filled(true);
Obj(test).c=origin;
drawObj(test);
\stopreusableMPgraphic
\starttext
\reuseMPgraphic{test}
\stoptext
If I use the fillcolor as an argument to the object
newBox.test(btex Transparent? etex) filled(true)
fillcolor(\MPcolor{Durchsichtig});
I get error messages from the mpost run. So it seems that metaobj and
\MPcolor don't like each other.
Any ideas how to circumvent this problem?
Regards,
Eckhart
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metaobj and transparent colors with \MPcolor

2004-07-23 Thread Denis Roegel
On Fri, Jul 23, 2004 at 09:53:22AM +0200, Eckhart Guthöhrlein wrote:
 Hi,
 
 I try to achieve transparently filled objects using the metaobj package.
 However, transparency is ignored completely in the output, I just get a
 normal white. Here is my test file:


Hi,

I have never considered transparency in metaobj, and each part of an object
is merely drawn, in some order depending on that object, and with some (opaque) color.
It seems some serious surgery would be needed to seamlessly add transparency
handling. It can certainly be done, be it only by working on an object
structure, but I don't see a quick fix.

Denis Roegel
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context