(PECL cairo >= 0.1.0)
CairoContext::hasCurrentPoint -- cairo_has_current_point — The hasCurrentPoint purpose
Stil obiect-orientat (method):
Stil procedural:
Returns whether a current point is defined on the current path. See CairoContext::getCurrentPoint() for details on the current point.
Whether a current point is defined
Example #1 Stil obiect-orientat
<?php
$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);
var_dump($c->hasCurrentPoint());
$c->moveTo(10, 10);
var_dump($c->hasCurrentPoint());
?>
Exemplul de mai sus va afișa:
bool(false) bool(true)
Example #2 Stil procedural
<?php
$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);
var_dump(cairo_has_current_point($c));
cairo_move_to($c, 10, 10);
var_dump(cairo_has_current_point($c));
?>
Exemplul de mai sus va afișa:
bool(false) bool(true)