No cache version.


Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

The CairoContext class

(PECL cairo >= 0.1.0)

Introduction

Context is the main object used when drawing with cairo. To draw with cairo, you create a CairoContext, set the target CairoSurface, and drawing options for the CairoContext, create shapes with functions . like CairoContext::moveTo() and CairoContext::lineTo(), and then draw shapes with CairoContext::stroke() or CairoContext::fill(). Contexts can be pushed to a stack via CairoContext::save(). They may then safely be changed, without losing the current state. Use CairoContext::restore() to restore to the saved state.

PHP: CairoContext - Manual Home of Manuel PHP  Contents Haut

Class synopsis

CairoContext {
/* Methods */
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
}

PHP: CairoContext - Manual Home of Manuel PHP  Contents Haut

Table of Contents

Find a PHP function

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-class.cairocontext.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : http://php.net

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut