Bugs in Dia's MetaPost Plug-In



Hi all,

recently I wrote to this list about pstricks output support.
Then Rob McDonald advised me to try the MetaPost and 
now I actually used it a lot already.

And for almost all cases it is more than sufficient (except images but
I found that this is not easy solve in general with MetaPost and pixel
images, this is also why I am still convinced that I somewhen will try
to get pstricks to work more correctly.)

Recently I stumbled across two bugs in metapost plugin, both visualized
in the attached PDF file which shows three different dia figures
exported to metapost. The dia files can be found in the attached tar
file.

The easier bug has to do with line width setting. As you can see in
each of the first three figures the arrows are quite ugly when you set a
line width of 0.65 and an arrowhead size of 1.20 or so.
This bug comes from the plug-in using the current line width of the
arrows line for the arrowhead which results in rounded edges
of the arrowheads.

I already wrote a patch for this which I will send to this list. It
simply remembers at the end of each function whether it is going to
draw a line or to fill an area in the function
render_metapost.c::end_draw_op.

With this patch the second bug is not visible at all, but I
strongly beliebe that there is a logical problem  in the export
plug-in which I currently don't understand.

The problem occurs only if there is a thick-lined line (or arrow) as you
can see that it doesn't happen in figure 4.
From dia's view figure 1 and 2 only differ in bringing the first
rectangle into foreground and the second into background or vice
versa. The one in the foreground has bubbles on the edges.
Somehow it depends on the foreground-background order whether the
plugin draws the red-filled rectangle correctly or with bubbles on the
edges which then again come from a wrong line width setting used to
fill the rectangle.

My point is that this should not happen at all as it doesn't for the
special case of figure 3 when both rectangles are in the background.

Can anybody point me to where the problem could be or how
background-foreground ordering comes into play in the export plugin?

Ciao,
Michi

Attachment: metapost-test.pdf
Description: Adobe PDF document

Attachment: metapost-test.tar.gz
Description: GNU Zip compressed data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]