CairoImageSurface::getFormat

(PECL cairo >= 0.1.0)

CairoImageSurface::getFormatGet the image format

說明

public int CairoImageSurface::getFormat ( void )

Retrieves the image format, as one of the CairoFormat defined

參數

此函式沒有參數。

回傳值

One of the CairoFormat enums

範例

Example #1 CairoImageSurface::getFormat() example

<?php

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

var_dump($surface->getFormat()); // 0

$surface2 = new CairoImageSurface(CairoFormat::A85050);

var_dump($surface2->getFormat()); // 2

?>

上例的輸出類似於:

int(0)
int(2)

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top