CairoContext::copyPathFlat
cairo_copy_path_flat
Gets a flattened copy of the current path
Beschreibung
Objektorientierter Stil (method):
public CairoPath CairoContext::copyPathFlat
( void
)
CairoPath cairo_copy_path_flat
( CairoContext $context
)
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.
Parameter-Liste
-
context
-
A CairoContext object
Rückgabewerte
A copy of the current path
Beispiele
Beispiel #1 Objektorientierter Stil
<?php
$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
$context = new CairoContext($surface);
var_dump($context->copyPathFlat());
?>
Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:
object(CairoPath)#3 (0) {
}
Beispiel #2 Prozeduraler Stil
<?php
$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
$context = cairo_create($surface);
var_dump(cairo_copy_path_flat($context));
?>
Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:
object(CairoPath)#3 (0) {
}
Siehe auch
- CairoContext::copyPath
- CairoContext::closePath