CairoContext::__construct

(PECL cairo >= 0.1.0)
Creates a new CairoContext
public CairoContext::__construct ( CairoSurface $surface )

Creates a new CairoContext object to draw

Parameters:
surface

A valid CairoSurface like CairoImageSurface or CairoPdfSurface

Returns:

A CairoContext

Examples:
CairoContext::__construct() example
1
2
3
4
5
6
7
8
<?php
// The surface to work on
$surface new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
 
// Create a new CairoContext for the CairoSurface
$context new CairoContext($surface);
 
?>
doc_php
2016-02-24 15:58:54
Comments
Leave a Comment

Please login to continue.