downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

CairoContext::getAntialias> <CairoContext::fillPreserve
[edit] Last updated: Fri, 17 May 2013

view this page in

CairoContext::fontExtents

cairo_font_extents

(PECL cairo >= 0.1.0)

CairoContext::fontExtents -- cairo_font_extentsGet the font extents

Beschreibung

Objektorientierter Stil (method):

public array CairoContext::fontExtents ( void )

Prozeduraler Stil:

array cairo_font_extents ( CairoContext $context )

Gets the font extents for the currently selected font.

Parameter-Liste

context

Description...

Rückgabewerte

An array containing the font extents for the current font.

Beispiele

Beispiel #1 Objektorientierter Stil

<?php

$sur 
= new CairoImageSurface(CairoFormat::ARGB325050);
$con = new CairoContext($sur);

var_dump($con->fontExtents());

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

array(5) {
  ["ascent"]=>
  float(10)
  ["descent"]=>
  float(3)
  ["height"]=>
  float(13.3125)
  ["max_x_advance"]=>
  float(26.65625)
  ["max_y_advance"]=>
  float(0)
}

Beispiel #2 Prozeduraler Stil

<?php

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

var_dump(cairo_font_extents($con));

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

array(5) {
  ["ascent"]=>
  float(10)
  ["descent"]=>
  float(3)
  ["height"]=>
  float(13.3125)
  ["max_x_advance"]=>
  float(26.65625)
  ["max_y_advance"]=>
  float(0)
}

Siehe auch

  • Classname::Method()



add a note add a note User Contributed Notes CairoContext::fontExtents - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites