CairoContext::copyPath
CairoContext::curveTo
CairoContext
PHP Manual

# CairoContext::copyPathFlat

# cairo_copy_path_flat

(PECL cairo >= 0.1.0)

CairoContext::copyPathFlat -- cairo_copy_path_flat — Gets a flattened copy of the current path

### Descrição

Estilo orientado à objeto (method):

public CairoPath CairoContext::copyPathFlat ( void )

Estilo procedural:

CairoPath cairo_copy_path_flat ( CairoContext `$context` )

Gets a flattened copy of the current path and returns it to the user as a CairoPath.

This function is like CairoContext::copyPath() except that any curves in the path will be approximated with piecewise-linear approximations, (accurate to within the current tolerance value). That is, the result is guaranteed to not have any elements of type CAIRO_PATH_CURVE_TO which will instead be replaced by a series of CAIRO_PATH_LINE_TO elements.

### Parâmetros

`context`

  A CairoContext object

### Valor Retornado

A copy of the current path

### Exemplos

Exemplo #1 Estilo orientado à objeto

`<?php
$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
$context = new CairoContext($surface);
var_dump($context->copyPathFlat());
?>`

O exemplo acima irá imprimir algo similar à:

    object(CairoPath)#3 (0) {
    }

Exemplo #2 Estilo procedural

`<?php
$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
$context = cairo_create($surface);
var_dump(cairo_copy_path_flat($context));
?>`

O exemplo acima irá imprimir algo similar à:

    object(CairoPath)#3 (0) {
    }

### Veja Também

- CairoContext::copyPath() - Creates a copy of the current path
- CairoContext::closePath() - Closes the current path

CairoContext::copyPath
CairoContext::curveTo
CairoContext
PHP Manual