Cairo

目录

简介

Simple class with some static helper methods.

类摘要

Cairo

class Cairo {

/* 方法 */

public static array availableFonts ( void )

public static array availableSurfaces ( void )

public static string statusToString ( int $status )

public static int version ( void )

public static string versionString ( void )

}

Cairo::availableFonts

cairo_available_fonts

Retrieves the availables font types

说明

面向对象风格:

public static array Cairo::availableFonts ( void )

过程化风格:

array cairo_available_fonts ( void )

Returns an array with the available font backends

参数

此函数没有参数。

返回值

A list-type array with all available font backends.

范例

示例 #1 面向对象风格

<?php

/* Object Oriented Style */
var_dump(Cairo::availableFonts());

?>

以上例程的输出类似于:

array(2) {
  [0]=>
  string(5) "WIN32"
  [1]=>
  string(4) "USER"
}

示例 #2 过程化风格

<?php

/* Procedural style */
var_dump(cairo_available_fonts());

?>

以上例程的输出类似于:

array(2) {
  [0]=>
  string(5) "WIN32"
  [1]=>
  string(4) "USER"
}

参见

  • Cairo::availableSurfaces

Cairo::availableSurfaces

cairo_available_surfaces

Retrieves all available surfaces

说明

面向对象风格 (method):

public static array Cairo::availableSurfaces ( void )

过程化风格:

array cairo_available_surfaces ( void )

Returns an array with the available surface backends

参数

此函数没有参数。

返回值

A list-type array with all available surface backends.

范例

示例 #1 面向对象风格

<?php

/* Object Oriented style */
var_dump(Cairo::availableSurfaces());

?>

以上例程的输出类似于:

array(6) {
  [0]=>
  string(5) "IMAGE"
  [1]=>
  string(3) "PNG"
  [2]=>
  string(3) "PDF"
  [3]=>
  string(2) "PS"
  [4]=>
  string(3) "SVG"
  [5]=>
  string(5) "WIN32"
}

示例 #2 过程化风格

<?php

/* Procedural style */
var_dump(cairo_available_surfaces());

?>

以上例程的输出类似于:

array(6) {
  [0]=>
  string(5) "IMAGE"
  [1]=>
  string(3) "PNG"
  [2]=>
  string(3) "PDF"
  [3]=>
  string(2) "PS"
  [4]=>
  string(3) "SVG"
  [5]=>
  string(5) "WIN32"
}

参见

  • Cairo::availableFonts

Cairo::statusToString

cairo_status_to_string

Retrieves the current status as string

说明

面向对象风格 (method):

public static string Cairo::statusToString ( int $status )

过程化风格:

string cairo_status_to_string ( int $status )

Retrieves the current status as a readable string

参数

status
A valid status code given by cairo_status or CairoContext::status

返回值

A string containing the current status of a CairoContext object

范例

示例 #1 面向对象风格

<?php
$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
$context = new CairoContext($surface);

var_dump(Cairo::statusToString($context->status()));
?>

以上例程的输出类似于:

string(7) "success"

示例 #2 过程化风格

<?php
$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
$context = cairo_create($surface);

var_dump(cairo_status_to_string(cairo_status($context)));
?>

以上例程的输出类似于:

string(7) "success"

参见

  • CairoContext::status

Cairo::version

cairo_version

Retrieves cairo's library version

说明

面向对象风格 (method):

public static int Cairo::version ( void )

过程化风格:

int cairo_version ( void )

Retrieves the current version of the cairo library as an integer value

参数

此函数没有参数。

返回值

Current Cairo library version integer

范例

示例 #1 面向对象风格

<?php
var_dump(Cairo::version());
?>

以上例程的输出类似于:

int(10808)

示例 #2 过程化风格

<?php
var_dump(cairo_version());
?>

以上例程的输出类似于:

int(10808)

参见

  • Cairo::versionString

Cairo::versionString

cairo_version_string

Retrieves cairo version as string

说明

面向对象风格 (method):

public static string Cairo::versionString ( void )

过程化风格:

string cairo_version_string ( void )

Retrieves the current cairo library version as a string.

参数

此函数没有参数。

返回值

Current Cairo library version string

范例

示例 #1 面向对象风格

<?php

var_dump(Cairo::versionString());

?>

以上例程的输出类似于:

string(5) "1.8.8"

示例 #2 过程化风格

<?php

var_dump(cairo_version_string());

?>

以上例程的输出类似于:

string(5) "1.8.8"

参见

  • Cairo::version

简介

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.

类摘要

CairoContext

class 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 )

}

CairoContext::appendPath

cairo_append_path

Appends a path to current path

说明

面向对象风格 (method):

public void CairoContext::appendPath ( CairoPath $path )

过程化风格:

void cairo_append_path ( CairoContext $context , CairoPath $path )

Appends the path onto the current path. The path may be either the return value from one of CairoContext::copyPath or CairoContext::copyPathFlat;

if path is not a valid CairoPath instance a CairoException will be thrown

参数

context
CairoContext object

path
CairoPath object

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

$path = $context->copyPath();

$context->appendPath($path);

?>

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

$path = cairo_copy_path($context);

cairo_append_path($context, $path);

?>

参见

  • CairoPath
  • CairoContext::copyPath
  • CairoContext::copyPathFlat

CairoContext::arc

cairo_arc

Adds a circular arc

说明

面向对象风格 (method):

public void CairoContext::arc ( float $x , float $y , float $radius , float $angle1 , float $angle2 )

过程化风格:

void cairo_arc ( CairoContext $context , float $x , float $y , float $radius , float $angle1 , float $angle2 )

Adds a circular arc of the given radius to the current path. The arc is centered at (x, y), begins at angle1 and proceeds in the direction of increasing angles to end at angle2. If angle2 is less than angle1 it will be progressively increased by 2*M_PI until it is greater than angle1. If there is a current point, an initial line segment will be added to the path to connect the current point to the beginning of the arc. If this initial line is undesired, it can be avoided by calling CairoContext::newSubPath or procedural cairo_new_sub_path before calling CairoContext::arc or cairo_arc. Angles are measured in radians. An angle of 0.0 is in the direction of the positive X axis (in user space). An angle of M_PI/2.0 radians (90 degrees) is in the direction of the positive Y axis (in user space). Angles increase in the direction from the positive X axis toward the positive Y axis. So with the default transformation matrix, angles increase in a clockwise direction. (To convert from degrees to radians, use degrees * (M_PI / 180.).) This function gives the arc in the direction of increasing angles; see CairoContext::arcNegative or cairo_arc_negative to get the arc in the direction of decreasing angles.

参数

context
A valid CairoContext object

x
x position

y
y position

radius
Radius of the arc

angle1
start angle

angle2
end angle

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);

$c->setSourceRgb(0, 0, 0);
$c->paint();

$c->setLineWidth(1);
$c->setSourceRgb(1, 1, 1);

for ($r = 50; $r > 0; $r -= 10) {
 $c->arc(50, 50, $r, 0, 2 * M_PI);
 $c->stroke();
 $c->fill();
}

$s->writeToPng(dirname(__FILE__) . '/CairoContext__arc.png');
?>

示例 #2 过程化风格

<?php

$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);

cairo_set_source_rgb($c, 0, 0, 0);
cairo_paint($c);

cairo_set_source_rgb($c, 1, 1, 1);
cairo_set_line_width($c, 1);

for ($r = 50; $r > 0; $r -= 10) {
 cairo_arc($c, 50, 50, $r, 0, 2 * M_PI);
 cairo_stroke($c);
 cairo_fill($c);
}

cairo_surface_write_to_png($s, dirname(__FILE__) . '/cairo_arc.png');
?>

参见

  • CairoContext::arcNegative

CairoContext::arcNegative

cairo_arc_negative

Adds a negative arc

说明

面向对象风格 (method):

public void CairoContext::arcNegative ( float $x , float $y , float $radius , float $angle1 , float $angle2 )

过程化风格:

void cairo_arc_negative ( CairoContext $context , float $x , float $y , float $radius , float $angle1 , float $angle2 )

Adds a circular arc of the given radius to the current path. The arc is centered at (x, y), begins at angle1 and proceeds in the direction of decreasing angles to end at angle2. If angle2 is greater than angle1 it will be progressively decreased by 2*M_PI until it is less than angle1. See CairoContext::arc or cairo_arc for more details. This function differs only in the direction of the arc between the two angles.

参数

context
A valid CairoContext object

x
double x position

y
double y position

radius
The radius of the desired negative arc

angle1
Start angle of the arc

angle2
End angle of the arc

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);

$c->setSourceRgb(0, 0, 0);
$c->paint();

$c->setLineWidth(1);
$c->setSourceRgb(1, 1, 1);

for ($r = 50; $r > 0; $r -= 10) {
 $c->arcNegative(50, 50, $r, 2 * M_PI, 0);
 $c->stroke();
 $c->fill();
}

$s->writeToPng(dirname(__FILE__) . '/CairoContext__arcNegative.png');
?>

示例 #2 过程化风格

<?php

$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);

cairo_set_source_rgb($c, 0, 0, 0);
cairo_paint($c);

cairo_set_source_rgb($c, 1, 1, 1);
cairo_set_line_width($c, 1);

for ($r = 50; $r > 0; $r -= 10) {
 cairo_arc_negative($c, 50, 50, $r, 2 * M_PI, 0);
 cairo_stroke($c);
 cairo_fill($c);
}

cairo_surface_write_to_png($s, dirname(__FILE__) . '/cairo_arc_negative.png');
?>

参见

  • CairoContext::arc

CairoContext::clip

cairo_clip

Establishes a new clip region

说明

面向对象风格 (method):

public void CairoContext::clip ( void )

过程化风格:

void cairo_clip ( CairoContext $context )

Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by CairoContext::fill or cairo_fill and according to the current fill rule (see CairoContext::setFillRule or cairo_set_fill_rule).

After CairoContext::clip or cairo_clip, the current path will be cleared from the cairo context.

The current clip region affects all drawing operations by effectively masking out any changes to the surface that are outside the current clip region.

Calling CairoContext::clip or cairo_clip can only make the clip region smaller, never larger. But the current clip is part of the graphics state, so a temporary restriction of the clip region can be achieved by calling CairoContext::clip or cairo_clip within a CairoContext::save/ CairoContext::restore or cairo_save/cairo_restore pair. The only other means of increasing the size of the clip region is CairoContext::resetClip or procedural cairo_reset_clip.

参数

context
A valid CairoContext object

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

$context->clip();

?>

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

cairo_clip($context);

?>

参见

  • CairoContext::resetClip
  • cairo_reset_clip

CairoContext::clipExtents

cairo_clip_extents

Computes the area inside the current clip

说明

面向对象风格 (method):

public array CairoContext::clipExtents ( void )

过程化风格:

array cairo_clip_extents ( CairoContext $context )

Computes a bounding box in user coordinates covering the area inside the current clip.

参数

context
A valid CairoContext object

返回值

An array containing the (float)x1, (float)y1, (float)x2, (float)y2, coordinates covering the area inside the current clip

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

var_dump($context->clipExtents());
?>

以上例程的输出类似于:

array(4) {
  [0]=>
  float(0)
  [1]=>
  float(0)
  [2]=>
  float(50)
  [3]=>
  float(50)
}

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

var_dump(cairo_clip_extents($context));

?>

以上例程的输出类似于:

array(4) {
  [0]=>
  float(0)
  [1]=>
  float(0)
  [2]=>
  float(50)
  [3]=>
  float(50)
}

参见

  • CairoContext::clip

CairoContext::clipPreserve

cairo_clip_preserve

Establishes a new clip region from the current clip

说明

面向对象风格 (method):

public void CairoContext::clipPreserve ( void )

过程化风格:

void cairo_clip_preserve ( CairoContext $context )

Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by Context.fill and according to the current FILL RULE (see CairoContext::setFillRule or cairo_set_fill_rule).

Unlike CairoContext::clip, CairoContext::clipPreserve preserves the path within the Context. The current clip region affects all drawing operations by effectively masking out any changes to the surface that are outside the current clip region.

Calling CairoContext::clipPreserve can only make the clip region smaller, never larger. But the current clip is part of the graphics state, so a temporary restriction of the clip region can be achieved by calling CairoContext::clipPreserve within a CairoContext::save/ CairoContext::restore pair. The only other means of increasing the size of the clip region is CairoContext::resetClip.

参数

context
A valid CairoContext object

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

$context->clipPreserve();

?>

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

cairo_clip_preserve($context);

?>

参见

  • CairoContext::save
  • CairoContext::restore
  • CairoContext::resetClip

CairoContext::clipRectangleList

cairo_clip_rectangle_list

Retrieves the current clip as a list of rectangles

说明

面向对象风格 (method):

public array CairoContext::clipRectangleList ( void )

过程化风格:

array cairo_clip_rectangle_list ( CairoContext $context )

Returns a list-type array with the current clip region as a list of rectangles in user coordinates

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

An array of user-space represented rectangles for the current clip

(The status in the list may be CAIRO_STATUS_CLIP_NOT_REPRESENTABLE to indicate that the clip region cannot be represented as a list of user-space rectangles. The status may have other values to indicate other errors.)

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

var_dump($context->clipRectangleList());

?>

以上例程的输出类似于:

array(1) {
  [0]=>
  array(4) {
    ["x"]=>
    float(0)
    ["y"]=>
    float(0)
    ["width"]=>
    float(50)
    ["height"]=>
    float(50)
  }
}

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

var_dump(cairo_clip_rectangle_list($context));

?>

以上例程的输出类似于:

array(1) {
  [0]=>
  array(4) {
    ["x"]=>
    float(0)
    ["y"]=>
    float(0)
    ["width"]=>
    float(50)
    ["height"]=>
    float(50)
  }
}

参见

  • Classname::Method

CairoContext::closePath

cairo_close_path

Closes the current path

说明

面向对象风格 (method):

public void CairoContext::closePath ( void )

过程化风格:

void cairo_close_path ( CairoContext $context )

Adds a line segment to the path from the current point to the beginning of the current sub-path, (the most recent point passed to CairoContext::moveTo), and closes this sub-path. After this call the current point will be at the joined endpoint of the sub-path.

The behavior of close_path() is distinct from simply calling CairoContext::lineTo with the equivalent coordinate in the case of stroking. When a closed sub-path is stroked, there are no caps on the ends of the sub-path. Instead, there is a line join connecting the final and initial segments of the sub-path.

If there is no current point before the call to CairoContext::closePath, this function will have no effect.

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

