略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: CairoContext::fillExtents

2024-03-28

CairoContext::fillExtents

cairo_fill_extents

(PECL cairo >= 0.1.0)

CairoContext::fillExtents -- cairo_fill_extentsComputes the filled area

说明

面向对象风格 (method):

public CairoContext::fillExtents ( void ) : array

过程化风格:

cairo_fill_extents ( CairoContext $context ) : array

Computes a bounding box in user coordinates covering the area that would be affected, (the “inked” area), by a CairoContext::fill() operation given the current path and fill parameters. If the current path is empty, returns an empty rectangle (0,0,0,0). Surface dimensions and clipping are not taken into account.

Contrast with CairoContext::pathExtents(), which is similar, but returns non-zero extents for some paths with no inked area, (such as a simple line segment).

Note that CairoContext::fillExtents() must necessarily do more work to compute the precise inked areas in light of the fill rule, so CairoContext::pathExtents() may be more desirable for sake of performance if the non-inked path extents are desired.

参数

context

A valid CairoContext object created with CairoContext::__construct() or cairo_create()

返回值

An array with the coordinates of the afected area

范例

Example #1 面向对象风格

<?php
/* ... */
?>

以上例程的输出类似于:

...

Example #2 过程化风格

<?php
/* ... */
?>

以上例程的输出类似于:

...

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/cairocontext.fillextents.php

冷却塔厂家 广告
-- 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3