如何转换gdkpoint?说:
GdkPoint p2 = sometransform.transform(P1);
答案 0 :(得分:0)
它应该用PangoMatrix完成,这里x和y坐标需要设置为x和y值,并对(x,y)值应用当前变换。
PangoMatrix elementMatrix = PANGO_MATRIX_INIT;
GdkPoint elementCenter;
// do some other operations here like translation, rotation etc...
double *x, *y;
*x = elementCenter.x;
*y = elementCenter.y;
pango_matrix_transform_point(&elementMatrix,x,y);