$context->closePath();

?>

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

cairo_close_path($context);

?>

参见

  • CairoContext::copyPath

CairoContext::__construct

Creates a new CairoContext

说明

public CairoContext::__construct ( CairoSurface $surface )

Creates a new CairoContext object to draw

参数

surface
A valid CairoSurface like CairoImageSurface or CairoPdfSurface

返回值

A CairoContext

范例

示例 #1 CairoContext::__construct example

<?php
// The surface to work on
$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

// Create a new CairoContext for the CairoSurface
$context = new CairoContext($surface);

?>

参见

  • Cairo::Method

CairoContext::copyPage

cairo_copy_page

Emits the current page

说明

面向对象风格 (method):

public void CairoContext::copyPage ( void )

过程化风格:

void cairo_copy_page ( CairoContext $context )

Emits the current page for backends that support multiple pages, but doesn’t clear it, so, the contents of the current page will be retained for the next page too. Use CairoContext::showPage if you want to get an empty page after the emission.

This is a convenience function that simply calls CairoSurface::copyPage on CairoContext’s target.

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

$context->copyPage();

?>

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

cairo_copy_page($context);

?>

参见

  • CairoContext::showPage
  • CairoSurface::copyPage

CairoContext::copyPath

cairo_copy_path

Creates a copy of the current path

说明

面向对象风格 (method):

public CairoPath CairoContext::copyPath ( void )

过程化风格:

CairoPath cairo_copy_path ( CairoContext $context )

Creates a copy of the current path and returns it to the user as a CairoPath. See CairoPath for hints on how to iterate over the returned data structure.

This function will always return a valid CairoPath object, but the result will have no data, if either of the following conditions hold:

  • 1. If there is insufficient memory to copy the path. In this case CairoPath->status will be set to CAIRO_STATUS_NO_MEMORY.
  • 2. If context is already in an error state. In this case CairoPath->status will contain the same status that would be returned by cairo_status.

In either case, CairoPath->status will be set to CAIRO_STATUS_NO_MEMORY (regardless of what the error status in cr might have been).

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

A copy of the current CairoPath in the context

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

var_dump($context->copyPath())

?>

以上例程的输出类似于:

object(CairoPath)#3 (0) {
}

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

var_dump(cairo_copy_path($context));

?>

以上例程的输出类似于:

object(CairoPath)#3 (0) {
}

参见

  • CairoContext::closePath

CairoContext::copyPathFlat

cairo_copy_path_flat

Gets a flattened copy of the current path

说明

面向对象风格 (method):

public CairoPath CairoContext::copyPathFlat ( void )

过程化风格:

CairoPath cairo_copy_path_flat ( CairoContext $context )

Gets a flattened copy of the current path and returns it to the user as a CairoPath.

This function is like CairoContext::copyPath except that any curves in the path will be approximated with piecewise-linear approximations, (accurate to within the current tolerance value). That is, the result is guaranteed to not have any elements of type CAIRO_PATH_CURVE_TO which will instead be replaced by a series of CAIRO_PATH_LINE_TO elements.

参数

context
A CairoContext object

返回值

A copy of the current path

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

$context = new CairoContext($surface);

var_dump($context->copyPathFlat());

?>

以上例程的输出类似于:

object(CairoPath)#3 (0) {
}

示例 #2 过程化风格

<?php

$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);

$context = cairo_create($surface);

var_dump(cairo_copy_path_flat($context));

?>

以上例程的输出类似于:

object(CairoPath)#3 (0) {
}

参见

  • CairoContext::copyPath
  • CairoContext::closePath

CairoContext::curveTo

cairo_curve_to

Adds a curve

说明

面向对象风格 (method):

public void CairoContext::curveTo ( float $x1 , float $y1 , float $x2 , float $y2 , float $x3 , float $y3 )

过程化风格:

void cairo_curve_to ( CairoContext $context , float $x1 , float $y1 , float $x2 , float $y2 , float $x3 , float $y3 )

Adds a cubic Bezier spline to the path from the current point to position x3 ,y3 in user-space coordinates, using x1, y1 and x2, y2 as the control points. After this call the current point will be x3, y3.

If there is no current point before the call to CairoContext::curveTo this function will behave as if preceded by a call to CairoContext::moveTo (x1, y1).

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

x1
First control point in the x axis for the curve

y1
First control point in the y axis for the curve

x2
Second control point in x axis for the curve

y2
Second control point in y axis for the curve

x3
Final point in the x axis for the curve

y3
Final point in the y axis for the curve

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php
$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);

$c->setSourceRgb(0, 0, 0);

$c->paint();

$c->moveTo(10, 50); 
$c->setLineWidth(5);
$c->setSourceRgb(.1, 0, 1);
$c->curveTo(20, 80, 80, 20, 90, 50); 
$c->stroke();

$s->writeToPng(dirname(__FILE__) . '/curveTo.png');
?>

示例 #2 过程化风格

<?php

$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);

cairo_set_source_rgb($c, 0, 0, 0);

cairo_paint($c);

cairo_move_to($c, 10, 50);
cairo_set_line_width($c, 5);
cairo_set_source_rgb($c, .1, 0, 1);
cairo_curve_to($c, 20, 80, 80, 20, 90, 50);
cairo_stroke($c);

cairo_surface_write_to_png($s, dirname(__FILE__) . '/curve_to.png');
?>

参见

  • CairoContext::moveTo

CairoContext::deviceToUser

cairo_device_to_user

Transform a coordinate

说明

面向对象风格 (method):

public array CairoContext::deviceToUser ( float $x , float $y )

过程化风格:

array cairo_device_to_user ( CairoContext $context , float $x , float $y )

Transform a coordinate from device space to user space by multiplying the given point by the inverse of the current transformation matrix (CTM).

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

x
x value of the coordinate

y
y value of the coordinate

返回值

An array containing the x and y coordinates in the user-space

参见

  • CairoContext::deviceToUserDistance

CairoContext::deviceToUserDistance

cairo_device_to_user_distance

Transform a distance

说明

面向对象风格 (method):

public array CairoContext::deviceToUserDistance ( float $x , float $y )

过程化风格:

array cairo_device_to_user_distance ( CairoContext $context , float $x , float $y )

Transform a distance vector from device space to user space. This function is similar to CairoContext::deviceToUser or cairo_device_to_user except that the translation components of the inverse Cairo Transformation Matrix will be ignored when transforming (x,y).

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

x
X component of a distance vector

y
Y component of a distance vector

返回值

Returns an array with the x and y values of a distance vector in the user-space

参见

  • CairoContext::deviceToUser

CairoContext::fill

cairo_fill

Fills the current path

说明

面向对象风格 (method):

public void CairoContext::fill ( void )

过程化风格:

void cairo_fill ( CairoContext $context )

A drawing operator that fills the current path according to the current CairoFillRule, (each sub-path is implicitly closed before being filled). After CairoContext::fill or cairo_fill, the current path will be cleared from the CairoContext.

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);
 
$c->setSourceRgb(0, 0, 0);
$c->paint();

$c->setSourceRgb(1, 1, 1);
$c->rectangle(0, 0, 50, 50);
$c->fill();
$c->setSourceRgb(0, 1, 0);
$c->rectangle(50, 50, 50, 50);
$c->fill();

$s->writeToPng(dirname(__FILE__) . '/CairoContext_fill.png');

?>

以上例程的输出类似于:

...

示例 #2 过程化风格

<?php

$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);

cairo_set_source_rgb($c, 0, 0, 0);
cairo_paint($c);

cairo_set_source_rgb($c, 1, 1, 1);
cairo_rectangle($c, 0, 0, 50, 50);
cairo_fill($c);
cairo_set_source_rgb($c, 0, 1, 0);
cairo_rectangle($c, 50, 50, 50, 50);
cairo_fill($c);

cairo_surface_write_to_png($s, dirname(__FILE__) . '/cairo_fill.png');

?>

以上例程的输出类似于:

...

参见

  • CairoContext::setFillRule
  • ContextContext::fillPreserve
  • CairoFillRule

CairoContext::fillExtents

cairo_fill_extents

Computes the filled area

说明

面向对象风格 (method):

public array CairoContext::fillExtents ( void )

过程化风格:

array cairo_fill_extents ( CairoContext $context )

Computes a bounding box in user coordinates covering the area that would be affected, (the “inked” area), by a CairoContext::fill operation given the current path and fill parameters. If the current path is empty, returns an empty rectangle (0,0,0,0). Surface dimensions and clipping are not taken into account.

Contrast with CairoContext::pathExtents, which is similar, but returns non-zero extents for some paths with no inked area, (such as a simple line segment).

Note that CairoContext::fillExtents must necessarily do more work to compute the precise inked areas in light of the fill rule, so CairoContext::pathExtents may be more desirable for sake of performance if the non-inked path extents are desired.

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

An array with the coordinates of the afected area

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • CairoContext::fill
  • CairoContext::setFillRule
  • CairoContext::fillPreserve

CairoContext::fillPreserve

cairo_fill_preserve

Fills and preserve the current path

说明

面向对象风格 (method):

public void CairoContext::fillPreserve ( void )

过程化风格:

void cairo_fill_preserve ( CairoContext $context )

A drawing operator that fills the current path according to the current CairoFillRule, (each sub-path is implicitly closed before being filled). Unlike CairoContext::fill, CairoContext::fillPreserve (Procedural cairo_fill, cairo_fill_preserve, respectively) preserves the path within the Context.

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

没有返回值。

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • CairoContext::setFillRule
  • CairoContext::fill

CairoContext::fontExtents

cairo_font_extents

Get the font extents

说明

面向对象风格 (method):

public array CairoContext::fontExtents ( void )

过程化风格:

array cairo_font_extents ( CairoContext $context )

Gets the font extents for the currently selected font.

参数

context
Description...

返回值

An array containing the font extents for the current font.

范例

示例 #1 面向对象风格

<?php

$sur = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
$con = new CairoContext($sur);

var_dump($con->fontExtents());

?>

以上例程的输出类似于:

array(5) {
  ["ascent"]=>
  float(10)
  ["descent"]=>
  float(3)
  ["height"]=>
  float(13.3125)
  ["max_x_advance"]=>
  float(26.65625)
  ["max_y_advance"]=>
  float(0)
}

示例 #2 过程化风格

<?php

$sur = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
$con = cairo_create($sur);

var_dump(cairo_font_extents($con));

?>

以上例程的输出类似于:

array(5) {
  ["ascent"]=>
  float(10)
  ["descent"]=>
  float(3)
  ["height"]=>
  float(13.3125)
  ["max_x_advance"]=>
  float(26.65625)
  ["max_y_advance"]=>
  float(0)
}

参见

  • Classname::Method

CairoContext::getAntialias

cairo_get_antialias

Retrieves the current antialias mode

说明

面向对象风格 (method):

public int CairoContext::getAntialias ( void )

过程化风格:

int cairo_get_antialias ( CairoContext $context )

Returns the current CairoAntialias mode, as set by CairoContext::setAntialias.

参数

context
A valid CairoContext object created with CairoContext::__construct or cairo_create

返回值

The current CairoAntialias mode.

范例

示例 #1 面向对象风格

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
$context = new CairoContext($surface);

$context->setAntialias(CairoAntialias::MODE_SUBPIXEL);

var_dump($context->getAntialias());

?>

以上例程的输出类似于:

int(3)

示例 #2 过程化风格

<?php

$sur = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
$con = cairo_create($sur);

cairo_set_antialias($con, CAIRO_ANTIALIAS_SUBPIXEL);

var_dump(cairo_get_antialias($con));

?>

以上例程的输出类似于:

int(3)

参见

  • CairoContext::setAntialias
  • CairoAntialias

CairoContext::getCurrentPoint

cairo_get_current_point

The getCurrentPoint purpose

说明

面向对象风格

public array CairoContext::getCurrentPoint ( void )

过程化风格

array cairo_get_current_point ( CairoContext $context )

Gets the current point of the current path, which is conceptually the final point reached by the path so far.

The current point is returned in the user-space coordinate system. If there is no defined current point or if cr is in an error status, x and y will both be set to 0.0. It is possible to check this in advance with CairoContext::hasCurrentPoint.

Most path construction functions alter the current point. See the following for details on how they affect the current point: CairoContext::newPath, CairoContext::newSubPath, CairoContext::appendPath, CairoContext::closePath, CairoContext::moveTo, CairoContext::lineTo, CairoContext::curveTo, CairoContext::relMoveTo, CairoContext::relLineTo, CairoContext::relCurveTo, CairoContext::arc, CairoContext::arcNegative, CairoContext::rectangle, CairoContext::textPath, CairoContext::glyphPath.

Some functions use and alter the current point but do not otherwise change current path: CairoContext::showText.

Some functions unset the current path and as a result, current point: CairoContext::fill, CairoContext::stroke.

参数

context
A valid CairoContext object.

返回值

An array containing the x (index 0) and y (index 1) coordinates of the current point.

范例

示例 #1 面向对象风格

<?php

$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);

$c->moveTo(10, 10);

var_dump($c->getCurrentPoint());

?>

以上例程的输出类似于:

array(2) {
  [0]=>
  float(10)
  [1]=>
  float(10)
}

示例 #2 过程化风格

<?php

$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);

cairo_move_to($c, 10, 10);

var_dump(cairo_get_current_point($c));

?>

以上例程的输出类似于:

array(2) {
  [0]=>
  float(10)
  [1]=>
  float(10)
}

参见

  • CairoContext::moveTo
  • CairoContext::hasCurrentPoint

CairoContext::getDash

cairo_get_dash

The getDash purpose

说明

面向对象风格 (method):

public array CairoContext::getDash ( void )

过程化风格:

array cairo_get_dash ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getDashCount

cairo_get_dash_count

The getDashCount purpose

说明

面向对象风格 (method):

public int CairoContext::getDashCount ( void )

过程化风格:

int cairo_get_dash_count ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getFillRule

cairo_get_fill_rule

The getFillRule purpose

说明

面向对象风格 (method):

public int CairoContext::getFillRule ( void )

过程化风格:

int cairo_get_fill_rule ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getFontFace

cairo_get_font_face

The getFontFace purpose

说明

面向对象风格 (method):

public void CairoContext::getFontFace ( void )

过程化风格:

void cairo_get_font_face ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getFontMatrix

cairo_get_font_matrix

The getFontMatrix purpose

说明

面向对象风格 (method):

public void CairoContext::getFontMatrix ( void )

过程化风格:

void cairo_get_font_matrix ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getFontOptions

cairo_get_font_options

The getFontOptions purpose

说明

面向对象风格 (method):

public void CairoContext::getFontOptions ( void )

过程化风格:

void cairo_get_font_options ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getGroupTarget

cairo_get_group_target

The getGroupTarget purpose

说明

面向对象风格 (method):

public void CairoContext::getGroupTarget ( void )

过程化风格:

void cairo_get_group_target ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getLineCap

cairo_get_line_cap

The getLineCap purpose

说明

面向对象风格 (method):

public int CairoContext::getLineCap ( void )

过程化风格:

int cairo_get_line_cap ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getLineJoin

cairo_get_line_join

The getLineJoin purpose

说明

面向对象风格 (method):

public int CairoContext::getLineJoin ( void )

过程化风格:

int cairo_get_line_join ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getLineWidth

cairo_get_line_width

The getLineWidth purpose

说明

面向对象风格 (method):

public float CairoContext::getLineWidth ( void )

过程化风格:

float cairo_get_line_width ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getMatrix

cairo_get_matrix

The getMatrix purpose

说明

面向对象风格 (method):

public void CairoContext::getMatrix ( void )

过程化风格:

void cairo_get_matrix ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getMiterLimit

cairo_get_miter_limit

The getMiterLimit purpose

说明

面向对象风格 (method):

public float CairoContext::getMiterLimit ( void )

过程化风格:

float cairo_get_miter_limit ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getOperator

cairo_get_operator

The getOperator purpose

说明

面向对象风格 (method):

public int CairoContext::getOperator ( void )

过程化风格:

int cairo_get_operator ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getScaledFont

cairo_get_scaled_font

The getScaledFont purpose

说明

面向对象风格 (method):

public void CairoContext::getScaledFont ( void )

过程化风格:

void cairo_get_scaled_font ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getSource

cairo_get_source

The getSource purpose

说明

面向对象风格 (method):

public void CairoContext::getSource ( void )

过程化风格:

void cairo_get_source ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getTarget

cairo_get_target

The getTarget purpose

说明

面向对象风格 (method):

public void CairoContext::getTarget ( void )

过程化风格:

void cairo_get_target ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::getTolerance

cairo_get_tolerance

The getTolerance purpose

说明

面向对象风格 (method):

public float CairoContext::getTolerance ( void )

过程化风格:

float cairo_get_tolerance ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::glyphPath

cairo_glyph_path

The glyphPath purpose

说明

面向对象风格

public void CairoContext::glyphPath ( array $glyphs )

过程化风格

void cairo_glyph_path ( CairoContext $context , array $glyphs )

Adds closed paths for the glyphs to the current path. The generated path if filled, achieves an effect similar to that of CairoContext::showGlyphs.

参数

context
A CairoContext object

glyphs
Array of glyphs

返回值

没有返回值。

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

CairoContext::hasCurrentPoint

cairo_has_current_point

The hasCurrentPoint purpose

说明

面向对象风格 (method):

public bool CairoContext::hasCurrentPoint ( void )

过程化风格:

bool cairo_has_current_point ( CairoContext $context )

Returns whether a current point is defined on the current path. See CairoContext::getCurrentPoint for details on the current point.

参数

context
A valid CairoContext object.

返回值

Whether a current point is defined

范例

示例 #1 面向对象风格

<?php

$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);

var_dump($c->hasCurrentPoint());

$c->moveTo(10, 10);

var_dump($c->hasCurrentPoint());

?>

以上例程会输出:

bool(false)
bool(true)

示例 #2 过程化风格

<?php

$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);

var_dump(cairo_has_current_point($c));

cairo_move_to($c, 10, 10);

var_dump(cairo_has_current_point($c));

?>

以上例程会输出:

bool(false)
bool(true)

参见

  • CairoContext::getCurrentPoint

CairoContext::identityMatrix

cairo_identity_matrix

The identityMatrix purpose

说明

面向对象风格 (method):

public void CairoContext::identityMatrix ( void )

过程化风格:

void cairo_identity_matrix ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::inFill

cairo_in_fill

The inFill purpose

说明

面向对象风格 (method):

public bool CairoContext::inFill ( float $x , float $y )

过程化风格:

bool cairo_in_fill ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::inStroke

cairo_in_stroke

The inStroke purpose

说明

面向对象风格 (method):

public bool CairoContext::inStroke ( float $x , float $y )

过程化风格:

bool cairo_in_stroke ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::lineTo

cairo_line_to

The lineTo purpose

说明

面向对象风格 (method):

public void CairoContext::lineTo ( float $x , float $y )

过程化风格:

void cairo_line_to ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::mask

cairo_mask

The mask purpose

说明

面向对象风格 (method):

public void CairoContext::mask ( CairoPattern $pattern )

过程化风格:

void cairo_mask ( CairoContext $context , CairoPattern $pattern )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

pattern
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::maskSurface

cairo_mask_surface

The maskSurface purpose

说明

面向对象风格 (method):

public void CairoContext::maskSurface ( CairoSurface $surface [, float $x [, float $y ]] )

过程化风格:

void cairo_mask_surface ( CairoContext $context , CairoSurface $surface [, float $x [, float $y ]] )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

surface
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::moveTo

cairo_move_to

The moveTo purpose

说明

面向对象风格 (method):

public void CairoContext::moveTo ( float $x , float $y )

过程化风格:

void cairo_move_to ( CairoContext $context , float $x , float $y )

Begin a new sub-path. After this call the current point will be (x, y).

参数

context
A valid CairoContext object.

x
The x coordinate of the new position.

y
The y coordinate of the new position

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php

$s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100);
$c = new CairoContext($s);

$c->setSourceRgb(0, 0, 0);
$c->paint();

// Move 10 pixels across, and 10 pixels down
$c->moveTo(10, 10);
$c->lineTo(90, 90);
$c->setLineWidth(2);
$c->setSourceRgb(1, 1, 1);
$c->stroke();

// Move 90 pixels across, and 10 pixels down
$c->moveTo(90, 10);
$c->lineTo(10, 90);
$c->setLineWidth(2);
$c->setSourceRgb(1, 1, 1);
$c->stroke();

$s->writeToPng(dirname(__FILE__) . '/CairoContext_moveTo.png');
?>

以上例程的输出类似于:

...

示例 #2 过程化风格

<?php

$s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100);
$c = cairo_create($s);

cairo_set_source_rgb($c, 0, 0, 0);
cairo_paint($c);

// Move 10 pixels across, and 10 pixels down
cairo_move_to($c, 10, 10);
cairo_line_to($c, 90, 90);
cairo_set_line_width($c, 2);
cairo_set_source_rgb($c, 1, 1, 1);
cairo_stroke($c);

// Move 90 pixels across, and 10 pixels down
cairo_move_to($c, 90, 10);
cairo_line_to($c, 10, 90);
cairo_set_line_width($c, 2);
cairo_set_source_rgb($c, 1, 1, 1);
cairo_stroke($c);

cairo_surface_write_to_png($s, dirname(__FILE__) . '/cairo_move_to.png');
?>

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::newPath

cairo_new_path

The newPath purpose

说明

面向对象风格 (method):

public void CairoContext::newPath ( void )

过程化风格:

void cairo_new_path ( CairoContext $context )

Clears the current path. After this call there will be no path and no current point.

参数

context
A valid CairoContext object.

返回值

没有返回值。

范例

示例 #1 面向对象风格

<?php
// [...]
CairoContext::newPath();
?>

示例 #2 过程化风格

<?php
// [...]
cairo_new_path($context);
?>

参见

  • CairoContext::appendPath
  • CairoContext::closePath

CairoContext::newSubPath

cairo_new_sub_path

The newSubPath purpose

说明

面向对象风格 (method):

public void CairoContext::newSubPath ( void )

过程化风格:

void cairo_new_sub_path ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::paint

cairo_paint

The paint purpose

说明

面向对象风格 (method):

public void CairoContext::paint ( void )

过程化风格:

void cairo_paint ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::paintWithAlpha

cairo_paint_with_alpha

The paintWithAlpha purpose

说明

面向对象风格 (method):

public void CairoContext::paintWithAlpha ( float $alpha )

过程化风格:

void cairo_paint_with_alpha ( CairoContext $context , float $alpha )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

alpha
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::pathExtents

cairo_path_extents

The pathExtents purpose

说明

面向对象风格 (method):

public array CairoContext::pathExtents ( void )

过程化风格:

array cairo_path_extents ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::popGroup

cairo_pop_group

The popGroup purpose

说明

面向对象风格 (method):

public void CairoContext::popGroup ( void )

过程化风格:

void cairo_pop_group ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::popGroupToSource

cairo_pop_group_to_source

The popGroupToSource purpose

说明

面向对象风格 (method):

public void CairoContext::popGroupToSource ( void )

过程化风格:

void cairo_pop_group_to_source ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::pushGroup

cairo_push_group

The pushGroup purpose

说明

面向对象风格 (method):

public void CairoContext::pushGroup ( void )

过程化风格:

void cairo_push_group ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::pushGroupWithContent

cairo_push_group_with_content

The pushGroupWithContent purpose

说明

面向对象风格 (method):

public void CairoContext::pushGroupWithContent ( int $content )

过程化风格:

void cairo_push_group_with_content ( CairoContext $context , int $content )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

content
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::rectangle

cairo_rectangle

The rectangle purpose

说明

面向对象风格 (method):

public void CairoContext::rectangle ( float $x , float $y , float $width , float $height )

过程化风格:

void cairo_rectangle ( CairoContext $context , float $x , float $y , float $width , float $height )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::relCurveTo

cairo_rel_curve_to

The relCurveTo purpose

说明

面向对象风格 (method):

public void CairoContext::relCurveTo ( float $x1 , float $y1 , float $x2 , float $y2 , float $x3 , float $y3 )

过程化风格:

void cairo_rel_curve_to ( CairoContext $context , float $x1 , float $y1 , float $x2 , float $y2 , float $x3 , float $y3 )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x1
Description...

y1
Description...

x2
Description...

y2
Description...

x3
Description...

y3
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::relLineTo

cairo_rel_line_to

The relLineTo purpose

说明

面向对象风格 (method):

public void CairoContext::relLineTo ( float $x , float $y )

过程化风格:

void cairo_rel_line_to ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::relMoveTo

cairo_rel_move_to

The relMoveTo purpose

说明

面向对象风格 (method):

public void CairoContext::relMoveTo ( float $x , float $y )

过程化风格:

void cairo_rel_move_to ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::resetClip

cairo_reset_clip

The resetClip purpose

说明

面向对象风格 (method):

public void CairoContext::resetClip ( void )

过程化风格:

void cairo_reset_clip ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::restore

cairo_restore

The restore purpose

说明

面向对象风格 (method):

public void CairoContext::restore ( void )

过程化风格:

void cairo_restore ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::rotate

cairo_rotate

The rotate purpose

说明

面向对象风格 (method):

public void CairoContext::rotate ( float $angle )

过程化风格:

void cairo_rotate ( CairoContext $context , float $angle )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

angle
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::save

cairo_save

The save purpose

说明

面向对象风格 (method):

public void CairoContext::save ( void )

过程化风格:

void cairo_save ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::scale

cairo_scale

The scale purpose

说明

面向对象风格 (method):

public void CairoContext::scale ( float $x , float $y )

过程化风格:

void cairo_scale ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::selectFontFace

cairo_select_font_face

The selectFontFace purpose

说明

面向对象风格 (method):

public void CairoContext::selectFontFace ( string $family [, int $slant [, int $weight ]] )

过程化风格:

void cairo_select_font_face ( CairoContext $context , string $family [, int $slant [, int $weight ]] )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

family
Description...

slant
Description...

weight
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setAntialias

cairo_set_antialias

The setAntialias purpose

说明

面向对象风格 (method):

public void CairoContext::setAntialias ([ int $antialias ] )

过程化风格:

void cairo_set_antialias ( CairoContext $context [, int $antialias ] )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

antialias
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setDash

cairo_set_dash

The setDash purpose

说明

面向对象风格 (method):

public void CairoContext::setDash ( array $dashes [, float $offset ] )

过程化风格:

void cairo_set_dash ( CairoContext $context , array $dashes [, float $offset ] )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

dashes
Description...

offset
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setFillRule

cairo_set_fill_rule

The setFillRule purpose

说明

面向对象风格 (method):

public void CairoContext::setFillRule ( int $setting )

过程化风格:

void cairo_set_fill_rule ( CairoContext $context , int $setting )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

setting
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setFontFace

cairo_set_font_face

The setFontFace purpose

说明

面向对象风格 (method):

public void CairoContext::setFontFace ( CairoFontFace $fontface )

过程化风格:

void cairo_set_font_face ( CairoContext $context , CairoFontFace $fontface )

Sets the font-face for a given context.

参数

context
A CairoContext object to change the font-face for.

fontface
A CairoFontFace object

返回值

No value is returned

范例

示例 #1 面向对象风格

<?php
// New surface with white background
$s = new CairoImageSurface(CairoFormat::ARGB32, 300, 100);
$c = new CairoContext($s);
$c->setSourceRgb(1, 1, 1);
$c->paint();

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

示例 #2 过程化风格

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

参见

  • CairoContext::setFontSize
  • CairoContext::showText

CairoContext::setFontMatrix

cairo_set_font_matrix

The setFontMatrix purpose

说明

面向对象风格 (method):

public void CairoContext::setFontMatrix ( CairoMatrix $matrix )

过程化风格:

void cairo_set_font_matrix ( CairoContext $context , CairoMatrix $matrix )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

matrix
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setFontOptions

cairo_set_font_options

The setFontOptions purpose

说明

面向对象风格 (method):

public void CairoContext::setFontOptions ( CairoFontOptions $fontoptions )

过程化风格:

void cairo_set_font_options ( CairoContext $context , CairoFontOptions $fontoptions )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

fontoptions
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setFontSize

cairo_set_font_size

The setFontSize purpose

说明

面向对象风格 (method):

public void CairoContext::setFontSize ( float $size )

过程化风格:

void cairo_set_font_size ( CairoContext $context , float $size )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

size
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setLineCap

cairo_set_line_cap

The setLineCap purpose

说明

面向对象风格 (method):

public void CairoContext::setLineCap ( int $setting )

过程化风格:

void cairo_set_line_cap ( CairoContext $context , int $setting )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

setting
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setLineJoin

cairo_set_line_join

The setLineJoin purpose

说明

面向对象风格 (method):

public void CairoContext::setLineJoin ( int $setting )

过程化风格:

void cairo_set_line_join ( CairoContext $context , int $setting )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

setting
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setLineWidth

cairo_set_line_width

The setLineWidth purpose

说明

面向对象风格 (method):

public void CairoContext::setLineWidth ( float $width )

过程化风格:

void cairo_set_line_width ( CairoContext $context , float $width )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

width
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setMatrix

cairo_set_matrix

The setMatrix purpose

说明

面向对象风格 (method):

public void CairoContext::setMatrix ( CairoMatrix $matrix )

过程化风格:

void cairo_set_matrix ( CairoContext $context , CairoMatrix $matrix )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

matrix
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setMiterLimit

cairo_set_miter_limit

The setMiterLimit purpose

说明

面向对象风格 (method):

public void CairoContext::setMiterLimit ( float $limit )

过程化风格:

void cairo_set_miter_limit ( CairoContext $context , float $limit )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

limit
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setOperator

cairo_set_operator

The setOperator purpose

说明

面向对象风格 (method):

public void CairoContext::setOperator ( int $setting )

过程化风格:

void cairo_set_operator ( CairoContext $context , int $setting )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

setting
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setScaledFont

cairo_set_scaled_font

The setScaledFont purpose

说明

面向对象风格 (method):

public void CairoContext::setScaledFont ( CairoScaledFont $scaledfont )

过程化风格:

void cairo_set_scaled_font ( CairoContext $context , CairoScaledFont $scaledfont )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

scaledfont
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setSource

cairo_set_source

The setSource purpose

说明

面向对象风格 (method):

public void CairoContext::setSource ( CairoPattern $pattern )

过程化风格:

void cairo_set_source ( CairoContext $context , CairoPattern $pattern )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

pattern
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setSourceRGB

cairo_set_source

The setSourceRGB purpose

说明

面向对象风格 (method):

public void CairoContext::setSourceRGB ( float $red , float $green , float $blue )

过程化风格:

void cairo_set_source ( CairoContext $context , float $red , float $green , float $blue )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

red
Description...

green
Description...

blue
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setSourceRGBA

cairo_set_source

The setSourceRGBA purpose

说明

面向对象风格 (method):

public void CairoContext::setSourceRGBA ( float $red , float $green , float $blue , float $alpha )

过程化风格:

void cairo_set_source ( CairoContext $context , float $red , float $green , float $blue , float $alpha )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

red
Description...

green
Description...

blue
Description...

alpha
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setSourceSurface

cairo_set_source_surface

The setSourceSurface purpose

说明

面向对象风格 (method):

public void CairoContext::setSourceSurface ( CairoSurface $surface [, float $x [, float $y ]] )

过程化风格:

void cairo_set_source_surface ( CairoContext $context , CairoSurface $surface [, float $x [, float $y ]] )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

surface
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::setTolerance

cairo_set_tolerance

The setTolerance purpose

说明

面向对象风格 (method):

public void CairoContext::setTolerance ( float $tolerance )

过程化风格:

void cairo_set_tolerance ( CairoContext $context , float $tolerance )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

tolerance
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::showPage

cairo_show_page

The showPage purpose

说明

面向对象风格 (method):

public void CairoContext::showPage ( void )

过程化风格:

void cairo_show_page ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::showText

cairo_show_text

The showText purpose

说明

面向对象风格 (method):

public void CairoContext::showText ( string $text )

过程化风格:

void cairo_show_text ( CairoContext $context , string $text )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

text
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::status

cairo_status

The status purpose

说明

面向对象风格 (method):

public int CairoContext::status ( void )

过程化风格:

int cairo_status ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::stroke

cairo_stroke

The stroke purpose

说明

面向对象风格 (method):

public void CairoContext::stroke ( void )

过程化风格:

void cairo_stroke ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::strokeExtents

cairo_stroke_extents

The strokeExtents purpose

说明

面向对象风格 (method):

public array CairoContext::strokeExtents ( void )

过程化风格:

array cairo_stroke_extents ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::strokePreserve

cairo_stroke_preserve

The strokePreserve purpose

说明

面向对象风格 (method):

public void CairoContext::strokePreserve ( void )

过程化风格:

void cairo_stroke_preserve ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::textExtents

cairo_text_extents

The textExtents purpose

说明

面向对象风格 (method):

public array CairoContext::textExtents ( string $text )

过程化风格:

array cairo_text_extents ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

text
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::textPath

cairo_text_path

The textPath purpose

说明

面向对象风格

public void CairoContext::textPath ( string $string )

过程化风格

void cairo_text_path ( CairoContext $context , string $text )

Adds closed paths for text to the current path. The generated path, if filled, achieves an effect similar to that of CairoContext::showText.

Text conversion and positioning is done similar to CairoContext::showText.

Like CairoContext::showText, after this call the current point is moved to the origin of where the next glyph would be placed in this same progression. That is, the current point will be at the origin of the final glyph offset by its advance values. This allows for chaining multiple calls to CairoContext::showText without having to set current point in between.

Note: The CairoContext::textPath function call is part of what the cairo designers call the "toy" text API. It is convenient for short demos and simple programs, but it is not expected to be adequate for serious text-using applications. See CairoContext::glyphPath for the "real" text path API in cairo.

参数

context
A CairoContext object

text
Description...

string
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::transform

cairo_transform

The transform purpose

说明

面向对象风格 (method):

public void CairoContext::transform ( CairoMatrix $matrix )

过程化风格:

void cairo_transform ( CairoContext $context , CairoMatrix $matrix )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

matrix
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::translate

cairo_translate

The translate purpose

说明

面向对象风格 (method):

public void CairoContext::translate ( float $x , float $y )

过程化风格:

void cairo_translate ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::userToDevice

cairo_user_to_device

The userToDevice purpose

说明

面向对象风格 (method):

public array CairoContext::userToDevice ( float $x , float $y )

过程化风格:

array cairo_user_to_device ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoContext::userToDeviceDistance

cairo_user_to_device_distance

The userToDeviceDistance purpose

说明

面向对象风格 (method):

public array CairoContext::userToDeviceDistance ( float $x , float $y )

过程化风格:

array cairo_user_to_device_distance ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

Exception class thrown by Cairo functions and methods

类摘要

CairoException

class CairoException extends Exception {

/* 继承的属性 */

protected string $message ;

protected int $code ;

protected string $file ;

protected int $line ;

/* 继承的方法 */

final public string Exception::getMessage ( void )

final public Throwable Exception::getPrevious ( void )

final public int Exception::getCode ( void )

final public string Exception::getFile ( void )

final public int Exception::getLine ( void )

final public array Exception::getTrace ( void )

final public string Exception::getTraceAsString ( void )

public string Exception::__toString ( void )

final private void Exception::__clone ( void )

}

简介

CairoStatus is used to indicate errors that can occur when using Cairo. In some cases it is returned directly by functions. but when using CairoContext, the last error, if any, is stored in the object and can be retrieved with CairoContext::status or cairo_status. New entries may be added in future versions.

Use Cairo::statusToString or cairo_status_to_string to get a human-readable representation of an error message.

类摘要

CairoStatus

class CairoStatus {

/* 常量 */

const integer CairoStatus::SUCCESS = 0 ;

const integer CairoStatus::NO_MEMORY = 1 ;

const integer CairoStatus::INVALID_RESTORE = 2 ;

const integer CairoStatus::INVALID_POP_GROUP = 3 ;

const integer CairoStatus::NO_CURRENT_POINT = 4 ;

const integer CairoStatus::INVALID_MATRIX = 5 ;

const integer CairoStatus::INVALID_STATUS = 6 ;

const integer CairoStatus::NULL_POINTER = 7 ;

const integer CairoStatus::INVALID_STRING = 8 ;

const integer CairoStatus::INVALID_PATH_DATA = 9 ;

const integer CairoStatus::READ_ERROR = 10 ;

const integer CairoStatus::WRITE_ERROR = 11 ;

const integer CairoStatus::SURFACE_FINISHED = 12 ;

const integer CairoStatus::SURFACE_TYPE_MISMATCH = 13 ;

const integer CairoStatus::PATTERN_TYPE_MISMATCH = 14 ;

const integer CairoStatus::INVALID_CONTENT = 15 ;

const integer CairoStatus::INVALID_FORMAT = 16 ;

const integer CairoStatus::INVALID_VISUAL = 17 ;

const integer CairoStatus::FILE_NOT_FOUND = 18 ;

const integer CairoStatus::INVALID_DASH = 19 ;

const integer CairoStatus::INVALID_DSC_COMMENT = 20 ;

const integer CairoStatus::INVALID_INDEX = 21 ;

const integer CairoStatus::CLIP_NOT_REPRESENTABLE = 22 ;

const integer CairoStatus::TEMP_FILE_ERROR = 23 ;

const integer CairoStatus::INVALID_STRIDE = 24 ;

}

预定义常量

CairoStatus::SUCCESS
No error has occurred

CairoStatus::NO_MEMORY
Out of memory

CairoStatus::INVALID_RESTORE
cairo_restore called without matching cairo_save

CairoStatus::INVALID_POP_GROUP
No saved group to pop

CairoStatus::NO_CURRENT_POINT
No current point defined

CairoStatus::INVALID_MATRIX
Invalid matrix (not invertible)

CairoStatus::INVALID_STATUS
Invalid value for an input CairoStatus>

CairoStatus::NULL_POINTER
Null pointer

CairoStatus::INVALID_STRING
Input string not valid UTF-8 string

CairoStatus::INVALID_PATH_DATA
Input path data not valid

CairoStatus::READ_ERROR
Error while reading from input stream

CairoStatus::WRITE_ERROR
Error while writing to output stream

CairoStatus::SURFACE_FINISHED
Target surface has been finished

CairoStatus::SURFACE_TYPE_MISMATCH
The surface type is not appropriate for the operation

CairoStatus::PATTERN_TYPE_MISMATCH
The pattern type is not appropriate for the operation

CairoStatus::INVALID_CONTENT
Invalid value for an input CairoContent

CairoStatus::INVALID_FORMAT
Invalid value for an input CairoFormat

CairoStatus::INVALID_VISUAL
Invalid value for an input Visual

CairoStatus::FILE_NOT_FOUND
File not found

CairoStatus::INVALID_DASH
Invalid value for a dash setting

CairoStatus::INVALID_DSC_COMMENT
Invalid value for a DSC comment

CairoStatus::INVALID_INDEX
Invalid index passed to getter

CairoStatus::CLIP_NOT_REPRESENTABLE
Clip region not representable in desired format

CairoStatus::TEMP_FILE_ERROR
Error creating or writing to a temporary file

CairoStatus::INVALID_STRIDE
Invalid value for CairoStride

简介

This is the base-class for all other Surface types. CairoSurface is the abstract type representing all different drawing targets that cairo can render to. The actual drawings are performed using a CairoContext.

类摘要

CairoSurface

class CairoSurface {

/* 方法 */

public __construct ( void )

public void copyPage ( void )

public void createSimilar ( CairoSurface $other , int $content , string $width , string $height )

public void finish ( void )

public void flush ( void )

public int getContent ( void )

public array getDeviceOffset ( void )

public void getFontOptions ( void )

public int getType ( void )

public void markDirty ( void )

public void markDirtyRectangle ( float $x , float $y , float $width , float $height )

public void setDeviceOffset ( float $x , float $y )

public void setFallbackResolution ( float $x , float $y )

public void showPage ( void )

public int status ( void )

public void writeToPng ( string $file )

}

CairoSurface::__construct

The __construct purpose

说明

public CairoSurface::__construct ( void )

CairoSurface is an abstract type and, as such, should not be instantiated in your PHP scripts.

参数

此函数没有参数。

返回值

No return value

注释

Note:

If you're using a PHP version before 5.3, you must destroy the class="classname">CairoContext associated with a class="classname">CairoSurface after you destroy the CairoSurface. Otherwise, you're left with a Circular-reference memory leak.

参见

  • CairoImageSurface::__construct

CairoSurface::copyPage

cairo_copy_page

The copyPage purpose

说明

面向对象风格 (method):

public void CairoSurface::copyPage ( void )

过程化风格:

void cairo_copy_page ( CairoContext $context )

Emits the current page for backends that support multiple pages, but doesn't clear it, so that the contents of the current page will be retained for the next page. Use CairoSurface::showPage() if you want to get an empty page after the emission.

参数

context
A CairoContext object

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::createSimilar

The createSimilar purpose

说明

public void CairoSurface::createSimilar ( CairoSurface $other , int $content , string $width , string $height )

Create a new surface that is as compatible as possible with an existing surface. For example the new surface will have the same fallback resolution and font options as other. Generally, the new surface will also use the same backend as other, unless that is not possible for some reason. The type of the returned surface may be examined with CairoSurface::getType(). Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

参数

other
An existing surface used to select the backend of the new surface

content
The content for the new surface. See the CairoContent class for possible values.

width
Width of the new surface, (in device-space units).

height
Height of the new surface, (in device-space units).

返回值

A new CairoSurface

范例

示例 #1 CairoSurface::createSimilar example

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

以上例程的输出类似于:

...

参见

  • CairoContent

CairoSurface::finish

The finish purpose

说明

public void CairoSurface::finish ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurface::finish example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::flush

The flush purpose

说明

public void CairoSurface::flush ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurface::flush example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::getContent

The getContent purpose

说明

public int CairoSurface::getContent ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurface::getContent example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::getDeviceOffset

The getDeviceOffset purpose

说明

public array CairoSurface::getDeviceOffset ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurface::getDeviceOffset example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::getFontOptions

cairo_get_font_options

The getFontOptions purpose

说明

面向对象风格 (method):

public void CairoSurface::getFontOptions ( void )

过程化风格:

void cairo_get_font_options ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::getType

The getType purpose

说明

public int CairoSurface::getType ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurface::getType example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::markDirty

The markDirty purpose

说明

public void CairoSurface::markDirty ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurface::markDirty example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::markDirtyRectangle

The markDirtyRectangle purpose

说明

public void CairoSurface::markDirtyRectangle ( float $x , float $y , float $width , float $height )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

x
Description...

y
Description...

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 CairoSurface::markDirtyRectangle example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::setDeviceOffset

The setDeviceOffset purpose

说明

public void CairoSurface::setDeviceOffset ( float $x , float $y )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 CairoSurface::setDeviceOffset example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::setFallbackResolution

The setFallbackResolution purpose

说明

public void CairoSurface::setFallbackResolution ( float $x , float $y )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

x
Description...

y
Description...

返回值

Description...

范例

示例 #1 CairoSurface::setFallbackResolution example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::showPage

cairo_show_page

The showPage purpose

说明

面向对象风格 (method):

public void CairoSurface::showPage ( void )

过程化风格:

void cairo_show_page ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::status

cairo_status

The status purpose

说明

面向对象风格 (method):

public int CairoSurface::status ( void )

过程化风格:

int cairo_status ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurface::writeToPng

The writeToPng purpose

说明

public void CairoSurface::writeToPng ( string $file )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

file
Description...

返回值

Description...

范例

示例 #1 CairoSurface::writeToPng example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

Svg specific surface class, uses the SVG (standard vector graphics) surface backend.

类摘要

CairoSvgSurface

class CairoSvgSurface extends CairoSurface {

/* 方法 */

public __construct ( string $file , float $width , float $height )

public static array getVersions ( void )

public void restrictToVersion ( int $version )

public static string versionToString ( int $version )

/* 继承的方法 */

public CairoSurface::__construct ( void )

public void CairoSurface::copyPage ( void )

public void CairoSurface::createSimilar ( CairoSurface $other , int $content , string $width , string $height )

public void CairoSurface::finish ( void )

public void CairoSurface::flush ( void )

public int CairoSurface::getContent ( void )

public array CairoSurface::getDeviceOffset ( void )

public void CairoSurface::getFontOptions ( void )

public int CairoSurface::getType ( void )

public void CairoSurface::markDirty ( void )

public void CairoSurface::markDirtyRectangle ( float $x , float $y , float $width , float $height )

public void CairoSurface::setDeviceOffset ( float $x , float $y )

public void CairoSurface::setFallbackResolution ( float $x , float $y )

public void CairoSurface::showPage ( void )

public int CairoSurface::status ( void )

public void CairoSurface::writeToPng ( string $file )

}

CairoSvgSurface::__construct

The __construct purpose

说明

public CairoSvgSurface::__construct ( string $file , float $width , float $height )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

file
Description...

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 CairoSvgSurface::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSvgSurface::getVersions

cairo_svg_surface_get_versions

Used to retrieve a list of supported SVG versions

说明

面向对象风格 (method):

public static array CairoSvgSurface::getVersions ( void )

过程化风格:

array cairo_svg_get_versions ( void )

Returns a numerically indexed array of currently available CairoSvgVersion constants. In order to retrieve the string values for each item, use CairoSvgSurface::versionToString.

参数

此函数没有参数。

返回值

Returns a numerically indexed array of integer values.

范例

示例 #1 CairoSvgSurface::getVersions example

<?php
/* Grab our list of versions */
$versions = CairoSvgSurface::getVersions();
var_dump($versions);

/* echo the string name of each version */
foreach($versions as $id) {
    echo CairoSvgSurface::versionToString($id), PHP_EOL;
}
?>

以上例程的输出类似于:

array(2) {
  [0]=>
  int(0)
  [1]=>
  int(1)
}
SVG 1.1
SVG 1.2

示例 #2 过程化风格

<?php
/* Grab our list of versions */
$versions = cairo_svg_surface_get_versions();
var_dump($versions);

/* echo the string name of each version */
foreach($versions as $id) {
    echo cairo_svg_surface_version_to_string($id), PHP_EOL;
}
?>

以上例程的输出类似于:

array(2) {
  [0]=>
  int(0)
  [1]=>
  int(1)
}
SVG 1.1
SVG 1.2

参见

  • CairoSvgSurface::versionToString

CairoSvgSurface::restrictToVersion

The restrictToVersion purpose

说明

public void CairoSvgSurface::restrictToVersion ( int $version )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

version
Description...

返回值

Description...

范例

示例 #1 CairoSvgSurface::restrictToVersion example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSvgSurface::versionToString

The versionToString purpose

说明

public static string CairoSvgSurface::versionToString ( int $version )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

version
Description...

返回值

Description...

范例

示例 #1 CairoSvgSurface::versionToString example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

CairoImageSurface provide the ability to render to memory buffers either allocated by cairo or by the calling code. The supported image formats are those defined in CairoFormat.

类摘要

CairoImageSurface

class CairoImageSurface extends CairoSurface {

/* 方法 */

public __construct ( int $format , int $width , int $height )

public static void createForData ( string $data , int $format , int $width , int $height )

public static CairoImageSurface createFromPng ( string $file )

public string getData ( void )

public int getFormat ( void )

public int getHeight ( void )

public int getStride ( void )

public int getWidth ( void )

/* 继承的方法 */

public CairoSurface::__construct ( void )

public void CairoSurface::copyPage ( void )

public void CairoSurface::createSimilar ( CairoSurface $other , int $content , string $width , string $height )

public void CairoSurface::finish ( void )

public void CairoSurface::flush ( void )

public int CairoSurface::getContent ( void )

public array CairoSurface::getDeviceOffset ( void )

public void CairoSurface::getFontOptions ( void )

public int CairoSurface::getType ( void )

public void CairoSurface::markDirty ( void )

public void CairoSurface::markDirtyRectangle ( float $x , float $y , float $width , float $height )

public void CairoSurface::setDeviceOffset ( float $x , float $y )

public void CairoSurface::setFallbackResolution ( float $x , float $y )

public void CairoSurface::showPage ( void )

public int CairoSurface::status ( void )

public void CairoSurface::writeToPng ( string $file )

}

CairoImageSurface::__construct

Creates a new CairoImageSurface

说明

public CairoImageSurface::__construct ( int $format , int $width , int $height )

Creates a new CairoImageSuface object of type format

参数

format
Can be any defined in CairoFormat

width
The width of the image surface

height
The height of the image surface

返回值

A new CairoImageSurface

范例

示例 #1 CairoImageSurface::__construct example

<?php

// Creates a image with ARGB32 format of 50 width and 50 height
$surface = new CairoImageSurface(CairoFormat::ARGB32, 50,50);

?>

参见

  • CairoContext::__construct

CairoImageSurface::createForData

The createForData purpose

说明

public static void CairoImageSurface::createForData ( string $data , int $format , int $width , int $height )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

data
Description...

format
Description...

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 CairoImageSurface::createForData example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoImageSurface::createFromPng

Creates a new CairoImageSurface form a png image file

说明

public static CairoImageSurface CairoImageSurface::createFromPng ( string $file )

Creates a new CairoImageSurface form a png image file

This method should be called static

参数

file
Path to PNG image file

返回值

CairoImageSurface object

范例

示例 #1 CairoImageSurface::createFromPng example

<?php

$surface = CairoImageSurface::createFromPng('/path/to/image/file.png');

?>

以上例程的输出类似于:

...

参见

  • CairoImageSurface::__construct

CairoImageSurface::getData

Gets the image data as string

说明

public string CairoImageSurface::getData ( void )

Returns the image data of this surface or NULL if surface is not an image surface, or if CairoContext::finish, procedural : cairo_surface_finish, has been called.

参数

此函数没有参数。

返回值

The image data as string

范例

示例 #1 CairoImageSurface::getData example

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

以上例程的输出类似于:

...

参见

  • CairoImageSurface::getStride

CairoImageSurface::getFormat

Get the image format

说明

public int CairoImageSurface::getFormat ( void )

Retrieves the image format, as one of the CairoFormat defined

参数

此函数没有参数。

返回值

One of the CairoFormat enums

范例

示例 #1 CairoImageSurface::getFormat example

<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

var_dump($surface->getFormat()); // 0

$surface2 = new CairoImageSurface(CairoFormat::A8, 50, 50);

var_dump($surface2->getFormat()); // 2

?>

以上例程的输出类似于:

int(0)
int(2)

参见

  • CairoImageSurface::getHeight
  • CairoImageSurface::getWidth

CairoImageSurface::getHeight

Retrieves the height of the CairoImageSurface

说明

public int CairoImageSurface::getHeight ( void )

This methods returns the CairoImageSurface height.

参数

此函数没有参数。

返回值

CairoImageSurface object height

范例

示例 #1 CairoImageSurface::getHeight example

<?php
// creates a new image surface
$surface = new CairoImageSurface(CairoFormat::ARGB32, 80, 50);

//gets the height
var_dump($surface->getHeight());

?>

以上例程的输出类似于:

int(50)

参见

  • CairoImageSurface::getWidth

CairoImageSurface::getStride

The getStride purpose

说明

public int CairoImageSurface::getStride ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoImageSurface::getStride example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoImageSurface::getWidth

Retrieves the width of the CairoImageSurface

说明

public int CairoImageSurface::getWidth ( void )

Gets the width of the CairoImageSurface

参数

此函数没有参数。

返回值

Returns the width of the CairoImageSurface object

范例

示例 #1 CairoImageSurface::getWidth example

<?php
// creates a new image surface
$surface = new CairoImageSurface(CairoFormat::ARGB32, 80, 50);

//gets the width
var_dump($surface->getWidth());

?>

以上例程的输出类似于:

int(80)

参见

  • CairoImageSurface::getHeight

简介

类摘要

CairoPdfSurface

class CairoPdfSurface extends CairoSurface {

/* 方法 */

public __construct ( string $file , float $width , float $height )

public void setSize ( float $width , float $height )

/* 继承的方法 */

public CairoSurface::__construct ( void )

public void CairoSurface::copyPage ( void )

public void CairoSurface::createSimilar ( CairoSurface $other , int $content , string $width , string $height )

public void CairoSurface::finish ( void )

public void CairoSurface::flush ( void )

public int CairoSurface::getContent ( void )

public array CairoSurface::getDeviceOffset ( void )

public void CairoSurface::getFontOptions ( void )

public int CairoSurface::getType ( void )

public void CairoSurface::markDirty ( void )

public void CairoSurface::markDirtyRectangle ( float $x , float $y , float $width , float $height )

public void CairoSurface::setDeviceOffset ( float $x , float $y )

public void CairoSurface::setFallbackResolution ( float $x , float $y )

public void CairoSurface::showPage ( void )

public int CairoSurface::status ( void )

public void CairoSurface::writeToPng ( string $file )

}

CairoPdfSurface::__construct

The __construct purpose

说明

public CairoPdfSurface::__construct ( string $file , float $width , float $height )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

file
Description...

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 CairoPdfSurface::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPdfSurface::setSize

The setSize purpose

说明

public void CairoPdfSurface::setSize ( float $width , float $height )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 CairoPdfSurface::setSize example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

类摘要

CairoPsSurface

class CairoPsSurface extends CairoSurface {

/* 方法 */

public __construct ( string $file , float $width , float $height )

public void dscBeginPageSetup ( void )

public void dscBeginSetup ( void )

public void dscComment ( string $comment )

public bool getEps ( void )

public static array getLevels ( void )

public static string levelToString ( int $level )

public void restrictToLevel ( int $level )

public void setEps ( bool $level )

public void setSize ( float $width , float $height )

/* 继承的方法 */

public CairoSurface::__construct ( void )

public void CairoSurface::copyPage ( void )

public void CairoSurface::createSimilar ( CairoSurface $other , int $content , string $width , string $height )

public void CairoSurface::finish ( void )

public void CairoSurface::flush ( void )

public int CairoSurface::getContent ( void )

public array CairoSurface::getDeviceOffset ( void )

public void CairoSurface::getFontOptions ( void )

public int CairoSurface::getType ( void )

public void CairoSurface::markDirty ( void )

public void CairoSurface::markDirtyRectangle ( float $x , float $y , float $width , float $height )

public void CairoSurface::setDeviceOffset ( float $x , float $y )

public void CairoSurface::setFallbackResolution ( float $x , float $y )

public void CairoSurface::showPage ( void )

public int CairoSurface::status ( void )

public void CairoSurface::writeToPng ( string $file )

}

CairoPsSurface::__construct

The __construct purpose

说明

public CairoPsSurface::__construct ( string $file , float $width , float $height )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

file
Description...

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 CairoPsSurface::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::dscBeginPageSetup

The dscBeginPageSetup purpose

说明

public void CairoPsSurface::dscBeginPageSetup ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoPsSurface::dscBeginPageSetup example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::dscBeginSetup

The dscBeginSetup purpose

说明

public void CairoPsSurface::dscBeginSetup ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoPsSurface::dscBeginSetup example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::dscComment

The dscComment purpose

说明

public void CairoPsSurface::dscComment ( string $comment )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

comment
Description...

返回值

Description...

范例

示例 #1 CairoPsSurface::dscComment example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::getEps

The getEps purpose

说明

public bool CairoPsSurface::getEps ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoPsSurface::getEps example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::getLevels

The getLevels purpose

说明

public static array CairoPsSurface::getLevels ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoPsSurface::getLevels example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::levelToString

The levelToString purpose

说明

public static string CairoPsSurface::levelToString ( int $level )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

level
Description...

返回值

Description...

范例

示例 #1 CairoPsSurface::levelToString example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::restrictToLevel

The restrictToLevel purpose

说明

public void CairoPsSurface::restrictToLevel ( int $level )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

level
Description...

返回值

Description...

范例

示例 #1 CairoPsSurface::restrictToLevel example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::setEps

The setEps purpose

说明

public void CairoPsSurface::setEps ( bool $level )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

level
Description...

返回值

Description...

范例

示例 #1 CairoPsSurface::setEps example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPsSurface::setSize

The setSize purpose

说明

public void CairoPsSurface::setSize ( float $width , float $height )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

width
Description...

height
Description...

返回值

Description...

范例

示例 #1 CairoPsSurface::setSize example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

类摘要

CairoSurfaceType

class CairoSurfaceType {

/* 常量 */

const integer CairoSurfaceType::IMAGE = 0 ;

const integer CairoSurfaceType::PDF = 1 ;

const integer CairoSurfaceType::PS = 2 ;

const integer CairoSurfaceType::XLIB = 3 ;

const integer CairoSurfaceType::XCB = 4 ;

const integer CairoSurfaceType::GLITZ = 5 ;

const integer CairoSurfaceType::QUARTZ = 6 ;

const integer CairoSurfaceType::WIN32 = 7 ;

const integer CairoSurfaceType::BEOS = 8 ;

const integer CairoSurfaceType::DIRECTFB = 9 ;

const integer CairoSurfaceType::SVG = 10 ;

const integer CairoSurfaceType::OS2 = 11 ;

const integer CairoSurfaceType::WIN32_PRINTING = 12 ;

const integer CairoSurfaceType::QUARTZ_IMAGE = 13 ;

}

预定义常量

CairoSurfaceType::IMAGE
Description here...

