void Board::saveEPS( const char * filename, PageSize size, double margin, const std::string & title ) const { if ( title == std::string() ) saveEPS( filename, pageSizes[size][0], pageSizes[size][1], margin, filename ); else saveEPS( filename, pageSizes[size][0], pageSizes[size][1], margin, title ); }
void CObjectView::OnSaveImagePS() { CFileDialog cd(FALSE, "eps", NULL, OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, "Encapsulated Postscript (*.eps,*.ps)|*.eps; *.ps||", this); if (cd.DoModal() == IDOK){ saveEPS(cd.GetPathName()); } }
void Board::saveEPS( const char * filename, double pageWidth, double pageHeight, double margin, const std::string & title ) const { std::ofstream out( filename ); saveEPS(out,pageWidth,pageHeight,margin, title); out.close(); }
void Board::save( const char * filename, double pageWidth, double pageHeight, double margin ) const { const char * extension = filename + strlen( filename ); while ( extension > filename && *extension != '.' ) --extension; if ( !(strcmp( extension, ".eps" )) || !(strcmp( extension, ".EPS" )) ) { saveEPS( filename, pageWidth, pageHeight, margin ); return; } if ( !(strcmp( extension, ".fig" )) || !(strcmp( extension, ".FIG" )) ) { saveFIG( filename, pageWidth, pageHeight, margin ); return; } if ( !(strcmp( extension, ".svg" )) || !(strcmp( extension, ".SVG" )) ) { saveSVG( filename, pageWidth, pageHeight, margin ); return; } }
void Board::saveEPS( const char * filename, PageSize size, double margin ) const { saveEPS( filename, pageSizes[size][0], pageSizes[size][1], margin ); }
void Board::saveEPS( std::ostream & out, PageSize size, double margin, const std::string & title ) const { saveEPS( out, pageSizes[size][0], pageSizes[size][1], margin, title ); }