略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: CairoContext::getAntialias

2024-12-23

CairoContext::getAntialias

cairo_get_antialias

(PECL cairo >= 0.1.0)

CairoContext::getAntialias -- cairo_get_antialiasRetrieves the current antialias mode

说明

面向对象风格 (method):

public CairoContext::getAntialias ( void ) : int

过程化风格:

cairo_get_antialias ( CairoContext $context ) : int

Returns the current CairoAntialias mode, as set by CairoContext::setAntialias().

参数

context

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

返回值

The current CairoAntialias mode.

范例

Example #1 面向对象风格

<?php

$surface 
= new CairoImageSurface(CairoFormat::ARGB325050);
$context = new CairoContext($surface);

$context->setAntialias(CairoAntialias::MODE_SUBPIXEL);

var_dump($context->getAntialias());

?>

以上例程的输出类似于:

int(3)

Example #2 过程化风格

<?php

$sur 
cairo_image_surface_create(CAIRO_FORMAT_ARGB325050);
$con cairo_create($sur);

cairo_set_antialias($conCAIRO_ANTIALIAS_SUBPIXEL);

var_dump(cairo_get_antialias($con));

?>

以上例程的输出类似于:

int(3)

参见

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.getantialias.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3