CairoSurfaceType::PDF
Description here...

CairoSurfaceType::PS
Description here...

CairoSurfaceType::XLIB
Description here...

CairoSurfaceType::XCB
Description here...

CairoSurfaceType::GLITZ
Description here...

CairoSurfaceType::QUARTZ
Description here...

CairoSurfaceType::WIN32
Description here...

CairoSurfaceType::BEOS
Description here...

CairoSurfaceType::DIRECTFB
Description here...

CairoSurfaceType::SVG
Description here...

CairoSurfaceType::OS2
Description here...

CairoSurfaceType::WIN32_PRINTING
Description here...

CairoSurfaceType::QUARTZ_IMAGE
Description here...

简介

CairoFontFace abstract class represents a particular font at a particular weight, slant, and other characteristic but no transformation or size.

Note: This class can not be instantiated directly, it is created by CairoContext::getFontFace or cairo_scaled_font_get_font_face.

类摘要

CairoFontFace

class CairoFontFace {

/* 方法 */

public __construct ( void )

public int getType ( void )

public int status ( void )

}

CairoFontFace::__construct

Creates a new CairoFontFace object

说明

public CairoFontFace::__construct ( void )

CairoFontFace class represents a particular font at a particular weight, slant, and other characteristic but no transformation or size.

Note: This class can't be instantiated directly it is created by CairoContext::getFontFace or cairo_scaled_font_get_font_face

参数

此函数没有参数。

返回值

CairoFontFace

范例

示例 #1 CairoFontFace::__construct example

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

以上例程的输出类似于:

...

参见

  • Class::Method

CairoFontFace::getType

cairo_font_face_get_type

Retrieves the font face type

说明

面向对象风格 (method):

public int CairoFontFace::getType ( void )

过程化风格:

int cairo_font_face_get_type ( CairoFontFace $fontface )

This function returns the type of the backend used to create a font face. See CairoFontType class constants for available types.

参数

此函数没有参数。

返回值

A font type that can be any one defined in CairoFontType

范例

示例 #1 CairoFontFace::getType example

<?php

// Creates the font face
$fontface = new CairoToyFontFace('sans-serif');

// Get the font face type
var_dump($fontface->getType());

?>

以上例程的输出类似于:

int(0)

参见

  • Classname::Method

CairoFontFace::status

cairo_font_face_status

Check for CairoFontFace errors

说明

面向对象风格 (method):

public int CairoFontFace::status ( void )

过程化风格:

int cairo_font_face_status ( CairoFontFace $fontface )

Checks whether an error has previously occurred for this font face

参数

fontface
A valid CairoFontFace object

返回值

CAIRO_STATUS_SUCCESS or another error such as CAIRO_STATUS_NO_MEMORY.

范例

示例 #1 面向对象风格

<?php

// Creates the font face
$fontface = new CairoToyFontFace('sans-serif');

// Get the font face status
var_dump($fontface->status()); // should be the value of CAIRO_STATUS_SUCCESS

?>

以上例程的输出类似于:

int(0)

示例 #2 过程化风格

<?php

// Creates the font face
$fontface = new CairoToyFontFace('sans-serif');

// Get the font face status
var_dump(cairo_font_face_status($fontface)); // should be the value of CAIRO_STATUS_SUCCESS

?>

以上例程的输出类似于:

int(0)

参见

  • Classname::Method

简介

An opaque structure holding all options that are used when rendering fonts.

Individual features of a cairo_font_options_t can be set or accessed using functions named cairo_font_options_set_feature_name and cairo_font_options_get_feature_name, like cairo_font_options_set_antialias() and cairo_font_options_get_antialias().

New features may be added to CairoFontOptions in the future. For this reason CairoFontOptions::copy, CairoFontOptions::equal, CairoFontOptions::merge, CairoFontOptions::hash (cairo_font_options_copy(), cairo_font_options_equal(), cairo_font_options_merge(), and cairo_font_options_hash() in procedural way) should be used to copy, check for equality, merge, or compute a hash value of CairoFontOptions objects.

类摘要

CairoFontOptions

class CairoFontOptions {

/* 方法 */

public __construct ( void )

public bool equal ( CairoFontOptions $other )

public int getAntialias ( void )

public int getHintMetrics ( void )

public int getHintStyle ( void )

public int getSubpixelOrder ( void )

public int hash ( void )

public void merge ( CairoFontOptions $other )

public void setAntialias ( int $antialias )

public void setHintMetrics ( int $hint_metrics )

public void setHintStyle ( int $hint_style )

public void setSubpixelOrder ( int $subpixel_order )

public int status ( void )

}

CairoFontOptions::__construct

The __construct purpose

说明

public CairoFontOptions::__construct ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoFontOptions::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::equal

The equal purpose

说明

public bool CairoFontOptions::equal ( CairoFontOptions $other )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

other
Description...

返回值

Description...

范例

示例 #1 CairoFontOptions::equal example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::getAntialias

cairo_get_antialias

The getAntialias purpose

说明

面向对象风格 (method):

public int CairoFontOptions::getAntialias ( void )

过程化风格:

int cairo_get_antialias ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::getHintMetrics

The getHintMetrics purpose

说明

public int CairoFontOptions::getHintMetrics ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoFontOptions::getHintMetrics example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::getHintStyle

The getHintStyle purpose

说明

public int CairoFontOptions::getHintStyle ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoFontOptions::getHintStyle example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::getSubpixelOrder

The getSubpixelOrder purpose

说明

public int CairoFontOptions::getSubpixelOrder ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoFontOptions::getSubpixelOrder example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::hash

The hash purpose

说明

public int CairoFontOptions::hash ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoFontOptions::hash example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::merge

The merge purpose

说明

public void CairoFontOptions::merge ( CairoFontOptions $other )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

other
Description...

返回值

Description...

范例

示例 #1 CairoFontOptions::merge example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::setAntialias

cairo_set_antialias

The setAntialias purpose

说明

面向对象风格 (method):

public void CairoFontOptions::setAntialias ( int $antialias )

过程化风格:

void cairo_set_antialias ( CairoContext $context [, int $antialias ] )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

antialias
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::setHintMetrics

The setHintMetrics purpose

说明

public void CairoFontOptions::setHintMetrics ( int $hint_metrics )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

hint_metrics
Description...

返回值

Description...

范例

示例 #1 CairoFontOptions::setHintMetrics example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::setHintStyle

The setHintStyle purpose

说明

public void CairoFontOptions::setHintStyle ( int $hint_style )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

hint_style
Description...

返回值

Description...

范例

示例 #1 CairoFontOptions::setHintStyle example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::setSubpixelOrder

The setSubpixelOrder purpose

说明

public void CairoFontOptions::setSubpixelOrder ( int $subpixel_order )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

subpixel_order
Description...

返回值

Description...

范例

示例 #1 CairoFontOptions::setSubpixelOrder example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoFontOptions::status

cairo_status

The status purpose

说明

面向对象风格 (method):

public int CairoFontOptions::status ( void )

过程化风格:

int cairo_status ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

Specifies variants of a font face based on their slant.

类摘要

CairoFontSlant

class CairoFontSlant {

/* 常量 */

const integer CairoFontSlant::NORMAL = 0 ;

const integer CairoFontSlant::ITALIC = 1 ;

const integer CairoFontSlant::OBLIQUE = 2 ;

}

预定义常量

CairoFontSlant::NORMAL
Upright font style

CairoFontSlant::ITALIC
Italic font style

CairoFontSlant::OBLIQUE
Oblique font style

简介

CairoFontType class is an abstract final class that contains constants used to describe the type of a given CairoFontFace or CairoScaledFont. The font types are also known as "font backends" within cairo.

The type of a CairoFontFace is determined by the how it is created, an example would be the CairoToyFontFace::__construct. The CairoFontFace type can be queried with CairoFontFace::getType or cairo_font_face_get_type

The various CairoFontFace functions can be used with a font face of any type.

The type of a CairoScaledFont is determined by the type of the CairoFontFace passed to CairoScaledFont::__construct or cairo_scaled_font_create. The scaled font type can be queried with CairoScaledFont::getType or cairo_scaled_font_get_type.

类摘要

CairoFontType

class CairoFontType {

/* 常量 */

const integer CairoFontType::TOY = 0 ;

const integer CairoFontType::FT = 1 ;

const integer CairoFontType::WIN32 = 2 ;

const integer CairoFontType::QUARTZ = 3 ;

}

预定义常量

CairoFontType::TOY
The font was created using CairoToyFont api

CairoFontType::FT
The font is of type CairoFreeType

CairoFontType::WIN32
The font is of type Win32

CairoFontType::QUARTZ
The font is of type Quartz

CairoFontType::USER
The font was create using cairo's user font api

简介

Specifies variants of a font face based on their weight.

类摘要

CairoFontWeight

class CairoFontWeight {

/* 常量 */

const integer CairoFontWeight::NORMAL = 0 ;

const integer CairoFontWeight::BOLD = 1 ;

}

预定义常量

CairoFontWeight::NORMAL
Normal font weight

CairoFontWeight::BOLD
Bold font weight

简介

类摘要

CairoScaledFont

class CairoScaledFont {

/* 方法 */

public __construct ( CairoFontFace $font_face , CairoMatrix $matrix , CairoMatrix $ctm , CairoFontOptions $options )

public array extents ( void )

public CairoMatrix getCtm ( void )

public void getFontFace ( void )

public void getFontMatrix ( void )

public void getFontOptions ( void )

public void getScaleMatrix ( void )

public int getType ( void )

public array glyphExtents ( array $glyphs )

public int status ( void )

public array textExtents ( string $text )

}

CairoScaledFont::__construct

The __construct purpose

说明

public CairoScaledFont::__construct ( CairoFontFace $font_face , CairoMatrix $matrix , CairoMatrix $ctm , CairoFontOptions $options )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

font_face
Description...

matrix
Description...

ctm
Description...

options
Description...

返回值

Description...

范例

示例 #1 CairoScaledFont::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::extents

The extents purpose

说明

public array CairoScaledFont::extents ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoScaledFont::extents example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::getCtm

The getCtm purpose

说明

public CairoMatrix CairoScaledFont::getCtm ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoScaledFont::getCtm example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::getFontFace

cairo_get_font_face

The getFontFace purpose

说明

面向对象风格 (method):

public void CairoScaledFont::getFontFace ( void )

过程化风格:

void cairo_get_font_face ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::getFontMatrix

cairo_get_font_matrix

The getFontMatrix purpose

说明

面向对象风格 (method):

public void CairoScaledFont::getFontMatrix ( void )

过程化风格:

void cairo_get_font_matrix ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::getFontOptions

cairo_get_font_options

The getFontOptions purpose

说明

面向对象风格 (method):

public void CairoScaledFont::getFontOptions ( void )

过程化风格:

void cairo_get_font_options ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::getScaleMatrix

The getScaleMatrix purpose

说明

public void CairoScaledFont::getScaleMatrix ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoScaledFont::getScaleMatrix example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::getType

The getType purpose

说明

public int CairoScaledFont::getType ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoScaledFont::getType example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::glyphExtents

The glyphExtents purpose

说明

public array CairoScaledFont::glyphExtents ( array $glyphs )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

glyphs
Description...

返回值

Description...

范例

示例 #1 CairoScaledFont::glyphExtents example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::status

cairo_status

The status purpose

说明

面向对象风格 (method):

public int CairoScaledFont::status ( void )

过程化风格:

int cairo_status ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoScaledFont::textExtents

cairo_text_extents

The textExtents purpose

说明

面向对象风格 (method):

public array CairoScaledFont::textExtents ( string $text )

过程化风格:

array cairo_text_extents ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

text
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

The CairoToyFontFace class can be used instead of CairoContext::selectFontFace to create a toy font independently of a context.

类摘要

CairoToyFontFace

class CairoToyFontFace extends CairoFontFace {

/* 继承的方法 */

}

简介

CairoPatternType is used to describe the type of a given pattern.

The type of a pattern is determined by the function used to create it. The cairo_pattern_create_rgb and cairo_pattern_create_rgba functions create CairoPatternType::SOLID patterns. The remaining cairo_pattern_create_* functions map to pattern types in obvious ways.

类摘要

CairoPatternType

class CairoPatternType {

/* 常量 */

const integer CairoPatternType::SOLID = 0 ;

const integer CairoPatternType::SURFACE = 1 ;

const integer CairoPatternType::LINEAR = 2 ;

const integer CairoPatternType::RADIAL = 3 ;

}

预定义常量

CairoPatternType::SOLID
The pattern is a solid (uniform) color. It may be opaque or translucent.

CairoPatternType::SURFACE
The pattern is a based on a surface (an image).

CairoPatternType::LINEAR
The pattern is a linear gradient.

CairoPatternType::RADIAL
The pattern is a radial gradient.

简介

CairoPattern is the abstract base class from which all the other pattern classes derive. It cannot be instantiated directly

类摘要

CairoPattern

class CairoPattern {

/* 方法 */

public __construct ( void )

public void getMatrix ( void )

public int getType ( void )

public void setMatrix ( CairoMatrix $matrix )

public int status ( void )

}

CairoPattern::__construct

The __construct purpose

说明

public CairoPattern::__construct ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoPattern::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPattern::getMatrix

cairo_get_matrix

The getMatrix purpose

说明

面向对象风格 (method):

public void CairoPattern::getMatrix ( void )

过程化风格:

void cairo_get_matrix ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPattern::getType

The getType purpose

说明

public int CairoPattern::getType ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoPattern::getType example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPattern::setMatrix

cairo_set_matrix

The setMatrix purpose

说明

面向对象风格 (method):

public void CairoPattern::setMatrix ( CairoMatrix $matrix )

过程化风格:

void cairo_set_matrix ( CairoContext $context , CairoMatrix $matrix )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

matrix
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoPattern::status

cairo_status

The status purpose

说明

面向对象风格 (method):

public int CairoPattern::status ( void )

过程化风格:

int cairo_status ( CairoContext $context )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

CairoGradientPattern is an abstract base class from which other Pattern classes derive. It cannot be instantiated directly.

类摘要

CairoGradientPattern

class CairoGradientPattern extends CairoPattern {

/* 方法 */

public void addColorStopRgb ( float $offset , float $red , float $green , float $blue )

public void addColorStopRgba ( float $offset , float $red , float $green , float $blue , float $alpha )

public int getColorStopCount ( void )

public array getColorStopRgba ( int $index )

public int getExtend ( void )

public void setExtend ( int $extend )

/* 继承的方法 */

public CairoPattern::__construct ( void )

public void CairoPattern::getMatrix ( void )

public int CairoPattern::getType ( void )

public void CairoPattern::setMatrix ( CairoMatrix $matrix )

public int CairoPattern::status ( void )

}

