This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
ofCairoRenderer.h
Go to the documentation of this file.
27 void setup(const of::filesystem::path & filename, Type type=ofCairoRenderer::FROM_FILE_EXTENSION, bool multiPage=true, bool b3D=false, ofRectangle outputsize = ofRectangle(0,0,0,0));
28 void setupMemoryOnly(Type _type, bool multiPage=true, bool b3D=false, ofRectangle viewport = ofRectangle(0,0,0,0));
39 void draw(const ofMesh & vertexData, ofPolyRenderMode mode, bool useColors, bool useTextures, bool useNormals) const;
43 void draw(const ofImage & img, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
44 void draw(const ofFloatImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
45 void draw(const ofShortImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
58 void viewport(float x = 0, float y = 0, float width = -1, float height = -1, bool invertY = true);
59 void setupScreenPerspective(float width = -1, float height = -1, float fov = 60, float nearDist = 0, float farDist = 0);
60 void setupScreenOrtho(float width = -1, float height = -1, float nearDist = -1, float farDist = 1);
150 void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const;
171 static _cairo_status stream_function(void *closure,const unsigned char *data, unsigned int length);
Definition of3dGraphics.h:445
virtual void draw(const ofPolyline &poly) const =0
Draw a polyline with this renderer.
Definition ofFileUtils.h:15
Definition ofCairoRenderer.h:12
void scale(float xAmnt, float yAmnt, float zAmnt=1)
Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt.
Definition ofCairoRenderer.cpp:796
void rotateXRad(float radians)
Rotate this renderer's current matrix by degrees about the x axis.
Definition ofCairoRenderer.cpp:882
void rotateRad(float radians, float vecX, float vecY, float vecZ)
Rotate this renderer's current matrix by degrees about a euler.
Definition ofCairoRenderer.cpp:866
void setupGraphicDefaults()
setup the default graphics settings for this renderer.
Definition ofCairoRenderer.cpp:1149
ofPath & getPath()
Get a reference to the path used internally by this renderer.
Definition ofCairoRenderer.cpp:623
void setRectMode(ofRectMode mode)
Set this renderer's rect mode.
Definition ofCairoRenderer.cpp:628
void drawString(std::string text, float x, float y, float z) const
Draw text with this renderer using the current bitmap text mode.
virtual void bind(const ofCamera &camera, const ofRectangle &viewport)
Bind camera's matrices to this renderer's matrix stack.
Definition ofCairoRenderer.h:163
void setHexColor(int hexColor)
Set the global color this renderer will use when drawing.
Definition ofCairoRenderer.cpp:740
void popMatrix()
Pops this renderer's current matrix stack.
Definition ofCairoRenderer.cpp:767
void setStyle(const ofStyle &style)
Set this renderer's current style object.
Definition ofCairoRenderer.cpp:158
void setLineSmoothing(bool smooth)
Enable/disable line smoothing for this renderer if it's supported.
Definition ofCairoRenderer.cpp:707
ofStyle getStyle() const
Get this renderer's current style object.
Definition ofCairoRenderer.cpp:1192
void drawEllipse(float x, float y, float z, float width, float height) const
Draw an ellipse using a 3D point, width, and height.
Definition ofCairoRenderer.cpp:1333
ofFillFlag getFillMode()
Get this renderer's current fill flag.
Definition ofCairoRenderer.cpp:650
void clear()
Clear this renderer's current color and bit depths.
Definition ofCairoRenderer.cpp:1162
void matrixMode(ofMatrixMode mode)
Sets this renderer's current matrix mode.
Definition ofCairoRenderer.cpp:812
void drawLine(float x1, float y1, float z1, float x2, float y2, float z2) const
Draw a line between two 3D points.
Definition ofCairoRenderer.cpp:1256
ofPixels & getImageSurfacePixels()
Definition ofCairoRenderer.cpp:1376
void setBackgroundAuto(bool bManual)
Enable/disable automatic redrawing of the background each frame.
Definition ofCairoRenderer.cpp:1214
void drawString(const ofTrueTypeFont &font, std::string text, float x, float y) const
Draw text with this renderer using an ofTrueType font.
void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const
Draw a triangle using three 3D points.
Definition ofCairoRenderer.cpp:1291
void multMatrix(const glm::mat4 &m)
Multiply this renderer's current matrix by m.
Definition ofCairoRenderer.cpp:850
void pushStyle()
Push this renderer's current style into its internal style stack.
Definition ofCairoRenderer.cpp:1196
void setupScreenOrtho(float width=-1, float height=-1, float nearDist=-1, float farDist=1)
Setup the renderer to use an orthographic matrix.
Definition ofCairoRenderer.cpp:1013
void setFillMode(ofFillFlag fill)
set this renderer's fill flag.
Definition ofCairoRenderer.cpp:638
ofRectangle getNativeViewport() const
Get this renderer's current native viewport.
Definition ofCairoRenderer.cpp:1076
void setPolyMode(ofPolyWindingMode mode)
Set this renderer's poly winding mode.
Definition ofCairoRenderer.cpp:1133
void setCurveResolution(int resolution)
Set the resolution used when drawing curves with this renderer.
Definition ofCairoRenderer.cpp:195
void setBackgroundColor(const ofColor &c)
Set this renderer's background color.
Definition ofCairoRenderer.cpp:1224
void loadViewMatrix(const glm::mat4 &m)
Load m into this renderer's matrix stack as a view matrix.
Definition ofCairoRenderer.cpp:1101
void rotateYRad(float radians)
Rotate this renderer's current matrix by degrees about the y axis.
Definition ofCairoRenderer.cpp:886
void popStyle()
Pop this renderer's current style from its internal style stack.
Definition ofCairoRenderer.cpp:1206
void startRender()
Starts using this renderer as the rendering surface.
Definition ofCairoRenderer.cpp:139
int getViewportWidth() const
Get the renderer's current viewport width.
Definition ofCairoRenderer.cpp:1081
void draw(const std::vector< glm::vec3 > &vertexData, ofPrimitiveMode drawMode) const
void setupScreenPerspective(float width=-1, float height=-1, float fov=60, float nearDist=0, float farDist=0)
Setup the renderer to use a perspective matrix.
Definition ofCairoRenderer.cpp:950
void rotateZRad(float radians)
Rotate this renderer's current matrix by degrees about the z axis.
Definition ofCairoRenderer.cpp:891
void setupMemoryOnly(Type _type, bool multiPage=true, bool b3D=false, ofRectangle viewport=ofRectangle(0, 0, 0, 0))
Definition ofCairoRenderer.cpp:112
void enableAntiAliasing()
Enable this renderer to use anti-aliasing if it is supported.
Definition ofCairoRenderer.cpp:1323
int getViewportHeight() const
Get the renderer's current viewport width.
Definition ofCairoRenderer.cpp:1086
void disableAntiAliasing()
Disable this renderer from using anti-aliasing.
Definition ofCairoRenderer.cpp:1328
void setBitmapTextMode(ofDrawBitmapMode mode)
Set this renderer's bitmap text mode.
Definition ofCairoRenderer.cpp:1188
void finishRender()
Stop using this renderer as the rendering surface.
Definition ofCairoRenderer.cpp:154
void multViewMatrix(const glm::mat4 &m)
Multiply this renderer's view matrix by m.
Definition ofCairoRenderer.cpp:1106
void setOrientation(ofOrientation orientation, bool vFlip)
set this renderer's orientation.
Definition ofCairoRenderer.cpp:1091
void popView()
Pop the current viewport from the renderer's view stack.
Definition ofCairoRenderer.cpp:914
ofHandednessType getCoordHandedness() const
Get the coordinate handidness of this renderer.
Definition ofCairoRenderer.cpp:1144
void setCoordHandedness(ofHandednessType handedness)
Set the coordinate handidness of this renderer.
Definition ofCairoRenderer.cpp:1139
const of3dGraphics & get3dGraphics() const
Get a const reference of this renderer's 3D graphics object.
Definition ofCairoRenderer.cpp:1390
void loadMatrix(const glm::mat4 &m)
Load a matrix as this renderer's current matrix.
Definition ofCairoRenderer.cpp:834
void setLineWidth(float lineWidth)
Set the line width this renderer should use when drawing lines.
Definition ofCairoRenderer.cpp:659
cairo_surface_t * getCairoSurface()
Definition ofCairoRenderer.cpp:1372
bool getBackgroundAuto()
Get the current auto redraw background setting for this renderer.
Definition ofCairoRenderer.cpp:1219
virtual void unbind(const ofCamera &camera)
Unbind the camera from this renderer.
Definition ofCairoRenderer.h:164
void setColor(int r, int g, int b)
Set the global color this renderer will use when drawing.
Definition ofCairoRenderer.cpp:714
void drawCircle(float x, float y, float z, float radius) const
Draw a circle using a 3D point and a radius.
Definition ofCairoRenderer.cpp:1309
glm::mat4 getCurrentViewMatrix() const
Get this renderer's current view matrix.
Definition ofCairoRenderer.cpp:1111
void drawRectangle(float x, float y, float z, float w, float h) const
Draw a rectangle using a 3D point and a width and height.
Definition ofCairoRenderer.cpp:1265
ofRectangle getCurrentViewport() const
Get this renderer's current viewport.
Definition ofCairoRenderer.cpp:1071
void translate(float x, float y, float z=0)
Translate this renderer's current matrix by x, y, and z.
Definition ofCairoRenderer.cpp:778
void setCircleResolution(int)
Set the resolution to use when drawing ellipses with this renderer.
Definition ofCairoRenderer.cpp:1129
void setDepthTest(bool depthTest)
Enable/disable depth testing with this renderer.
Definition ofCairoRenderer.cpp:668
void pushView()
Push the current viewport into the renderer's viewport stack.
Definition ofCairoRenderer.cpp:909
void setBlendMode(ofBlendMode blendMode)
Set this renderer's current blend mode.
Definition ofCairoRenderer.cpp:673
glm::mat4 getCurrentNormalMatrix() const
Get this renderer's current normal matrix.
Definition ofCairoRenderer.cpp:1117
void clearAlpha()
Restore the alpha color to its full opacity value.
Definition ofCairoRenderer.cpp:1184
void setup(const of::filesystem::path &filename, Type type=ofCairoRenderer::FROM_FILE_EXTENSION, bool multiPage=true, bool b3D=false, ofRectangle outputsize=ofRectangle(0, 0, 0, 0))
Definition ofCairoRenderer.cpp:40
ofRectMode getRectMode()
Get this renderer's current rect mode.
Definition ofCairoRenderer.cpp:633
void loadIdentityMatrix(void)
Load this renderer's identity matrix.
Definition ofCairoRenderer.cpp:817
ofColor getBackgroundColor()
Get this renderer's current background color.
Definition ofCairoRenderer.cpp:1229
glm::mat4 getCurrentOrientationMatrix() const
Get this renderer's current orientation matrix.
Definition ofCairoRenderer.cpp:1123
const std::string & getType()
Get the string representation of the renderer type.
Definition ofCairoRenderer.h:18
void pushMatrix()
Pushes this renderer's matrix stack down by one.
Definition ofCairoRenderer.cpp:756
glm::mat4 getCurrentMatrix(ofMatrixMode matrixMode_) const
Get this renderer's current matrix for particular a matrix mode.
Definition ofCairoRenderer.cpp:750
bool isVFlipped() const
Returns true if the renderer's current viewport is vertically flipped.
Definition ofCairoRenderer.cpp:1096
void viewport(ofRectangle viewport)
Set this renderer's viewport using a rectangle.
Definition ofCairoRenderer.cpp:923
void draw(const ofPath &shape) const
Draw a path with this renderer.
Definition ofCairoRenderer.cpp:200
void background(const ofColor &c)
Immediately paint a background color to the screen.
Definition ofCairoRenderer.cpp:1234
void setupScreen()
setup the default screen settings for this renderer.
Definition ofCairoRenderer.cpp:901
A generic 3d object in space with transformation (position, rotation, scale).
Definition ofNode.h:14
ofPath is a way to create a path or multiple paths consisting of points. It allows you to combine mul...
Definition ofPath.h:38
Contains general information about the style of ofGraphics elements such as color,...
Definition ofGraphicsBaseTypes.h:51
Definition ofTrueTypeFont.h:164
ofDrawBitmapMode
Sets the bitmap drawing mode for text.
Definition ofGraphicsConstants.h:125
ofMatrixMode
represents the available matrix types used internally in ofMatrixStack.
Definition ofGraphicsConstants.h:119
ofHandednessType
represents the available matrix coordinate system handednesses.
Definition ofGraphicsConstants.h:116
ofRectMode
Used to represent the available rectangle drawing modes.
Definition ofGraphicsConstants.h:139
ofBlendMode
Used to represent the available blending modes for drawing.
Definition ofGraphicsConstants.h:57
ofPolyWindingMode
represents the available polygon winding modes.
Definition ofGraphicsConstants.h:97
#define a
#define c
#define b
ofOrientation
Used to represent the available screen orientations.
Definition ofWindowSettings.h:25
Definition ofPath.h:366