CairoContext
PHP Manual

CairoContext::hasCurrentPoint

cairo_has_current_point

(PECL cairo >= 0.1.0)

CairoContext::hasCurrentPoint -- cairo_has_current_point — The hasCurrentPoint purpose

説明

オブジェクト指向型 (method):

public bool CairoContext::hasCurrentPoint ( void )

手続き型:

bool cairo_has_current_point ( CairoContext $context )

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

例

例1 オブジェクト指向型

<?php

$s 
= new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);

var_dump($c->hasCurrentPoint());

$c->moveTo(10, 10);

var_dump($c->hasCurrentPoint());

?>

上の例の出力は以下となります。

bool(false)
bool(true)

例2 手続き型

<?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));

?>

上の例の出力は以下となります。

bool(false)
bool(true)

参考


CairoContext
PHP Manual