略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: CairoContext::__construct

2024-05-02

CairoContext::__construct

(PECL cairo >= 0.1.0)

CairoContext::__constructCreates a new CairoContext

说明

public CairoContext::__construct ( CairoSurface $surface )

Creates a new CairoContext object to draw

参数

surface

A valid CairoSurface like CairoImageSurface or CairoPdfSurface

返回值

A CairoContext

范例

Example #1 CairoContext::__construct() example

<?php
// The surface to work on
$surface = new CairoImageSurface(CairoFormat::ARGB325050);

// Create a new CairoContext for the CairoSurface
$context = new CairoContext($surface);

?>

参见

  • Cairo::Method()
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.construct.php

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