CairoContext::clip
cairo_clip
(PECL cairo >= 0.1.0)
CairoContext::clip -- cairo_clip — Establishes a new clip region
Description
Object oriented style (method):
Procedural style:
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().
Parameters
-
context
-
A valid CairoContext object
Return Values
No value is returned.
Examples
Example #1 Object oriented style
<?php
$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);
$context = new CairoContext($surface);
$context->clip();
?>
Example #2 Procedural style
<?php
$surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
$context = cairo_create($surface);
cairo_clip($context);
?>
See Also
- CairoContext::resetClip() - The resetClip purpose
- cairo_reset_clip() - The resetClip purpose
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Обработка и генерация изображений
- Cairo
- Функция 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() - Retrives 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
Коментарии
404 Not Found