The CairoContext class
(PECL cairo >= 0.1.0)
Introduction
Context is the main object used when drawing with cairo. To draw with cairo, you create a CairoContext, set the target CairoSurface, and drawing options for the CairoContext, create shapes with functions . like CairoContext::moveTo() and CairoContext::lineTo(), and then draw shapes with CairoContext::stroke() or CairoContext::fill(). Contexts can be pushed to a stack via CairoContext::save(). They may then safely be changed, without losing the current state. Use CairoContext::restore() to restore to the saved state.
Class synopsis
Table of Contents
- CairoContext::appendPath — Appends a path to current path
- CairoContext::arc — Adds a circular arc
- CairoContext::arcNegative — Adds a negative arc
- CairoContext::clip — Establishes a new clip region
- CairoContext::clipExtents — Computes the area inside the current clip
- CairoContext::clipPreserve — Establishes a new clip region from the current clip
- CairoContext::clipRectangleList — Retrieves the current clip as a list of rectangles
- CairoContext::closePath — Closes the current path
- CairoContext::__construct — Creates a new CairoContext
- CairoContext::copyPage — Emits the current page
- CairoContext::copyPath — Creates a copy of the current path
- CairoContext::copyPathFlat — Gets a flattened copy of the current path
- CairoContext::curveTo — Adds a curve
- CairoContext::deviceToUser — Transform a coordinate
- CairoContext::deviceToUserDistance — Transform a distance
- CairoContext::fill — Fills the current path
- CairoContext::fillExtents — Computes the filled area
- CairoContext::fillPreserve — Fills and preserve the current path
- CairoContext::fontExtents — Get the font extents
- CairoContext::getAntialias — Retrieves the current antialias mode
- CairoContext::getCurrentPoint — The getCurrentPoint purpose
- CairoContext::getDash — The getDash purpose
- CairoContext::getDashCount — The getDashCount purpose
- CairoContext::getFillRule — The getFillRule purpose
- CairoContext::getFontFace — The getFontFace purpose
- CairoContext::getFontMatrix — The getFontMatrix purpose
- CairoContext::getFontOptions — The getFontOptions purpose
- CairoContext::getGroupTarget — The getGroupTarget purpose
- CairoContext::getLineCap — The getLineCap purpose
- CairoContext::getLineJoin — The getLineJoin purpose
- CairoContext::getLineWidth — The getLineWidth purpose
- CairoContext::getMatrix — The getMatrix purpose
- CairoContext::getMiterLimit — The getMiterLimit purpose
- CairoContext::getOperator — The getOperator purpose
- CairoContext::getScaledFont — The getScaledFont purpose
- CairoContext::getSource — The getSource purpose
- CairoContext::getTarget — The getTarget purpose
- CairoContext::getTolerance — The getTolerance purpose
- CairoContext::glyphPath — The glyphPath purpose
- CairoContext::hasCurrentPoint — The hasCurrentPoint purpose
- CairoContext::identityMatrix — The identityMatrix purpose
- CairoContext::inFill — The inFill purpose
- CairoContext::inStroke — The inStroke purpose
- CairoContext::lineTo — The lineTo purpose
- CairoContext::mask — The mask purpose
- CairoContext::maskSurface — The maskSurface purpose
- CairoContext::moveTo — The moveTo purpose
- CairoContext::newPath — The newPath purpose
- CairoContext::newSubPath — The newSubPath purpose
- CairoContext::paint — The paint purpose
- CairoContext::paintWithAlpha — The paintWithAlpha purpose
- CairoContext::pathExtents — The pathExtents purpose
- CairoContext::popGroup — The popGroup purpose
- CairoContext::popGroupToSource — The popGroupToSource purpose
- CairoContext::pushGroup — The pushGroup purpose
- CairoContext::pushGroupWithContent — The pushGroupWithContent purpose
- CairoContext::rectangle — The rectangle purpose
- CairoContext::relCurveTo — The relCurveTo purpose
- CairoContext::relLineTo — The relLineTo purpose
- CairoContext::relMoveTo — The relMoveTo purpose
- CairoContext::resetClip — The resetClip purpose
- CairoContext::restore — The restore purpose
- CairoContext::rotate — The rotate purpose
- CairoContext::save — The save purpose
- CairoContext::scale — The scale purpose
- CairoContext::selectFontFace — The selectFontFace purpose
- CairoContext::setAntialias — The setAntialias purpose
- CairoContext::setDash — The setDash purpose
- CairoContext::setFillRule — The setFillRule purpose
- CairoContext::setFontFace — The setFontFace purpose
- CairoContext::setFontMatrix — The setFontMatrix purpose
- CairoContext::setFontOptions — The setFontOptions purpose
- CairoContext::setFontSize — The setFontSize purpose
- CairoContext::setLineCap — The setLineCap purpose
- CairoContext::setLineJoin — The setLineJoin purpose
- CairoContext::setLineWidth — The setLineWidth purpose
- CairoContext::setMatrix — The setMatrix purpose
- CairoContext::setMiterLimit — The setMiterLimit purpose
- CairoContext::setOperator — The setOperator purpose
- CairoContext::setScaledFont — The setScaledFont purpose
- CairoContext::setSource — The setSource purpose
- CairoContext::setSourceRGB — The setSourceRGB purpose
- CairoContext::setSourceRGBA — The setSourceRGBA purpose
- CairoContext::setSourceSurface — The setSourceSurface purpose
- CairoContext::setTolerance — The setTolerance purpose
- CairoContext::showPage — The showPage purpose
- CairoContext::showText — The showText purpose
- CairoContext::status — The status purpose
- CairoContext::stroke — The stroke purpose
- CairoContext::strokeExtents — The strokeExtents purpose
- CairoContext::strokePreserve — The strokePreserve purpose
- CairoContext::textExtents — The textExtents purpose
- CairoContext::textPath — The textPath purpose
- CairoContext::transform — The transform purpose
- CairoContext::translate — The translate purpose
- CairoContext::userToDevice — The userToDevice purpose
- CairoContext::userToDeviceDistance — The userToDeviceDistance purpose
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-class.cairocontext.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.