略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: CairoContext::copyPage

2024-04-26

CairoContext::copyPage

cairo_copy_page

(PECL cairo >= 0.1.0)

CairoContext::copyPage -- cairo_copy_pageEmits the current page

说明

面向对象风格 (method):

public CairoContext::copyPage ( void ) : void

过程化风格:

cairo_copy_page ( CairoContext $context ) : void

Emits the current page for backends that support multiple pages, but doesn’t clear it, so, the contents of the current page will be retained for the next page too. Use CairoContext::showPage() if you want to get an empty page after the emission.

This is a convenience function that simply calls CairoSurface::copyPage() on CairoContext’s target.

参数

context

A valid CairoContext object created with CairoContext::__construct() or cairo_create()

返回值

没有返回值。

范例

Example #1 面向对象风格

<?php

$surface 
= new CairoImageSurface(CairoFormat::ARGB325050);

$context = new CairoContext($surface);

$context->copyPage();

?>

Example #2 过程化风格

<?php

$surface 
cairo_image_surface_create(CAIRO_FORMAT_ARGB325050);

$context cairo_create($surface);

cairo_copy_page($context);

?>

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/cairocontext.copypage.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3