DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PrintEnhancedMetafile vs DPlot_Command

 
Post new topic   Reply to topic    DPlot Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
GregoryG



Joined: 08 Dec 2014
Posts: 4

PostPosted: Tue Dec 16, 2014 12:00 pm    Post subject: PrintEnhancedMetafile vs DPlot_Command Reply with quote

I'm writing an interface to graph complex data. I'm using BTEST4 to figure out how to do different tasks. My question is what are the advantages vs disadvantages of using PrintEnhancedMetafile vs DPlot_Command printing.

*The enhancedmetafile call scales the result to the picturebox and that print routine in BTEST4 uses a margin of 0.25 (is this value critical?), but except for the resolution most other variables seem fixed (for example LOGPIXELSX & LOGPIXELSY and HORZRES & VertRES) from printer to printer. Given an 8.5x11 page size and 0.25 margins, it seems the ratios should be 1.31 (they are 1.02 and 1.25 respectively) Why is this and where did you get the numbers. Do I switch values to get landscape?

* If I send size and layout (WindowTile, FilePageSetup, & FilePrintMultiple) commands to dplot (for example to get a plot that is sized to the upper-left quadrant) does that information get passed to PrintEnhancedMetafile or is it wiped out by the code that sizes the metafile to the picturebox on the screen.

* Which gives the better vector file result? Typically users may print to PDF and our illustrators would tidy up the results for publication). I'm trying to get as close as possible to the end product.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Tue Dec 16, 2014 2:50 pm    Post subject: Reply with quote

Quote:
The enhancedmetafile call scales the result to the picturebox and that print routine in BTEST4 uses a margin of 0.25 (is this value critical?)

No. I just picked 1/4" because that's safe on all printers I've tested. Most printer drivers will force specified margins smaller than the minimum to be the minimum. That's fine, but if you don't know what that value is beforehand you'll have scaling problems.

Quote:
(for example LOGPIXELSX & LOGPIXELSY and HORZRES & VertRES)

Those are characteristics of the device, not variables. So yes, they are fixed except for cases where you can choose from multiple resolutions for the printer.

Quote:
it seems the ratios should be 1.31 (they are 1.02 and 1.25 respectively) Why is this and where did you get the numbers. Do I switch values to get landscape?


I looked through the btest4 source and don't see 1.02 or 1.25 anywhere, so I'm not sure what you're talking about. If you're talking about SizeX and SizeY, those are based on the size of the client rectangle in btest4. If you resize the window you'll get different values.

Landscape mode is handled by the Print dialog (possibly under Preferences). You can change the orientation programmatically by manipulating the structure pointed to by the hDevMode member of the PrintDlg structure. Wow that was a mouthful. Honestly I'm not sure how to do this or if it is possible in VB.

Quote:
* If I send size and layout (WindowTile, FilePageSetup, & FilePrintMultiple) commands to dplot (for example to get a plot that is sized to the upper-left quadrant) does that information get passed to PrintEnhancedMetafile or is it wiped out by the code that sizes the metafile to the picturebox on the screen.


Those commands only have meaning within DPlot. The enhanced metafile that gets passed back to your program is independent of the document window size in DPlot, and the printer settings only have meaning when printing from DPlot.

Quote:
Which gives the better vector file result?

They should be pretty much identical if you make the client as large as possible. The demo bases the physical size of the metafile on the size of the target rectangle, so you may have better results (since you can easily control the size) printing from DPlot. But either way should be suitable for publication.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> General discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group