CairoContext::setFontFace

cairo_set_font_face

(PECL cairo >= 0.1.0)

CairoContext::setFontFace -- cairo_set_font_faceThe setFontFace purpose

Opis

Styl obiektowy (method):

public CairoContext::setFontFace ( CairoFontFace $fontface ) : void

Styl proceduralny:

cairo_set_font_face ( CairoContext $context , CairoFontFace $fontface ) : void

Sets the font-face for a given context.

Parametry

context

A CairoContext object to change the font-face for.

fontface

A CairoFontFace object

Zwracane wartości

No value is returned

Przykłady

Przykład #1 Styl obiektowy

<?php
// New surface with white background
$s = new CairoImageSurface(CairoFormat::ARGB32300100);
$c = new CairoContext($s);
$c->setSourceRgb(111);
$c->paint();

// Draw some text
$c->setSourceRgb(000);
$c->moveTo(1060);
// Create a new font face
$f = new CairoToyFontFace("sans-serif"CairoFontSlant::NORMALCairoFontWeight::NORMAL);
$c->setFontFace($f);
$c->setFontSize(30);
$c->showText('Hello, World!');
$s->writeToPng(dirname(__FILE__) . '/setFontFace.png');
?>

Przykład #2 Styl proceduralny

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

Zobacz też:

add a note add a note

User Contributed Notes

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