J2me draw Location:
HCENTER = 1;
VCENTER = 2;
LEFT = 4;
RIGHT = 8;
TOP = 16;
BOTTOM = 32;
BASELINE = 64;
其中:
HCENTER为水平,X不变,Y上下分TOP和BOTTOM
VCENTER为垂直,Y不变,X左右分LEFT和RIGHT
([color=red]注:HCENTER、VCENTER和BASELINE三个不能“同时”修饰文本,即drawString()[/color] )
例图说明:
40(RIGHT|BOTTOM) | 36(LEFT|BOTTOM)
---------------------------|------------------------>
24(LEFT|TOP) | 20(RIGHT|TOP)
3 的蓝色圆(HCENTER |VCENTER)
17的蓝色圆(TOP |HCENTER )
33的蓝色圆(BOTTOM|HCENTER )
10的蓝色圆(RIGHT|VCENTER )
6 的蓝色圆(LEFT|VCENTER )
[img]http://dl.iteye.com/upload/attachment/294749/ef60c0c7-0df8-3036-8ec6-a8f62efbcce0.jpg[/img]
HCENTER = 1;
VCENTER = 2;
LEFT = 4;
RIGHT = 8;
TOP = 16;
BOTTOM = 32;
BASELINE = 64;
其中:
HCENTER为水平,X不变,Y上下分TOP和BOTTOM
VCENTER为垂直,Y不变,X左右分LEFT和RIGHT
([color=red]注:HCENTER、VCENTER和BASELINE三个不能“同时”修饰文本,即drawString()[/color] )
例图说明:
40(RIGHT|BOTTOM) | 36(LEFT|BOTTOM)
---------------------------|------------------------>
24(LEFT|TOP) | 20(RIGHT|TOP)
3 的蓝色圆(HCENTER |VCENTER)
17的蓝色圆(TOP |HCENTER )
33的蓝色圆(BOTTOM|HCENTER )
10的蓝色圆(RIGHT|VCENTER )
6 的蓝色圆(LEFT|VCENTER )
[img]http://dl.iteye.com/upload/attachment/294749/ef60c0c7-0df8-3036-8ec6-a8f62efbcce0.jpg[/img]