Kenny_Liu's profile入乡随俗PhotosBlogListsMore ![]() | Help |
|
7/11/2006 2.0半透明矩形,傻归傻,总比没有好 public void fillRect(Graphics g, int x, int y,int w, int h,int ARGBColor) { if (w <= 0 || h <= 0) return; if ( (ARGBColor & 0xff000000) == 0xff000000) { g.setColor(ARGBColor); g.fillRect(x, y, w, h); } else if ( (ARGBColor & 0xff000000) != 0x00000000) { int[] ARGB = new int[w * h]; ARGB[0] = ARGBColor; int TempPos = 1; while (TempPos < ARGB.length) { int TempLen = TempPos; if (TempPos + TempLen > ARGB.length) { TempLen = ARGB.length - TempPos; } System.arraycopy(ARGB, 0, ARGB, TempPos, TempLen); TempPos += TempLen; } g.drawRGB(ARGB, 0, w, x, y,w, h, true); } } TrackbacksThe trackback URL for this entry is: http://killerliu.spaces.live.com/blog/cns!6EF2055BD4ADB55E!229.trak Weblogs that reference this entry
|
|
|