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

search for in the

CairoContext::status> <CairoContext::showPage
[edit] Last updated: Fri, 23 Mar 2012

view this page in

CairoContext::showText

cairo_show_text

(PECL cairo >= 0.1.0)

CairoContext::showText -- cairo_show_textThe showText purpose

Açıklama

Nesne yönelimli kullanım (method):

public void CairoContext::showText ( string $text )

Yordamsal kullanım:

void cairo_show_text ( CairoContext $context , string $text )

Description here.

Uyarı

Bu işlev hala belgelendirilmemiştir; sadece değiştirge listesi mevcuttur.

Değiştirgeler

context

Description...

text

Description...

Dönen Değerler

Description...

Örnekler

Örnek 1 Nesne yönelimli kullanım

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

Yukarıdaki örnek şuna benzer bir çıktı üretir:

...

Örnek 2 Yordamsal kullanım

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

Yukarıdaki örnek şuna benzer bir çıktı üretir:

...

Ayrıca Bakınız

  • Classname::Method()



add a note add a note User Contributed Notes CairoContext::showText
Volomike on Twitter 10-Feb-2010 10:14
This is an example of the showText() method for drawing text on a surface. Note that selectFontFace() will select fonts that your OS recognizes and I didn't see a way in the current API to select a font by filename.

<?php
$surface
= new CairoImageSurface(CAIRO_FORMAT_ARGB32, 960, 250);
$ctx = new CairoContext($surface);
$ctx->selectFontFace('EuropaGroNr2SH-XBolCon');
$ctx->setFontSize(30);
$ctx->setAntialias(1);
$ctx->moveTo(0, 44);
$ctx->showText('Hello,');
$ctx->moveTo(30, 74);
$ctx->showText('world!');
$sName = tempnam('/tmp','hello');
$surface->writeToPng($sName);
$data = file_get_contents($sName);
unlink($sName);
header('Content-Type: image/png');
echo
$data;

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