Public Member Functions

  • Context ()
  • Context (const SurfaceBase &surface)
  • Context (const Context &other)
  • ~Context ()
  • operator= (const Context &other)
  • void
    save ()
  • void
    restore ()
  • void
    flush ()
  • void
    pushGroup ()
  • void
    pushGroupWithContent (int32_t content)
  • 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)
  • getSource ()
  • void
    copySurface (const SurfaceBase &surface, const Area &srcArea, const ivec2 &dstOffset=ivec2(0))
  • void
    copySurface (const SurfaceBase &surface, const Area &srcArea, const Rectf &dstRect)
  • 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
    getCurrentPoint (double *x, double *y) const
  • vec2
    getCurrentPoint () const
  • void
    newPath ()
  • void
    newSubPath ()
  • void
    closePath ()
  • void
    arc (double xc, double yc, double radius, double angle1, double angle2)
  • void
    arc (const vec2 &center, double radius, double angle1, double angle2)
  • void
    arcNegative (double xc, double yc, double radius, double angle1, double angle2)
  • void
    arcNegative (const vec2 &center, double radius, double angle1, double angle2)
  • void
    quadTo (double x1, double y1, double x2, double y2)
  • void
    quadTo (const vec2 &v1, const vec2 &v2)
  • void
    curveTo (double x1, double y1, double x2, double y2, double x3, double y3)
  • void
    curveTo (const vec2 &v1, const vec2 &v2, const vec2 &v3)
  • void
    line (const vec2 &v1, const vec2 &v2)
  • void
    lineTo (double x, double y)
  • void
    lineTo (const vec2 &v)
  • void
    moveTo (double x, double y)
  • void
    moveTo (const vec2 &v)
  • void
    rectangle (double x, double y, double width, double height)
  • void
    rectangle (const Rectf &r)
  • void
    rectangle (const vec2 &upperLeft, const vec2 &lowerRight)
  • void
    roundedRectangle (const Rectf &r, float cornerRadius)
  • 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 vec2 &v, double radius)
  • void
    translate (double tx, double ty)
  • void
    translate (const vec2 &v)
  • void
    scale (double sx, double sy)
  • void
    rotate (double radians)
  • void
    transform (const Matrix &aMatrix)
  • void
    transform (const mat3 &matrix)
  • void
    setMatrix (const Matrix &aMatrix)
  • void
    setMatrix (const mat3 &matrix)
  • void
    getMatrix (Matrix *aMatrix)
  • mat3
    getMatrix () const
  • 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)
  • getFontFace ()
  • void
    setScaledFont (const ScaledFont *scaled_font)
  • getScaledFont ()
  • void
    showText (const std::string &s)
  • void
    textPath (const std::string &s)
  • void
    glyphPath (uint16_t index, const vec2 &offset)
  • fontExtents ()
  • textExtents (const std::string &s)
  • std::string
    statusToString () const

Protected Attributes

  • cairo_t *
    mCairo
  • cairo_surface_t *
    mCairoSurface