如何在黑莓中旋转VerticalfieldManager 180度?

时间:2013-03-04 09:09:21

标签: blackberry rotation

vf=new VerticalFieldManager()
{
    public void paint(Graphics graphics)
    {
        int theta = Fixed32.toFP(180);
        int cell_11 = Fixed32.cosd(theta);
        int cell_12 = -Fixed32.sind(theta);
        int cell_21 = Fixed32.sind(theta);
        int cell_22 = Fixed32.cosd(theta);

        int[] rotate = new int[] 
                { cell_11, cell_12,
                  0, 0,
                  cell_21, cell_22,
                };

        super.paint(graphics);
        myFont = Font.getDefault().derive(Font.PLAIN, 0, 
                                          DrawStyle.HCENTER, Font.BOLD, 
                                          0, rotate);
        vf.setFont(myFont );            
    }
};

0 个答案:

没有答案