📄 postscript_defs.hpp
字号:
/* * =========================================================================== * PRODUCTION $Log: postscript_defs.hpp,v $ * PRODUCTION Revision 1000.0 2003/10/31 22:07:16 gouriano * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.2 * PRODUCTION * =========================================================================== */#ifndef GUI_UTILS__POSTSCRIPT_DEFS_HPP#define GUI_UTILS__POSTSCRIPT_DEFS_HPP/* $Id: postscript_defs.hpp,v 1000.0 2003/10/31 22:07:16 gouriano Exp $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software / database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software / database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Authors: Peter Meric * * File Description: * Strings and constants for Postscript * */#include <corelib/ncbistr.hpp>BEGIN_NCBI_SCOPE//// simple handler for dumping a list of const char*'s to a stream//inlinevoid PrintStrings(CNcbiOstream& out, const char** text){ for (; text; ++text) { (out) << *text << endl;\ }}//// boilerplate for Postscript output(header)//static const char* s_PS_topA[] ={ "%!PS - Adobe - 3.0", "%%LanguageLevel: 1", "%%Creator: NCBI Postscript Generator(meric@ncbi.nlm.nih.gov)", "%%CreationDate: Mon 1 Jan 2002 00:00:00", NULL};//// boilerplate for Postscript output(footer)//static const char* s_PS_topB[] ={ "%%Pages: (atend)", "%%PageOrder: Ascend", "%%EndComments", NULL};//// boilerplate for Postscript output(colors)//static const char* s_PS_colors[] ={ "% CMYK color definitions", "/colordict 71 dict def colordict begin % 71 colors", "/black { 0.00 0.00 0.00 1.00 } def", "/greyd { 0.00 0.00 0.00 0.90 } def", "/verydarkgrey { 0.00 0.00 0.00 0.80 } def", "/greyc { 0.00 0.00 0.00 0.70 } def", "/darkgrey { 0.00 0.00 0.00 0.60 } def", "/greyb { 0.00 0.00 0.00 0.50 } def", "/grey { 0.00 0.00 0.00 0.40 } def", "/greya { 0.00 0.00 0.00 0.30 } def", "/lightgrey { 0.00 0.00 0.00 0.20 } def", "/verylightgrey { 0.00 0.00 0.00 0.10 } def", "/white { 0.00 0.00 0.00 0.00 } def", "% magenta", "/verydarkmagenta { 0.00 1.00 0.00 0.30 } def", "/darkmagenta { 0.00 0.80 0.00 0.05 } def", "/magenta { 0.00 0.60 0.00 0.00 } def", "/lightmagenta { 0.00 0.40 0.00 0.00 } def", "/verylightmagenta { 0.00 0.20 0.00 0.00 } def", "% violet", "/verydarkviolet { 0.45 0.85 0.00 0.00 } def", "/darkviolet { 0.30 0.65 0.00 0.00 } def", "/violet { 0.22 0.55 0.00 0.00 } def", "/lightviolet { 0.15 0.40 0.00 0.00 } def", "/verylightviolet { 0.10 0.20 0.00 0.00 } def", "% blue", "/verydarkblue { 1.00 1.00 0.00 0.20 } def", "/darkblue { 0.90 0.90 0.00 0.00 } def", "/blue { 0.75 0.75 0.00 0.00 } def", "/lightblue { 0.50 0.50 0.00 0.00 } def", "/verylightblue { 0.30 0.30 0.00 0.00 } def", "% skyblue", "/verydarkskyblue { 0.90 0.50 0.00 0.15 } def", "/darkskyblue { 0.75 0.45 0.00 0.00 } def", "/skyblue { 0.60 0.38 0.00 0.00 } def", "/lightskyblue { 0.45 0.25 0.00 0.00 } def", "/verylightskyblue { 0.30 0.15 0.00 0.00 } def", "% cyan", "/verydarkcyan { 1.00 0.00 0.00 0.10 } def", "/darkcyan { 0.80 0.00 0.00 0.00 } def", "/cyan { 0.60 0.00 0.00 0.00 } def", "/lightcyan { 0.40 0.00 0.00 0.00 } def", "/verylightcyan { 0.20 0.00 0.00 0.00 } def", "% seagreen", "/verydarkseagreen { 0.75 0.00 0.45 0.00 } def", "/darkseagreen { 0.62 0.00 0.38 0.00 } def", "/seagreen { 0.50 0.00 0.30 0.00 } def", "/lightseagreen { 0.38 0.00 0.22 0.00 } def", "/verylightseagreen { 0.25 0.00 0.15 0.00 } def", "% green", "/verydarkgreen { 1.00 0.00 1.00 0.25 } def", "/darkgreen { 0.80 0.00 0.80 0.00 } def", "/green { 0.60 0.00 0.60 0.00 } def", "/lightgreen { 0.40 0.00 0.40 0.00 } def", "/verylightgreen { 0.20 0.00 0.20 0.00 } def", "% limegreen", "/verydarklimegreen { 0.50 0.00 1.00 0.10 } def", "/darklimegreen { 0.40 0.00 0.95 0.00 } def", "/limegreen { 0.30 0.00 0.80 0.00 } def", "/lightlimegreen { 0.20 0.00 0.65 0.00 } def", "/verylightlimegreen { 0.10 0.00 0.50 0.00 } def", "% yellow", "/verydarkyellow { 0.00 0.00 1.00 0.25 } def", "/darkyellow { 0.00 0.00 1.00 0.10 } def", "/yellow { 0.00 0.00 1.00 0.00 } def", "/lightyellow { 0.00 0.00 0.50 0.00 } def", "/verylightyellow { 0.00 0.00 0.25 0.00 } def", "% orange", "/verydarkorange { 0.00 0.50 0.80 0.10 } def", "/darkorange { 0.00 0.40 0.80 0.00 } def", "/orange { 0.00 0.30 0.80 0.00 } def", "/lightorange { 0.00 0.20 0.75 0.00 } def", "/verylightorange { 0.00 0.15 0.70 0.00 } def", "% red", "/verydarkred { 0.00 1.00 1.00 0.15 } def", "/darkred { 0.00 0.80 0.80 0.00 } def", "/red { 0.00 0.60 0.60 0.00 } def", "/lightred { 0.00 0.40 0.40 0.00 } def", "/verylightred { 0.00 0.20 0.20 0.00 } def", "% brown", "/verydarkbrown { 0.35 0.85 1.00 0.40 } def", "/darkbrown { 0.30 0.70 1.00 0.35 } def", "/brown { 0.25 0.75 1.00 0.25 } def", "/lightbrown { 0.20 0.60 0.70 0.15 } def", "/verylightbrown { 0.15 0.45 0.55 0.00 } def", "end % colordict", NULL};static const char* s_PS_prologA[] ={ "%%BeginProlog", "/bop { gsave } def", "/eop { grestore showpage } def", "% fontname fontsize fnt", "/fnt { exch findfont exch scalefont setfont } def", "% text fontname fontsize x y showtext", "/showtext { 4 2 roll fnt moveto gsave ls_iscale show grestore } def", "/pghead { 0 0 0 C /Helvetica 8 dwidth 2 div dheight 1.09 mul showtext } def", "/pgfoot { 0 0 0 C /Courier 8 dwidth 2 div 0 showtext } def", "% Greyscale color command - r g b C_GREY", "/C_GREY { 0.0820 mul exch 0.6094 mul add exch 0.3086 mul add neg 1.0 add setgray } def", "% RGB color command - r g b C_RGB", "/C_RGB { setrgbcolor } def" "% CMYK color command - c m y k C_CMYK", "/C_CMYK { setcmykcolor } def", NULL};static const char* s_PS_prologB[] ={ "% Point primitive - x y P", "/P { newpath 0.5 0.0 360.0 arc closepath fill } def", "% Flat - shaded line - x2 y2 x1 y1 L", "/L { moveto lineto } def", "% Flat - shaded triangle - x3 y3 x2 y2 x1 y1 T", "/T { newpath moveto lineto lineto closepath fill } def", "% Polygon xN yN ... x1 y1 N PG", "/PG { newpath 3 1 roll moveto 1 sub lineto repeat closepath fill } def", "% margins, page setup etc", "/to_pix { 72 mul } def", "/pg_len { 11 to_pix } def", "/pg_wid { 8.5 to_pix } def", "/bot_margin { 0.5 to_pix } def", "/left_margin { 0.5 to_pix } def", "/ls_scale { pg_len dwidth div 0.85 mul pg_wid dheight div 0.85 mul scale } def", "/ls_iscale { 1 pg_len dwidth div 0.85 mul div 1 pg_wid dheight div 0.85 mul div scale } def", "/ls_xlate { dwidth 0.10 mul -1 dheight mul 1.12 mul translate } def", "/ls_rot { 90 rotate } def", "/lscape { ls_rot ls_scale ls_xlate } def", "%%EndProlog", NULL};static const char* s_PS_bottom[] ={ "%EOF", NULL};END_NCBI_SCOPE/* * =========================================================================== * $Log: postscript_defs.hpp,v $ * Revision 1000.0 2003/10/31 22:07:16 gouriano * PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.2 * * Revision 1.2 2003/06/16 12:44:52 dicuccio * Clean-up after initial commit * * =========================================================================== */#endif // GUI_UTILS__POSTSCRIPT_DEFS_HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -