Retrieves the width of the CairoImageSurface

CairoImageSurface::getStride
CairoPdfSurface
CairoImageSurface
PHP Manual

# CairoImageSurface::getWidth

(PECL cairo >= 0.1.0)

CairoImageSurface::getWidth — Retrieves the width of the CairoImageSurface

### Description

public int CairoImageSurface::getWidth ( void )

Gets the width of the CairoImageSurface

### Parameters

This function has no parameters.

### Return Values

Returns the width of the CairoImageSurface object

### Examples

Example #1 CairoImageSurface::getWidth() example

`<?php
// creates a new image surface
$surface = new CairoImageSurface(CairoFormat::ARGB32, 80, 50);
//gets the width
var_dump($surface->getWidth());
?>`

The above example will output something similar to:

    int(80)

### See Also

- CairoImageSurface::getHeight() - Retrieves the height of the CairoImageSurface

CairoImageSurface::getStride
CairoPdfSurface
CairoImageSurface
PHP Manual