protected void computePolygon() {
trS=Math.min(width,height)/2-2;
orient=glyph.getOrient();
halfEdge=Math.round(0.866f*trS);
thirdHeight=Math.round(0.5f*trS);
xcoords[0]=(int)Math.round(cWidth-trS*Math.sin(orient));
xcoords[1]=(int)Math.round(cWidth-halfEdge*Math.cos(orient)+thirdHeight*Math.sin(orient));
xcoords[2]=(int)Math.round(cWidth+halfEdge*Math.cos(orient)+thirdHeight*Math.sin(orient));
ycoords[0]=(int)Math.round(cHeight-trS*Math.cos(orient));
ycoords[1]=(int)Math.round(cHeight+thirdHeight*Math.cos(orient)+halfEdge*Math.sin(orient));
ycoords[2]=(int)Math.round(cHeight+thirdHeight*Math.cos(orient)-halfEdge*Math.sin(orient));
p=new Polygon(xcoords,ycoords,3);
}
|