Matrix 处理2+;创建多个斜体文字图例

Matrix 处理2+;创建多个斜体文字图例,matrix,processing,matrix-inverse,matrix-transform,Matrix,Processing,Matrix Inverse,Matrix Transform,我想为条形图创建一个图例,如下所示: | | | | / / / / 其中|:数据列, /:是每列的图例 我无法获得正确的文字图例,请尝试多重maxtrix转换,但没有一个可以正常工作 for (int col = 0; col < 4; col++) { // Draw emotions legends applet.fill(100); applet.textF

我想为条形图创建一个图例,如下所示:

 |  |  |  |
/  /  /  /
其中|:数据列, /:是每列的图例

我无法获得正确的文字图例,请尝试多重maxtrix转换,但没有一个可以正常工作

for (int col = 0; col < 4; col++) {
                       // Draw emotions legends
                applet.fill(100);
                applet.textFont(font, 20);

                // perform matrix transform
                applet.rotate(-0.75f);
                applet.translate(col * columnW, h);

                // draw text
                applet.text(legends[col], 0, 0);

                // undo matrix
                applet.translate(-col * columnW, -h);
                applet.rotate(0.75f);
}
for(int col=0;col<4;col++){
//画情感传奇
applet.fill(100);
applet.textFont(字体,20);
//执行矩阵变换
小程序旋转(-0.75f);
applet.translate(列*列W,h);
//绘制文本
文本(图例[col],0,0);
//撤消矩阵
translate(-col*columnW,-h);
小程序旋转(0.75f);
}

请帮助:(

对于那些想知道答案的人:

for (int col = 0; col < 4; col++) {
                applet.pushMatrix();
                applet.translate(col * blockW, h);
                // Rotate the text
                applet.rotate(-0.75f);

                // Display the text
                applet.text(Emotion.values()[col].toString(), 0, 0);
                applet.popMatrix();
}
for(int col=0;col<4;col++){
applet.pushMatrix();
applet.translate(col*blockW,h);
//旋转文本
小程序旋转(-0.75f);
//显示文本
文本(Emotion.values()[col].toString(),0,0);
applet.popMatrix();
}