La classe CairoContext

(PECL cairo >= 0.1.0)

Introduction

Le contexte est l'objet principal utilisé lors d'un dessin avec Cairo. Pour dessiner avec Cairo, vous devez créer un objet CairoContext, définir la cible CairoSurface, ainsi que les options de dessin pour l'objet CairoContext, créer la forme avec les fonctions comme like CairoContext::moveTo() et CairoContext::lineTo(), et enfin, dessiner les formes avec la méthode CairoContext::stroke() ou la méthode CairoContext::fill(). Les contextes peuvent être mis dans une pile via la méthode CairoContext::save(). Ils peuvent ensuite être modifiés sans perdre l'état courant. Utilisez la méthode CairoContext::restore() pour retrouver l'état sauvegardé.

Synopsis de la classe

CairoContext {
/* Méthodes */
public appendPath ( CairoPath $path ) : void
public arc ( float $x , float $y , float $radius , float $angle1 , float $angle2 ) : void
public arcNegative ( float $x , float $y , float $radius , float $angle1 , float $angle2 ) : void
public clip ( void ) : void
public clipExtents ( void ) : array
public clipPreserve ( void ) : void
public clipRectangleList ( void ) : array
public closePath ( void ) : void
public __construct ( CairoSurface $surface )
public copyPage ( void ) : void
public copyPath ( void ) : CairoPath
public copyPathFlat ( void ) : CairoPath
public curveTo ( float $x1 , float $y1 , float $x2 , float $y2 , float $x3 , float $y3 ) : void
public deviceToUser ( float $x , float $y ) : array
public deviceToUserDistance ( float $x , float $y ) : array
public fill ( void ) : void
public fillExtents ( void ) : array
public fillPreserve ( void ) : void
public fontExtents ( void ) : array
public getAntialias ( void ) : int
public getCurrentPoint ( void ) : array
public getDash ( void ) : array
public getDashCount ( void ) : int
public getFillRule ( void ) : int
public getFontFace ( void ) : void
public getFontMatrix ( void ) : void
public getFontOptions ( void ) : void
public getGroupTarget ( void ) : void
public getLineCap ( void ) : int
public getLineJoin ( void ) : int
public getLineWidth ( void ) : float
public getMatrix ( void ) : void
public getMiterLimit ( void ) : float
public getOperator ( void ) : int
public getScaledFont ( void ) : void
public getSource ( void ) : void
public getTarget ( void ) : void
public getTolerance ( void ) : float
public glyphPath ( array $glyphs ) : void
public hasCurrentPoint ( void ) : bool
public identityMatrix ( void ) : void
public inFill ( float $x , float $y ) : bool
public inStroke ( float $x , float $y ) : bool
public lineTo ( float $x , float $y ) : void
public mask ( CairoPattern $pattern ) : void
public maskSurface ( CairoSurface $surface [, float $x [, float $y ]] ) : void
public moveTo ( float $x , float $y ) : void
public newPath ( void ) : void
public newSubPath ( void ) : void
public paint ( void ) : void
public paintWithAlpha ( float $alpha ) : void
public pathExtents ( void ) : array
public popGroup ( void ) : void
public popGroupToSource ( void ) : void
public pushGroup ( void ) : void
public pushGroupWithContent ( int $content ) : void
public rectangle ( float $x , float $y , float $width , float $height ) : void
public relCurveTo ( float $x1 , float $y1 , float $x2 , float $y2 , float $x3 , float $y3 ) : void
public relLineTo ( float $x , float $y ) : void
public relMoveTo ( float $x , float $y ) : void
public resetClip ( void ) : void
public restore ( void ) : void
public rotate ( float $angle ) : void
public save ( void ) : void
public scale ( float $x , float $y ) : void
public selectFontFace ( string $family [, int $slant [, int $weight ]] ) : void
public setAntialias ([ int $antialias ] ) : void
public setDash ( array $dashes [, float $offset ] ) : void
public setFillRule ( int $setting ) : void
public setFontFace ( CairoFontFace $fontface ) : void
public setFontMatrix ( CairoMatrix $matrix ) : void
public setFontOptions ( CairoFontOptions $fontoptions ) : void
public setFontSize ( float $size ) : void
public setLineCap ( int $setting ) : void
public setLineJoin ( int $setting ) : void
public setLineWidth ( float $width ) : void
public setMatrix ( CairoMatrix $matrix ) : void
public setMiterLimit ( float $limit ) : void
public setOperator ( int $setting ) : void
public setScaledFont ( CairoScaledFont $scaledfont ) : void
public setSource ( CairoPattern $pattern ) : void
public setSourceRGB ( float $red , float $green , float $blue ) : void
public setSourceRGBA ( float $red , float $green , float $blue , float $alpha ) : void
public setSourceSurface ( CairoSurface $surface [, float $x [, float $y ]] ) : void
public setTolerance ( float $tolerance ) : void
public showPage ( void ) : void
public showText ( string $text ) : void
public status ( void ) : int
public stroke ( void ) : void
public strokeExtents ( void ) : array
public strokePreserve ( void ) : void
public textExtents ( string $text ) : array
public textPath ( string $string ) : void
public transform ( CairoMatrix $matrix ) : void
public translate ( float $x , float $y ) : void
public userToDevice ( float $x , float $y ) : array
public userToDeviceDistance ( float $x , float $y ) : array
}

Sommaire