CairoGradientPattern::addColorStopRgb

The addColorStopRgb purpose

说明

public void CairoGradientPattern::addColorStopRgb ( float $offset , float $red , float $green , float $blue )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

offset
Description...

red
Description...

green
Description...

blue
Description...

返回值

Description...

范例

示例 #1 CairoGradientPattern::addColorStopRgb example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoGradientPattern::addColorStopRgba

The addColorStopRgba purpose

说明

public void CairoGradientPattern::addColorStopRgba ( float $offset , float $red , float $green , float $blue , float $alpha )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

offset
Description...

red
Description...

green
Description...

blue
Description...

alpha
Description...

返回值

Description...

范例

示例 #1 CairoGradientPattern::addColorStopRgba example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoGradientPattern::getColorStopCount

The getColorStopCount purpose

说明

public int CairoGradientPattern::getColorStopCount ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoGradientPattern::getColorStopCount example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoGradientPattern::getColorStopRgba

The getColorStopRgba purpose

说明

public array CairoGradientPattern::getColorStopRgba ( int $index )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

index
Description...

返回值

Description...

范例

示例 #1 CairoGradientPattern::getColorStopRgba example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoGradientPattern::getExtend

The getExtend purpose

说明

public int CairoGradientPattern::getExtend ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoGradientPattern::getExtend example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoGradientPattern::setExtend

The setExtend purpose

说明

public void CairoGradientPattern::setExtend ( int $extend )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

extend
Description...

返回值

Description...

范例

示例 #1 CairoGradientPattern::setExtend example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

类摘要

CairoSolidPattern

class CairoSolidPattern extends CairoPattern {

/* 方法 */

public __construct ( float $red , float $green , float $blue [, float $alpha = 0 ] )

public array getRgba ( void )

/* 继承的方法 */

public CairoPattern::__construct ( void )

public void CairoPattern::getMatrix ( void )

public int CairoPattern::getType ( void )

public void CairoPattern::setMatrix ( CairoMatrix $matrix )

public int CairoPattern::status ( void )

}

CairoSolidPattern::__construct

The __construct purpose

说明

public CairoSolidPattern::__construct ( float $red , float $green , float $blue [, float $alpha = 0 ] )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

red
Description...

green
Description...

blue
Description...

alpha
Description...

返回值

Description...

范例

示例 #1 CairoSolidPattern::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSolidPattern::getRgba

The getRgba purpose

说明

public array CairoSolidPattern::getRgba ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSolidPattern::getRgba example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

类摘要

CairoSurfacePattern

class CairoSurfacePattern extends CairoPattern {

/* 方法 */

public __construct ( CairoSurface $surface )

public int getExtend ( void )

public int getFilter ( void )

public void getSurface ( void )

public void setExtend ( int $extend )

public void setFilter ( int $filter )

/* 继承的方法 */

public CairoPattern::__construct ( void )

public void CairoPattern::getMatrix ( void )

public int CairoPattern::getType ( void )

public void CairoPattern::setMatrix ( CairoMatrix $matrix )

public int CairoPattern::status ( void )

}

CairoSurfacePattern::__construct

The __construct purpose

说明

public CairoSurfacePattern::__construct ( CairoSurface $surface )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

surface
Description...

返回值

Description...

范例

示例 #1 CairoSurfacePattern::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurfacePattern::getExtend

The getExtend purpose

说明

public int CairoSurfacePattern::getExtend ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurfacePattern::getExtend example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurfacePattern::getFilter

The getFilter purpose

说明

public int CairoSurfacePattern::getFilter ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurfacePattern::getFilter example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurfacePattern::getSurface

The getSurface purpose

说明

public void CairoSurfacePattern::getSurface ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoSurfacePattern::getSurface example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurfacePattern::setExtend

The setExtend purpose

说明

public void CairoSurfacePattern::setExtend ( int $extend )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

extend
Description...

返回值

Description...

范例

示例 #1 CairoSurfacePattern::setExtend example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoSurfacePattern::setFilter

The setFilter purpose

说明

public void CairoSurfacePattern::setFilter ( int $filter )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

filter
Description...

返回值

Description...

范例

示例 #1 CairoSurfacePattern::setFilter example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

Create a new CairoLinearGradient along the line defined

类摘要

CairoLinearGradient

class CairoLinearGradient extends CairoGradientPattern {

/* 方法 */

public __construct ( float $x0 , float $y0 , float $x1 , float $y1 )

public array getPoints ( void )

/* 继承的方法 */

public void CairoGradientPattern::addColorStopRgb ( float $offset , float $red , float $green , float $blue )

public void CairoGradientPattern::addColorStopRgba ( float $offset , float $red , float $green , float $blue , float $alpha )

public int CairoGradientPattern::getColorStopCount ( void )

public array CairoGradientPattern::getColorStopRgba ( int $index )

public int CairoGradientPattern::getExtend ( void )

public void CairoGradientPattern::setExtend ( int $extend )

}

CairoLinearGradient::__construct

The __construct purpose

说明

public CairoLinearGradient::__construct ( float $x0 , float $y0 , float $x1 , float $y1 )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

x0
Description...

y0
Description...

x1
Description...

y1
Description...

返回值

Description...

范例

示例 #1 CairoLinearGradient::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoLinearGradient::getPoints

The getPoints purpose

说明

public array CairoLinearGradient::getPoints ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoLinearGradient::getPoints example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

类摘要

CairoRadialGradient

class CairoRadialGradient extends CairoGradientPattern {

/* 方法 */

public __construct ( float $x0 , float $y0 , float $r0 , float $x1 , float $y1 , float $r1 )

public array getCircles ( void )

/* 继承的方法 */

public void CairoGradientPattern::addColorStopRgb ( float $offset , float $red , float $green , float $blue )

public void CairoGradientPattern::addColorStopRgba ( float $offset , float $red , float $green , float $blue , float $alpha )

public int CairoGradientPattern::getColorStopCount ( void )

public array CairoGradientPattern::getColorStopRgba ( int $index )

public int CairoGradientPattern::getExtend ( void )

public void CairoGradientPattern::setExtend ( int $extend )

}

CairoRadialGradient::__construct

The __construct purpose

说明

面向对象风格:

public CairoRadialGradient::__construct ( float $x0 , float $y0 , float $r0 , float $x1 , float $y1 , float $r1 )

过程化风格:

Creates a new radial gradient CairoPattern between the two circles defined by (x0, y0, r0) and (x1, y1, r1). Before using the gradient pattern, a number of color stops should be defined using CairoRadialGradient::addColorStopRgb or CairoRadialGradient::addColorStopRgba.

Note: The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with CairoRadialGradient::setMatrix.

参数

x0
x coordinate for the center of the start circle.

y0
y coordinate for the center of the start circle.

r0
radius of the start circle.

x1
x coordinate for the center of the end circle.

y1
y coordinate for the center of the end circle.

r1
radius of the end circle.

返回值

Description...

范例

示例 #1 CairoRadialGradient::__construct example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoRadialGradient::getCircles

The getCircles purpose

说明

public array CairoRadialGradient::getCircles ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoRadialGradient::getCircles example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

Enum class that specifies the type of antialiasing to do when rendering text or shapes.

类摘要

CairoAntialias

class CairoAntialias {

/* 常量 */

const integer CairoAntialias::MODE_DEFAULT = 0 ;

const integer CairoAntialias::MODE_NONE = 1 ;

const integer CairoAntialias::MODE_GRAY = 2 ;

const integer CairoAntialias::MODE_SUBPIXEL = 3 ;

}

预定义常量

CairoAntialias::MODE_DEFAULT
Use the default antialiasing for the subsystem and target device

CairoAntialias::MODE_NONE
Use a bilevel alpha mask

CairoAntialias::MODE_GRAY
Perform single-color antialiasing (using shades of gray for black text on a white background, for example).

CairoAntialias::MODE_SUBPIXEL
Perform antialiasing by taking advantage of the order of subpixel elements on devices such as LCD panels.

简介

CairoContent is used to describe the content that a surface will contain, whether color information, alpha information (translucence vs. opacity), or both.

Note: The large values here are designed to keep CairoContent values distinct from CairoContent values so that the implementation can detect the error if users confuse the two types.

类摘要

CairoContent

class CairoContent {

/* 常量 */

const integer CairoContent::COLOR = 4096 ;

const integer CairoContent::ALPHA = 8192 ;

const integer CairoContent::COLOR_ALPHA = 12288 ;

}

预定义常量

CairoContent::COLOR
The surface will hold color content only.

CairoContent::ALPHA
The surface will hold alpha content only.

CairoContent::COLOR_ALPHA
The surface will hold color and alpha content.

简介

类摘要

CairoExtend

class CairoExtend {

/* 常量 */

const integer CairoExtend::NONE = 0 ;

const integer CairoExtend::REPEAT = 1 ;

const integer CairoExtend::REFLECT = 2 ;

const integer CairoExtend::PAD = 3 ;

}

预定义常量

CairoExtend::NONE
Description here...

CairoExtend::REPEAT
Description here...

CairoExtend::REFLECT
Description here...

CairoExtend::PAD
Description here...

简介

CairoFormat enums are used to identify the memory format of the image data.

类摘要

CairoFormat

class CairoFormat {

/* 常量 */

const integer CairoFormat::ARGB32 = 0 ;

const integer CairoFormat::RGB24 = 1 ;

const integer CairoFormat::A8 = 2 ;

const integer CairoFormat::A1 = 3 ;

/* 方法 */

public static int strideForWidth ( int $format , int $width )

}

预定义常量

CairoFormat::ARGB32
Each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then red, then green, then blue. The 32-bit quantities are stored native-endian. Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.)

CairoFormat::RGB24
Each pixel is a 32-bit quantity, with the upper 8 bits unused. Red, Green, and Blue are stored in the remaining 24 bits in that order.

CairoFormat::A8
Each pixel is a 8-bit quantity holding an alpha value.

CairoFormat::A1
Each pixel is a 1-bit quantity holding an alpha value. Pixels are packed together into 32-bit quantities. The ordering of the bits matches the endianness of the platform. On a big-endian machine, the first pixel is in the uppermost bit, on a little-endian machine the first pixel is in the least-significant bit.

CairoFormat::strideForWidth

Provides an appropriate stride to use

说明

public static int CairoFormat::strideForWidth ( int $format , int $width )

This method provides a stride value that will respect all alignment requirements of the accelerated image-rendering code within cairo.

参数

format
The desired CairoFormat to use

width
The width of the image

返回值

The appropriate stride to use given the desired format and width, or -1 if either the format is invalid or the width too large.

范例

示例 #1 CairoFormat::strideForWidth example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

A CairoFillRule is used to select how paths are filled. For both fill rules, whether or not a point is included in the fill is determined by taking a ray from that point to infinity and looking at intersections with the path. The ray can be in any direction, as long as it doesn't pass through the end point of a segment or have a tricky intersection such as intersecting tangent to the path. (Note that filling is not actually implemented in this way. This is just a description of the rule that is applied.)

The default fill rule is CairoFillRule::WINDING.

类摘要

CairoFillRule

class CairoFillRule {

/* 常量 */

const integer CairoFillRule::WINDING = 0 ;

const integer CairoFillRule::EVEN_ODD = 1 ;

}

预定义常量

CairoFillRule::WINDING
If the path crosses the ray from left-to-right, counts +1. If the path crosses the ray from right to left, counts -1. (Left and right are determined from the perspective of looking along the ray from the starting point.) If the total count is non-zero, the point will be filled.

CairoFillRule::EVEN_ODD
Counts the total number of intersections, without regard to the orientation of the contour. If the total number of intersections is odd, the point will be filled.

简介

A CairoFilter is used to indicate what filtering should be applied when reading pixel values from patterns. See CairoPattern::setSource or cairo_pattern_set_source for indicating the desired filter to be used with a particular pattern.

类摘要

CairoFilter

class CairoFilter {

/* 常量 */

const integer CairoFilter::FAST = 0 ;

const integer CairoFilter::GOOD = 1 ;

const integer CairoFilter::BEST = 2 ;

const integer CairoFilter::NEAREST = 3 ;

const integer CairoFilter::BILINEAR = 4 ;

const integer CairoFilter::GAUSSIAN = 5 ;

}

预定义常量

CairoFilter::FAST
A high-performance filter, with quality similar to CairoFilter::NEAREST

CairoFilter::GOOD
A reasonable-performance filter, with quality similar to CairoFilter::BILINEAR

CairoFilter::BEST
The highest-quality available, performance may not be suitable for interactive use.

CairoFilter::NEAREST
Nearest-neighbor filtering

CairoFilter::BILINEAR
Linear interpolation in two dimensions

CairoFilter::GAUSSIAN
This filter value is currently unimplemented, and should not be used in current code.

简介

Specifies whether to hint font metrics; hinting font metrics means quantizing them so that they are integer values in device space. Doing this improves the consistency of letter and line spacing, however it also means that text will be laid out differently at different zoom factors.

类摘要

CairoHintMetrics

class CairoHintMetrics {

/* 常量 */

const integer CairoHintMetrics::METRICS_DEFAULT = 0 ;

const integer CairoHintMetrics::METRICS_OFF = 1 ;

const integer CairoHintMetrics::METRICS_ON = 2 ;

}

预定义常量

CairoHintMetrics::METRICS_DEFAULT
Hint metrics in the default manner for the font backend and target device

CairoHintMetrics::METRICS_OFF
Do not hint font metrics

CairoHintMetrics::METRICS_ON
Hint font metrics

简介

Specifies the type of hinting to do on font outlines. Hinting is the process of fitting outlines to the pixel grid in order to improve the appearance of the result. Since hinting outlines involves distorting them, it also reduces the faithfulness to the original outline shapes. Not all of the outline hinting styles are supported by all font backends.

类摘要

CairoHintStyle

class CairoHintStyle {

/* 常量 */

const integer CairoHintStyle::STYLE_DEFAULT = 0 ;

const integer CairoHintStyle::STYLE_NONE = 1 ;

const integer CairoHintStyle::STYLE_SLIGHT = 2 ;

const integer CairoHintStyle::STYLE_MEDIUM = 3 ;

const integer CairoHintStyle::STYLE_FULL = 4 ;

}

