本文整理汇总了C++中ps_output::begin_comment方法的典型用法代码示例。如果您正苦于以下问题:C++ ps_output::begin_comment方法的具体用法?C++ ps_output::begin_comment怎么用?C++ ps_output::begin_comment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ps_output
的用法示例。
在下文中一共展示了ps_output::begin_comment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: begin_page
void ps_printer::begin_page(int n)
{
out.begin_comment("Page:")
.comment_arg(i_to_a(n));
out.comment_arg(i_to_a(++pages_output))
.end_comment();
output_style.f = 0;
output_space_code = 32;
output_draw_point_size = -1;
output_line_thickness = -1;
output_hpos = output_vpos = -1;
ndefined_styles = 0;
out.simple_comment("BeginPageSetup");
#if 0
/*
* NOTE:
* may decide to do this once per page
*/
media_set();
#endif
out.put_symbol("BP")
.simple_comment("EndPageSetup");
if (sbuf_color != default_color)
set_color(&sbuf_color);
}
示例2: media_set
void ps_printer::media_set()
{
/*
* The setpagedevice implies an erasepage and initgraphics, and
* must thus precede any descriptions for a particular page.
*
* NOTE:
* This does not work with ps2pdf when there are included eps
* segments that contain PageSize/setpagedevice.
* This might be a bug in ghostscript -- must be investigated.
* Using setpagedevice in an .eps is really the wrong concept, anyway.
*
* NOTE:
* For the future, this is really the place to insert other
* media selection features, like:
* MediaColor
* MediaPosition
* MediaType
* MediaWeight
* MediaClass
* TraySwitch
* ManualFeed
* InsertSheet
* Duplex
* Collate
* ProcessColorModel
* etc.
*/
if (!(broken_flags & (USE_PS_ADOBE_2_0|NO_PAPERSIZE))) {
out.begin_comment("BeginFeature:")
.comment_arg("*PageSize")
.comment_arg(media_name())
.end_comment();
int w = media_width();
int h = media_height();
if (w > 0 && h > 0)
// warning to user is done elsewhere
fprintf(out.get_file(),
"<< /PageSize [ %d %d ] /ImagingBBox null >> setpagedevice\n",
w, h);
out.simple_comment("EndFeature");
}
}