Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Current EMF terminal puts some unnecessary commands for
set_font and set_dasytype. Attached patch enable to reduce
the output size by ignoring such commands.
a patch for emf.trm
Thank you very much for reporting the problem and for providing a patch.
As to EMF_set_font, I have applied a slightly different fix guided by your patch.
As to EMF_dashtype, it seems that the dash assignment code has been broken in EMF for a long time. I applied a simple fix for the broken code, but after this fix your patch no longer matches the code. Can you confirm that the dashed lines now work correctly, for example in dashcolor.dem? I do not know if a revised version of your patch is still needed to prevent unnecessary linetyps requests in the output file.
a patch for new emf.trm
snapshot of 1st emf file of dashcolor.dem
snapshot of 2nd emf file of dashcolor.dem
I made a patch emf-reduce-3.diff for new emf.trm. I attached snapshot data
of emf output for dashcolor.dem. Original gnuplot puts the emf file which have:
DeleteObject <- Pen
DeleteObject <-- Font
The patch reduce such codes. Indeed, the emf file sizes of dashcolor.dem are:
1st page: 37948 byte (2158 EMR records) -> 35932 byte (2051 EMR records)
2nd page: 99616 Byte (5928 EMR records) -> 82552 byte (4951 EMR records)
Thanks. The patch looks good. But there is one part I do not understand. Can you explain what is the purpose of these instructions?
These commands appear in more than one place.
Since gnuplot always defines and uses its own PEN and BRUSH objects, I don't understand the reason for temporarily selecting the STOCK_OBJECT ones?
The followin page says:
"Do not delete a drawing object (pen or brush) while it is still selected into a DC."
So, we can delete pen and brush after taking another pen or brush.