鉴于我做了这样的事情:
void glOrtho( GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble nearVal,
GLdouble farVal);
结果是:http ://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml我可以实现这样的矩阵:
http://cairographics.org/manual/cairo-matrix.html
我试过这个:
cairo_matrix_t mat;
mat.xx = 2 / (right - left);
mat.yx = 0;
mat.xy = 2 / (top - bottom);
mat.yy = 0;
mat.x0 = 0;
mat.y0 = 0;
cairo_set_matrix(cr,&mat);
但它没有用。我怎样才能获得 GlOrtho 在开罗制作的相同矩阵?谢谢