PHPKonf Istanbul PHP Conference 2019 - Call for Papers

CairoContext クラス

(PECL cairo >= 0.1.0)

はじめに

コンテキストは、cairo での描画に使うメインオブジェクトです。 cairo で描画を行うには、 CairoContext を作ってから対象の CairoSurface を設定し、CairoContext の描画オプションを設定します。 CairoContext::moveTo()CairoContext::lineTo() などの関数でシェイプを作成し、 CairoContext::stroke()CairoContext::fill() でシェイプを描画します。 コンテキストをスタックにプッシュするには CairoContext::save() を使います。これで、現状を失わずに安全に変更できるようになります。 保存した状態を復元するには CairoContext::restore() を使います。

クラス概要

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

目次

add a note add a note

User Contributed Notes

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