#include <Cairo.h>
Public Member Functions | |
| Context () | |
| Context (const SurfaceBase &surface) | |
| Context (const Context &other) | |
| ~Context () | |
| Context & | operator= (const Context &other) |
| cairo_t * | getCairo () |
| Returns the native cairo context pointer. | |
| cairo_surface_t * | getCairoSuface () |
| Returns the native cairo surface pointer. | |
| void | save () |
| void | restore () |
| void | flush () |
| void | pushGroup () |
| void | pushGroupWithContent (int32_t content) |
| Pattern * | popGroup () |
| void | popGroupToSource () |
| void | setSourceRgb (double red, double green, double blue) |
| void | setSourceRgba (double red, double green, double blue, double alpha) |
| void | setSource (const Color &col) |
| void | setSource (const ColorAf &col) |
| void | setSource (const Pattern &source) |
| void | setSourceSurface (SurfaceBase &surface, double x, double y) |
| Pattern * | getSource () |
| void | copySurface (const SurfaceBase &surface, const Area &srcArea, const Vec2i &dstOffset=Vec2i::zero()) |
| void | setAntiAlias (int32_t antialias) |
| int32_t | getAntiAlias () |
| void | setDash (const double *dashes, int numDashes, double offset) |
| void | setDash (const std::vector< double > &dashes, double offset=0) |
| void | unsetDash () |
| int | getDashCount () const |
| void | getDash (double *dashes, double *offset) |
| void | setFillRule (int32_t fill_rule) |
| int32_t | getFillRule () |
| void | setLineCap (int32_t line_cap) |
| int32_t | getLineCap () |
| void | setLineJoin (int32_t line_join) |
| int32_t | getLineJoin () |
| void | setLineWidth (double width) |
| double | getLineWidth () const |
| void | setMiterLimit (double limit) |
| double | getMiterLimit () const |
| void | setOperator (int32_t op) |
| int32_t | getOperator () |
| void | setTolerance (double tolerance) |
| double | getTolerance () const |
| void | clip () |
| void | clipPerserve () |
| void | clipExtents (double *x1, double *y1, double *x2, double *y2) |
| void | resetClip () |
| void | fill () |
| void | fillPreserve () |
| void | fillExtents (double *x1, double *y1, double *x2, double *y2) |
| bool | inFill (double x, double y) |
| void | mask (Pattern *pattern) |
| void | maskSurface (SurfaceBase *surface, double surface_x, double surface_y) |
| void | paint () |
| void | paintWithAlpha (double alpha) |
| void | stroke () |
| void | strokePreserve () |
| void | strokeExtents (double *x1, double *y1, double *x2, double *y2) |
| bool | inStroke (double x, double y) |
| void | copyPage () |
| void | showPage () |
| void | copyPath (cinder::Shape2d *resultPath) |
| void | copyPathFlat (cinder::Shape2d *resultPath) |
| void | getCurrentPoint (double *x, double *y) |
| void | newPath () |
| void | newSubPath () |
| void | closePath () |
| void | arc (double xc, double yc, double radius, double angle1, double angle2) |
| void | arc (const Vec2f ¢er, double radius, double angle1, double angle2) |
| void | arcNegative (double xc, double yc, double radius, double angle1, double angle2) |
| void | arcNegative (const Vec2f ¢er, double radius, double angle1, double angle2) |
| void | quadTo (double x1, double y1, double x2, double y2) |
| void | quadTo (const Vec2f &v1, const Vec2f &v2) |
| void | curveTo (double x1, double y1, double x2, double y2, double x3, double y3) |
| void | curveTo (const Vec2f &v1, const Vec2f &v2, const Vec2f &v3) |
| void | line (const Vec2f &v1, const Vec2f &v2) |
| void | lineTo (double x, double y) |
| void | lineTo (const Vec2f &v) |
| void | moveTo (double x, double y) |
| void | moveTo (const Vec2f &v) |
| void | rectangle (double x, double y, double width, double height) |
| void | rectangle (const Rectf &r) |
| void | rectangle (const Vec2f &upperLeft, const Vec2f &lowerRight) |
| void | textPath (const char *utf8) |
| void | relCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3) |
| void | relLineTo (double dx, double dy) |
| void | relMoveTo (double dx, double dy) |
| void | appendPath (const cinder::Shape2d &path) |
| void | appendPath (const cinder::Path2d &path) |
| void | circle (double dx, double dy, double radius) |
| void | circle (const Vec2f &v, double radius) |
| void | translate (double tx, double ty) |
| void | translate (const Vec2f &v) |
| void | scale (double sx, double sy) |
| void | rotate (double angle) |
| void | transform (const Matrix &aMatrix) |
| void | setMatrix (const Matrix &aMatrix) |
| void | getMatrix (Matrix *aMatrix) |
| void | identityMatrix () |
| void | userToDevice (double *x, double *y) |
| void | userToDeviceDistance (double *dx, double *dy) |
| void | deviceToUser (double *x, double *y) |
| void | deviceToUserDistance (double *dx, double *dy) |
| void | setFont (const cinder::Font &font) |
| void | selectFontFace (const std::string &family, int32_t slant, int32_t weight) |
| void | setFontSize (double size) |
| void | setFontMatrix (const Matrix &matrix) |
| void | getFontMatrix (Matrix *matrix) |
| void | setFontOptions (const FontOptions *options) |
| void | getFontOptions (FontOptions *options) |
| void | setFontFace (const FontFace &font_face) |
| FontFace * | getFontFace () |
| void | setScaledFont (const ScaledFont *scaled_font) |
| ScaledFont * | getScaledFont () |
| void | showText (const std::string &s) |
| FontExtents | fontExtents () |
| TextExtents | textExtents (const std::string &s) |
Protected Attributes | |
| cairo_t * | mCairo |
| cairo_surface_t * | mCairoSurface |
| cinder::cairo::Context::Context | ( | ) |
| cinder::cairo::Context::Context | ( | const SurfaceBase & | surface | ) |
| cinder::cairo::Context::Context | ( | const Context & | other | ) |
| cinder::cairo::Context::~Context | ( | ) |
| cairo_t * cinder::cairo::Context::getCairo | ( | ) |
Returns the native cairo context pointer.
| cairo_surface_t * cinder::cairo::Context::getCairoSuface | ( | ) |
Returns the native cairo surface pointer.
| void cinder::cairo::Context::save | ( | ) |
| void cinder::cairo::Context::restore | ( | ) |
| void cinder::cairo::Context::flush | ( | ) |
| void cinder::cairo::Context::pushGroup | ( | ) |
| void cinder::cairo::Context::pushGroupWithContent | ( | int32_t | content | ) |
| Pattern * cinder::cairo::Context::popGroup | ( | ) |
| void cinder::cairo::Context::popGroupToSource | ( | ) |
| void cinder::cairo::Context::setSourceRgb | ( | double | red, | |
| double | green, | |||
| double | blue | |||
| ) |
| void cinder::cairo::Context::setSourceRgba | ( | double | red, | |
| double | green, | |||
| double | blue, | |||
| double | alpha | |||
| ) |
| void cinder::cairo::Context::setSource | ( | const Color & | col | ) |
| void cinder::cairo::Context::setSource | ( | const ColorAf & | col | ) |
| void cinder::cairo::Context::setSource | ( | const Pattern & | source | ) |
| void cinder::cairo::Context::setSourceSurface | ( | SurfaceBase & | surface, | |
| double | x, | |||
| double | y | |||
| ) |
| Pattern * cinder::cairo::Context::getSource | ( | ) |
| void cinder::cairo::Context::copySurface | ( | const SurfaceBase & | surface, | |
| const Area & | srcArea, | |||
| const Vec2i & | dstOffset = Vec2i::zero() | |||
| ) |
| void cinder::cairo::Context::setAntiAlias | ( | int32_t | antialias | ) |
| int32_t cinder::cairo::Context::getAntiAlias | ( | ) |
| void cinder::cairo::Context::setDash | ( | const double * | dashes, | |
| int | numDashes, | |||
| double | offset | |||
| ) |
| void cinder::cairo::Context::setDash | ( | const std::vector< double > & | dashes, | |
| double | offset = 0 | |||
| ) |
| void cinder::cairo::Context::unsetDash | ( | ) |
| int cinder::cairo::Context::getDashCount | ( | ) | const |
| void cinder::cairo::Context::getDash | ( | double * | dashes, | |
| double * | offset | |||
| ) |
| void cinder::cairo::Context::setFillRule | ( | int32_t | fill_rule | ) |
| int32_t cinder::cairo::Context::getFillRule | ( | ) |
| void cinder::cairo::Context::setLineCap | ( | int32_t | line_cap | ) |
| int32_t cinder::cairo::Context::getLineCap | ( | ) |
| void cinder::cairo::Context::setLineJoin | ( | int32_t | line_join | ) |
| int32_t cinder::cairo::Context::getLineJoin | ( | ) |
| void cinder::cairo::Context::setLineWidth | ( | double | width | ) |
| double cinder::cairo::Context::getLineWidth | ( | ) | const |
| void cinder::cairo::Context::setMiterLimit | ( | double | limit | ) |
| double cinder::cairo::Context::getMiterLimit | ( | ) | const |
| void cinder::cairo::Context::setOperator | ( | int32_t | op | ) |
| int32_t cinder::cairo::Context::getOperator | ( | ) |
| void cinder::cairo::Context::setTolerance | ( | double | tolerance | ) |
| double cinder::cairo::Context::getTolerance | ( | ) | const |
| void cinder::cairo::Context::clip | ( | ) |
| void cinder::cairo::Context::clipPerserve | ( | ) |
| void cinder::cairo::Context::clipExtents | ( | double * | x1, | |
| double * | y1, | |||
| double * | x2, | |||
| double * | y2 | |||
| ) |
| void cinder::cairo::Context::resetClip | ( | ) |
| void cinder::cairo::Context::fill | ( | ) |
| void cinder::cairo::Context::fillPreserve | ( | ) |
| void cinder::cairo::Context::fillExtents | ( | double * | x1, | |
| double * | y1, | |||
| double * | x2, | |||
| double * | y2 | |||
| ) |
| bool cinder::cairo::Context::inFill | ( | double | x, | |
| double | y | |||
| ) |
| void cinder::cairo::Context::mask | ( | Pattern * | pattern | ) |
| void cinder::cairo::Context::maskSurface | ( | SurfaceBase * | surface, | |
| double | surface_x, | |||
| double | surface_y | |||
| ) |
| void cinder::cairo::Context::paint | ( | ) |
| void cinder::cairo::Context::paintWithAlpha | ( | double | alpha | ) |
| void cinder::cairo::Context::stroke | ( | ) |
| void cinder::cairo::Context::strokePreserve | ( | ) |
| void cinder::cairo::Context::strokeExtents | ( | double * | x1, | |
| double * | y1, | |||
| double * | x2, | |||
| double * | y2 | |||
| ) |
| bool cinder::cairo::Context::inStroke | ( | double | x, | |
| double | y | |||
| ) |
| void cinder::cairo::Context::copyPage | ( | ) |
| void cinder::cairo::Context::showPage | ( | ) |
| void cinder::cairo::Context::copyPath | ( | cinder::Shape2d * | resultPath | ) |
Copy the current path to resultPath
| void cinder::cairo::Context::copyPathFlat | ( | cinder::Shape2d * | resultPath | ) |
Copy a flattened, curve-free version of the current path to resultPath
| void cinder::cairo::Context::getCurrentPoint | ( | double * | x, | |
| double * | y | |||
| ) |
| void cinder::cairo::Context::newPath | ( | ) |
| void cinder::cairo::Context::newSubPath | ( | ) |
| void cinder::cairo::Context::closePath | ( | ) |
| void cinder::cairo::Context::arc | ( | double | xc, | |
| double | yc, | |||
| double | radius, | |||
| double | angle1, | |||
| double | angle2 | |||
| ) |
| void cinder::cairo::Context::arc | ( | const Vec2f & | center, | |
| double | radius, | |||
| double | angle1, | |||
| double | angle2 | |||
| ) |
| void cinder::cairo::Context::arcNegative | ( | double | xc, | |
| double | yc, | |||
| double | radius, | |||
| double | angle1, | |||
| double | angle2 | |||
| ) |
| void cinder::cairo::Context::arcNegative | ( | const Vec2f & | center, | |
| double | radius, | |||
| double | angle1, | |||
| double | angle2 | |||
| ) |
| void cinder::cairo::Context::quadTo | ( | double | x1, | |
| double | y1, | |||
| double | x2, | |||
| double | y2 | |||
| ) |
| void cinder::cairo::Context::curveTo | ( | double | x1, | |
| double | y1, | |||
| double | x2, | |||
| double | y2, | |||
| double | x3, | |||
| double | y3 | |||
| ) |
| void cinder::cairo::Context::lineTo | ( | double | x, | |
| double | y | |||
| ) |
| void cinder::cairo::Context::lineTo | ( | const Vec2f & | v | ) |
| void cinder::cairo::Context::moveTo | ( | double | x, | |
| double | y | |||
| ) |
| void cinder::cairo::Context::moveTo | ( | const Vec2f & | v | ) |
| void cinder::cairo::Context::rectangle | ( | double | x, | |
| double | y, | |||
| double | width, | |||
| double | height | |||
| ) |
| void cinder::cairo::Context::rectangle | ( | const Rectf & | r | ) |
| void cinder::cairo::Context::textPath | ( | const char * | utf8 | ) |
| void cinder::cairo::Context::relCurveTo | ( | double | dx1, | |
| double | dy1, | |||
| double | dx2, | |||
| double | dy2, | |||
| double | dx3, | |||
| double | dy3 | |||
| ) |
| void cinder::cairo::Context::relLineTo | ( | double | dx, | |
| double | dy | |||
| ) |
| void cinder::cairo::Context::relMoveTo | ( | double | dx, | |
| double | dy | |||
| ) |
| void cinder::cairo::Context::appendPath | ( | const cinder::Shape2d & | path | ) |
| void cinder::cairo::Context::appendPath | ( | const cinder::Path2d & | path | ) |
| void cinder::cairo::Context::circle | ( | double | dx, | |
| double | dy, | |||
| double | radius | |||
| ) |
| void cinder::cairo::Context::circle | ( | const Vec2f & | v, | |
| double | radius | |||
| ) |
| void cinder::cairo::Context::translate | ( | double | tx, | |
| double | ty | |||
| ) |
| void cinder::cairo::Context::translate | ( | const Vec2f & | v | ) |
| void cinder::cairo::Context::scale | ( | double | sx, | |
| double | sy | |||
| ) |
| void cinder::cairo::Context::rotate | ( | double | angle | ) |
| void cinder::cairo::Context::transform | ( | const Matrix & | aMatrix | ) |
| void cinder::cairo::Context::setMatrix | ( | const Matrix & | aMatrix | ) |
| void cinder::cairo::Context::getMatrix | ( | Matrix * | aMatrix | ) |
| void cinder::cairo::Context::identityMatrix | ( | ) |
| void cinder::cairo::Context::userToDevice | ( | double * | x, | |
| double * | y | |||
| ) |
| void cinder::cairo::Context::userToDeviceDistance | ( | double * | dx, | |
| double * | dy | |||
| ) |
| void cinder::cairo::Context::deviceToUser | ( | double * | x, | |
| double * | y | |||
| ) |
| void cinder::cairo::Context::deviceToUserDistance | ( | double * | dx, | |
| double * | dy | |||
| ) |
| void cinder::cairo::Context::setFont | ( | const cinder::Font & | font | ) |
| void cinder::cairo::Context::selectFontFace | ( | const std::string & | family, | |
| int32_t | slant, | |||
| int32_t | weight | |||
| ) |
| void cinder::cairo::Context::setFontSize | ( | double | size | ) |
| void cinder::cairo::Context::setFontMatrix | ( | const Matrix & | matrix | ) |
| void cinder::cairo::Context::getFontMatrix | ( | Matrix * | matrix | ) |
| void cinder::cairo::Context::setFontOptions | ( | const FontOptions * | options | ) |
| void cinder::cairo::Context::getFontOptions | ( | FontOptions * | options | ) |
| void cinder::cairo::Context::setFontFace | ( | const FontFace & | font_face | ) |
| FontFace * cinder::cairo::Context::getFontFace | ( | ) |
| void cinder::cairo::Context::setScaledFont | ( | const ScaledFont * | scaled_font | ) |
| ScaledFont * cinder::cairo::Context::getScaledFont | ( | ) |
| void cinder::cairo::Context::showText | ( | const std::string & | s | ) |
| FontExtents cinder::cairo::Context::fontExtents | ( | ) |
| TextExtents cinder::cairo::Context::textExtents | ( | const std::string & | s | ) |
cairo_t* cinder::cairo::Context::mCairo [protected] |
cairo_surface_t* cinder::cairo::Context::mCairoSurface [protected] |