预定义常量

CairoHintStyle::STYLE_DEFAULT
Use the default hint style for font backend and target device

CairoHintStyle::STYLE_NONE
Do not hint outlines

CairoHintStyle::STYLE_SLIGHT
Hint outlines slightly to improve contrast while retaining good fidelity to the original shapes.

CairoHintStyle::STYLE_MEDIUM
Hint outlines with medium strength giving a compromise between fidelity to the original shapes and contrast

CairoHintStyle::STYLE_FULL
Hint outlines to maximize contrast

简介

Specifies how to render the endpoints of the path when stroking.

The default line cap style is CairoLineCap::BUTT.

类摘要

CairoLineCap

class CairoLineCap {

/* 常量 */

const integer CairoLineCap::BUTT = 0 ;

const integer CairoLineCap::ROUND = 1 ;

const integer CairoLineCap::SQUARE = 2 ;

}

预定义常量

CairoLineCap::BUTT
Start(stop) the line exactly at the start(end) point

CairoLineCap::ROUND
Use a round ending, the center of the circle is the end point

CairoLineCap::SQUARE
Use squared ending, the center of the square is the end point

简介

类摘要

CairoLineJoin

class CairoLineJoin {

/* 常量 */

const integer CairoLineJoin::MITER = 0 ;

const integer CairoLineJoin::ROUND = 1 ;

const integer CairoLineJoin::BEVEL = 2 ;

}

预定义常量

CairoLineJoin::MITER
Description here...

CairoLineJoin::ROUND
Description here...

CairoLineJoin::BEVEL
Description here...

简介

Matrices are used throughout cairo to convert between different coordinate spaces.

类摘要

CairoMatrix

class CairoMatrix {

/* 方法 */

public __construct ([ float $xx = 1.0 [, float $yx = 0.0 [, float $xy = 0.0 [, float $yy = 1.0 [, float $x0 = 0.0 [, float $y0 = 0.0 ]]]]]] )

public static void initIdentity ( void )

public static void initRotate ( float $radians )

public static void initScale ( float $sx , float $sy )

public static void initTranslate ( float $tx , float $ty )

public void invert ( void )

public static CairoMatrix multiply ( CairoMatrix $matrix1 , CairoMatrix $matrix2 )

public void rotate ( float $radians )

public void scale ( float $sx , float $sy )

public array transformDistance ( float $dx , float $dy )

public array transformPoint ( float $dx , float $dy )

public void translate ( float $tx , float $ty )

}

CairoMatrix::__construct

cairo_matrix_init

Creates a new CairoMatrix object

说明

面向对象风格 (method):

public CairoMatrix::__construct ([ float $xx = 1.0 [, float $yx = 0.0 [, float $xy = 0.0 [, float $yy = 1.0 [, float $x0 = 0.0 [, float $y0 = 0.0 ]]]]]] )

过程化风格:

object cairo_matrix_init ([ float $xx = 1.0 [, float $yx = 0.0 [, float $xy = 0.0 [, float $yy = 1.0 [, float $x0 = 0.0 [, float $y0 = 0.0 ]]]]]] )

Returns new CairoMatrix object. Matrices are used throughout cairo to convert between different coordinate spaces. Sets matrix to be the affine transformation given by xx, yx, xy, yy, x0, y0. The transformation is given by: x_new = xx * x + xy * y + x0; and y_new = yx * x + yy * y + y0;

参数

xx
xx component of the affine transformation

yx
yx component of the affine transformation

xy
xy component of the affine transformation

yy
yy component of the affine transformation

x0
X translation component of the affine transformation

y0
Y translation component of the affine transformation

返回值

Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.

范例

示例 #1 面向对象风格

<?php
/* Create a new Matrix */
$matrix = new CairoMatrix(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>

示例 #2 过程化风格

<?php
/* Create a new Matrix */
$matrix = cairo_matrix_init(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
?>

参见

  • CairoMatrix::initIdentity
  • CairoMatrix::initRotate
  • CairoMatrix::initScale
  • CairoMatrix::initTranslate

CairoMatrix::initIdentity

cairo_matrix_init_identity

Creates a new identity matrix

说明

面向对象风格 (method):

public static void CairoMatrix::initIdentity ( void )

过程化风格:

object cairo_matrix_init_identity ( void )

Creates a new matrix that is an identity transformation. An identity transformation means the source data is copied into the destination data without change

参数

此函数没有参数。

返回值

Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.

范例

示例 #1 面向对象风格

<?php
/* Create a new Matrix */
$matrix = CairoMatrix::initIdentity();
?>

示例 #2 过程化风格

<?php
/* Create a new Matrix */
$matrix = cairo_matrix_init_identity();
?>

参见

  • CairoMatrix::__construct
  • CairoMatrix::initRotate
  • CairoMatrix::initScale
  • CairoMatrix::initTranslate

CairoMatrix::initRotate

cairo_matrix_init_rotate

Creates a new rotated matrix

说明

面向对象风格 (method):

public static void CairoMatrix::initRotate ( float $radians )

过程化风格:

object cairo_matrix_init_rotate ( float $radians )

Creates a new matrix to a transformation that rotates by radians provided

参数

radians
angle of rotation, in radians. The direction of rotation is defined such that positive angles rotate in the direction from the positive X axis toward the positive Y axis. With the default axis orientation of cairo, positive angles rotate in a clockwise direction.

返回值

Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.

范例

示例 #1 面向对象风格

<?php
/* Create a new Matrix */
$matrix = CairoMatrix::initRotate(0.3);
?>

示例 #2 过程化风格

<?php
/* Create a new Matrix */
$matrix = cairo_matrix_init_rotate(0.3);
?>

参见

  • CairoMatrix::__construct
  • CairoMatrix::initIdentity
  • CairoMatrix::initScale
  • CairoMatrix::initTranslate

CairoMatrix::initScale

cairo_matrix_init_scale

Creates a new scaling matrix

说明

面向对象风格 (method):

public static void CairoMatrix::initScale ( float $sx , float $sy )

过程化风格:

object cairo_matrix_init_scale ( float $sx , float $sy )

Creates a new matrix to a transformation that scales by sx and sy in the X and Y dimensions, respectively.

参数

sx
scale factor in the X direction

sy
scale factor in the Y direction

返回值

Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.

范例

示例 #1 面向对象风格

<?php
/* Create a new Matrix */
$matrix = CairoMatrix::initScale(1.0, 2.0);
?>

示例 #2 过程化风格

<?php
/* Create a new Matrix */
$matrix = cairo_matrix_init_scale(1.0, 2.0);
?>

参见

  • CairoMatrix::__construct
  • CairoMatrix::initIdentity
  • CairoMatrix::initRotate
  • CairoMatrix::initTranslate

CairoMatrix::initTranslate

cairo_matrix_init_translate

Creates a new translation matrix

说明

面向对象风格 (method):

public static void CairoMatrix::initTranslate ( float $tx , float $ty )

过程化风格:

object cairo_matrix_init_translate ( float $tx , float $ty )

Creates a new matrix to a transformation that translates by tx and ty in the X and Y dimensions, respectively.

参数

tx
amount to translate in the X direction

ty
amount to translate in the Y direction

返回值

Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.

范例

示例 #1 面向对象风格

<?php
/* Create a new Matrix */
$matrix = CairoMatrix::initTranslate(1.0, 2.0);
?>

示例 #2 过程化风格

<?php
/* Create a new Matrix */
$matrix = cairo_matrix_init_translate(1.0, 2.0);
?>

参见

  • CairoMatrix::__construct
  • CairoMatrix::initIdentity
  • CairoMatrix::initRotate
  • CairoMatrix::initScale

CairoMatrix::invert

The invert purpose

说明

public void CairoMatrix::invert ( void )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

Description...

范例

示例 #1 CairoMatrix::invert example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoMatrix::multiply

The multiply purpose

说明

public static CairoMatrix CairoMatrix::multiply ( CairoMatrix $matrix1 , CairoMatrix $matrix2 )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

matrix1
Description...

matrix2
Description...

返回值

Description...

范例

示例 #1 CairoMatrix::multiply example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoMatrix::rotate

cairo_matrix_rotate

The rotate purpose

说明

面向对象风格 (method):

public void CairoMatrix::rotate ( float $radians )

过程化风格:

void cairo_matrix_rotate ( CairoContext $context , string $radians )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

radians
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoMatrix::scale

cairo_matrix_scale

Applies scaling to a matrix

说明

面向对象风格 (method):

public void CairoMatrix::scale ( float $sx , float $sy )

过程化风格:

void cairo_matrix_scale ( CairoContext $context , float $sx , float $sy )

Applies scaling by sx, sy to the transformation in the matrix. The effect of the new transformation is to first scale the coordinates by sx and sy, then apply the original transformation to the coordinates.

参数

matrix
Procedural only - CairoMatrix instance

sx
scale factor in the X direction

sy
scale factor in the Y direction

范例

示例 #1 面向对象风格

<?php
/* Apply scaling to a matrix */
$matrix = new CairoMatrix(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
$matrix->scale(0.2, 2.0);
?>

示例 #2 过程化风格

<?php
/* Apply scaling to a matrix */
$matrix = cairo_matrix_init(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
cairo_matrix_scale($matrix, 0.2, 2.0);
?>

参见

  • CairoMatrix::initScale

CairoMatrix::transformDistance

The transformDistance purpose

说明

public array CairoMatrix::transformDistance ( float $dx , float $dy )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

dx
Description...

dy
Description...

返回值

Description...

范例

示例 #1 CairoMatrix::transformDistance example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoMatrix::transformPoint

The transformPoint purpose

说明

public array CairoMatrix::transformPoint ( float $dx , float $dy )

The method description goes here.

Warning

本函数还未编写文档,仅有参数列表。

参数

dx
Description...

dy
Description...

返回值

Description...

范例

示例 #1 CairoMatrix::transformPoint example

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

以上例程的输出类似于:

...

参见

  • Classname::Method

CairoMatrix::translate

cairo_translate

The translate purpose

说明

面向对象风格 (method):

public void CairoMatrix::translate ( float $tx , float $ty )

过程化风格:

void cairo_translate ( CairoContext $context , float $x , float $y )

Description here.

Warning

本函数还未编写文档,仅有参数列表。

参数

context
Description...

x
Description...

y
Description...

tx
Description...

ty
Description...

返回值

Description...

范例

示例 #1 面向对象风格

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

以上例程的输出类似于:

...

示例 #2 过程化风格

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

以上例程的输出类似于:

...

参见

  • Classname::Method

简介

This is used to set the compositing operator for all cairo drawing operations.

The default operator is CairoOperator::OVER

The operators marked as unbounded modify their destination even outside of the mask layer (that is, their effect is not bound by the mask layer). However, their effect can still be limited by way of clipping.

To keep things simple, the operator descriptions here document the behavior for when both source and destination are either fully transparent or fully opaque. The actual implementation works for translucent layers too. For a more detailed explanation of the effects of each operator, including the mathematical definitions, see http://cairographics.org/operators/.

类摘要

CairoOperator

class CairoOperator {

/* 常量 */

const integer CairoOperator::CLEAR = 0 ;

const integer CairoOperator::SOURCE = 1 ;

const integer CairoOperator::OVER = 2 ;

const integer CairoOperator::IN = 3 ;

const integer CairoOperator::OUT = 4 ;

const integer CairoOperator::ATOP = 5 ;

const integer CairoOperator::DEST = 6 ;

const integer CairoOperator::DEST_OVER = 7 ;

const integer CairoOperator::DEST_IN = 8 ;

const integer CairoOperator::DEST_OUT = 9 ;

const integer CairoOperator::DEST_ATOP = 10 ;

const integer CairoOperator::XOR = 11 ;

const integer CairoOperator::ADD = 12 ;

const integer CairoOperator::SATURATE = 13 ;

}

预定义常量

CairoOperator::CLEAR
Clear destination layer (bounded)

CairoOperator::SOURCE
Replace destination layer (bounded)

CairoOperator::OVER
Draw source layer on top of destination layer (bounded)

CairoOperator::IN
Draw source where there was destination content (unbounded)

CairoOperator::OUT
Draw source where there was no destination content (unbounded)

CairoOperator::ATOP
Draw source on top of destination content and only there

CairoOperator::DEST
Ignore the source

CairoOperator::DEST_OVER
Draw destination on top of source

CairoOperator::DEST_IN
Leave destination only where there was source content (unbounded)

CairoOperator::DEST_OUT
Leave destination only where there was no source content

CairoOperator::DEST_ATOP
Leave destination on top of source content and only there (unbounded)

CairoOperator::XOR
Source and destination are shown where there is only one of them

CairoOperator::ADD
Source and destination layers are accumulated

CairoOperator::SATURATE
Like CairoOperator::OVER, but assuming source and dest are disjoint geometries

简介

Note: CairoPath class cannot be instantiated directly, doing so will result in Fatal Error if used or passed

类摘要

CairoPath

class CairoPath {

}

简介

类摘要

CairoPsLevel

class CairoPsLevel {

/* 常量 */

const integer CairoPsLevel::LEVEL_2 = 0 ;

const integer CairoPsLevel::LEVEL_3 = 1 ;

}

预定义常量

CairoPsLevel::LEVEL_2
Description here...

CairoPsLevel::LEVEL_3
Description here...

简介

类摘要

CairoSubpixelOrder

class CairoSubpixelOrder {

/* 常量 */

const integer CairoSubpixelOrder::ORDER_DEFAULT = 0 ;

const integer CairoSubpixelOrder::ORDER_RGB = 1 ;

const integer CairoSubpixelOrder::ORDER_BGR = 2 ;

const integer CairoSubpixelOrder::ORDER_VRGB = 3 ;

const integer CairoSubpixelOrder::ORDER_VBGR = 4 ;

}

预定义常量

CairoSubpixelOrder::ORDER_DEFAULT
Description here...

CairoSubpixelOrder::ORDER_RGB
Description here...

CairoSubpixelOrder::ORDER_BGR
Description here...

CairoSubpixelOrder::ORDER_VRGB
Description here...

CairoSubpixelOrder::ORDER_VBGR
Description here...

简介

类摘要

CairoSvgVersion

class CairoSvgVersion {

/* 常量 */

const integer CairoSvgVersion::VERSION_1_1 = 0 ;

const integer CairoSvgVersion::VERSION_1_2 = 1 ;

}

预定义常量

CairoSvgVersion::VERSION_1_1
Description here...

CairoSvgVersion::VERSION_1_2
Description here...