Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.nokia.mid.ui
Class DirectGraphicsImp  view DirectGraphicsImp download DirectGraphicsImp.java

java.lang.Object
  extended bycom.nokia.mid.ui.DirectGraphicsImp
All Implemented Interfaces:
DirectGraphics

public class DirectGraphicsImp
extends java.lang.Object
implements DirectGraphics


Field Summary
private  int alphaComponent
           
private  javax.microedition.lcdui.Graphics graphics
           
 
Fields inherited from interface com.nokia.mid.ui.DirectGraphics
FLIP_HORIZONTAL, FLIP_VERTICAL, ROTATE_180, ROTATE_270, ROTATE_90, TYPE_BYTE_1_GRAY, TYPE_BYTE_1_GRAY_VERTICAL, TYPE_BYTE_2_GRAY, TYPE_BYTE_332_RGB, TYPE_BYTE_4_GRAY, TYPE_BYTE_8_GRAY, TYPE_INT_888_RGB, TYPE_INT_8888_ARGB, TYPE_USHORT_1555_ARGB, TYPE_USHORT_444_RGB, TYPE_USHORT_4444_ARGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB
 
Constructor Summary
DirectGraphicsImp(javax.microedition.lcdui.Graphics g)
           
 
Method Summary
private static int doAlpha(byte[] pix, byte[] alpha, int pos, int shift)
           
 void drawImage(javax.microedition.lcdui.Image img, int x, int y, int anchor, int manipulation)
           
 void drawPixels(byte[] pix, byte[] alpha, int off, int scanlen, int x, int y, int width, int height, int manipulation, int format)
           
 void drawPixels(int[] pix, boolean trans, int off, int scanlen, int x, int y, int width, int height, int manipulation, int format)
          Not supported
 void drawPixels(short[] pix, boolean trans, int off, int scanlen, int x, int y, int width, int height, int manipulation, int format)
          Only TYPE_USHORT_4444_ARGB format supported
 void drawPolygon(int[] xPoints, int xOffset, int[] yPoints, int yOffset, int nPoints, int argbColor)
          Not supported
 void drawTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int argbColor)
          Not supported
 void fillPolygon(int[] xPoints, int xOffset, int[] yPoints, int yOffset, int nPoints, int argbColor)
          Not supported
 void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int argbColor)
          Not supported
private static int fromARGB(int s, int type)
           
 int getAlphaComponent()
           
 int getNativePixelFormat()
           
 void getPixels(byte[] pix, byte[] alpha, int offset, int scanlen, int x, int y, int width, int height, int format)
          Not supported
 void getPixels(int[] pix, int offset, int scanlen, int x, int y, int width, int height, int format)
          Not supported
 void getPixels(short[] pix, int offset, int scanlen, int x, int y, int width, int height, int format)
          Only TYPE_USHORT_4444_ARGB format supported
private static boolean isBitSet(byte b, int pos)
           
private static boolean isTransparent(int s)
           
 void setARGBColor(int argb)
           
private static int toARGB(int s, int type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graphics

private javax.microedition.lcdui.Graphics graphics

alphaComponent

private int alphaComponent
Constructor Detail

DirectGraphicsImp

public DirectGraphicsImp(javax.microedition.lcdui.Graphics g)
Method Detail

drawImage

public void drawImage(javax.microedition.lcdui.Image img,
                      int x,
                      int y,
                      int anchor,
                      int manipulation)
Specified by:
drawImage in interface DirectGraphics

setARGBColor

public void setARGBColor(int argb)
Specified by:
setARGBColor in interface DirectGraphics

getAlphaComponent

public int getAlphaComponent()
Specified by:
getAlphaComponent in interface DirectGraphics

getNativePixelFormat

public int getNativePixelFormat()
Specified by:
getNativePixelFormat in interface DirectGraphics

drawPolygon

public void drawPolygon(int[] xPoints,
                        int xOffset,
                        int[] yPoints,
                        int yOffset,
                        int nPoints,
                        int argbColor)
Not supported

Specified by:
drawPolygon in interface DirectGraphics

drawTriangle

public void drawTriangle(int x1,
                         int y1,
                         int x2,
                         int y2,
                         int x3,
                         int y3,
                         int argbColor)
Not supported

Specified by:
drawTriangle in interface DirectGraphics

fillPolygon

public void fillPolygon(int[] xPoints,
                        int xOffset,
                        int[] yPoints,
                        int yOffset,
                        int nPoints,
                        int argbColor)
Not supported

Specified by:
fillPolygon in interface DirectGraphics

fillTriangle

public void fillTriangle(int x1,
                         int y1,
                         int x2,
                         int y2,
                         int x3,
                         int y3,
                         int argbColor)
Not supported

Specified by:
fillTriangle in interface DirectGraphics

drawPixels

public void drawPixels(byte[] pix,
                       byte[] alpha,
                       int off,
                       int scanlen,
                       int x,
                       int y,
                       int width,
                       int height,
                       int manipulation,
                       int format)
Specified by:
drawPixels in interface DirectGraphics

drawPixels

public void drawPixels(short[] pix,
                       boolean trans,
                       int off,
                       int scanlen,
                       int x,
                       int y,
                       int width,
                       int height,
                       int manipulation,
                       int format)
Only TYPE_USHORT_4444_ARGB format supported

Specified by:
drawPixels in interface DirectGraphics

drawPixels

public void drawPixels(int[] pix,
                       boolean trans,
                       int off,
                       int scanlen,
                       int x,
                       int y,
                       int width,
                       int height,
                       int manipulation,
                       int format)
Not supported

Specified by:
drawPixels in interface DirectGraphics

getPixels

public void getPixels(byte[] pix,
                      byte[] alpha,
                      int offset,
                      int scanlen,
                      int x,
                      int y,
                      int width,
                      int height,
                      int format)
Not supported

Specified by:
getPixels in interface DirectGraphics

getPixels

public void getPixels(short[] pix,
                      int offset,
                      int scanlen,
                      int x,
                      int y,
                      int width,
                      int height,
                      int format)
Only TYPE_USHORT_4444_ARGB format supported

Specified by:
getPixels in interface DirectGraphics

getPixels

public void getPixels(int[] pix,
                      int offset,
                      int scanlen,
                      int x,
                      int y,
                      int width,
                      int height,
                      int format)
Not supported

Specified by:
getPixels in interface DirectGraphics

doAlpha

private static int doAlpha(byte[] pix,
                           byte[] alpha,
                           int pos,
                           int shift)

isBitSet

private static boolean isBitSet(byte b,
                                int pos)

toARGB

private static int toARGB(int s,
                          int type)

fromARGB

private static int fromARGB(int s,
                            int type)

isTransparent

private static boolean isTransparent(int s)