CairoContext::__construct()
(PECL cairo >= 0.1.0)
Creates 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::ARGB32, 50, 50); // Create a new CairoContext for the CairoSurface $context = new CairoContext($surface); ?>
参见
- Cairo::Method()