CairoContext::hasCurrentPoint

cairo_has_current_point

(PECL cairo >= 0.1.0)

CairoContext::hasCurrentPoint -- cairo_has_current_pointThe hasCurrentPoint purpose

说锟斤拷

锟斤拷锟斤拷锟斤拷锟斤拷锟� (method):

public CairoContext::hasCurrentPoint ( void ) : bool

锟斤拷锟教伙拷锟斤拷锟�:

cairo_has_current_point ( CairoContext $context ) : bool

Returns whether a current point is defined on the current path. See CairoContext::getCurrentPoint() for details on the current point.

锟斤拷锟斤拷

context

A valid CairoContext object.

锟斤拷锟斤拷值

Whether a current point is defined

锟斤拷锟斤拷

Example #1 锟斤拷锟斤拷锟斤拷锟斤拷锟�

<?php

$s 
= new CairoImageSurface(CairoFormat::ARGB32100100);
$c = new CairoContext($s);

var_dump($c->hasCurrentPoint());

$c->moveTo(1010);

var_dump($c->hasCurrentPoint());

?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

bool(false)
bool(true)

Example #2 锟斤拷锟教伙拷锟斤拷锟�

<?php

$s 
cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE100100);
$c cairo_create($s);

var_dump(cairo_has_current_point($c));

cairo_move_to($c1010);

var_dump(cairo_has_current_point($c));

?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

bool(false)
bool(true)

锟轿硷拷