Source code: com/nokia/mid/ui/DirectGraphics.java
1 /*
2 * Nokia API for MicroEmulator
3 * Copyright (C) 2003 Markus Heberling <markus@heberling.net>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 package com.nokia.mid.ui;
21
22 import javax.microedition.lcdui.Image;
23
24
25 public interface DirectGraphics
26 {
27 public static final int FLIP_HORIZONTAL = 8192;
28 public static final int FLIP_VERTICAL = 16384;
29 public static final int ROTATE_90 = 90;
30 public static final int ROTATE_180 = 180;
31 public static final int ROTATE_270 = 270;
32 public static final int TYPE_BYTE_1_GRAY = 1;
33 public static final int TYPE_BYTE_1_GRAY_VERTICAL = -1;
34 public static final int TYPE_BYTE_2_GRAY = 2;
35 public static final int TYPE_BYTE_4_GRAY = 4;
36 public static final int TYPE_BYTE_8_GRAY = 8;
37 public static final int TYPE_BYTE_332_RGB = 332;
38 public static final int TYPE_USHORT_4444_ARGB = 4444;
39 public static final int TYPE_USHORT_444_RGB = 444;
40 public static final int TYPE_USHORT_555_RGB = 555;
41 public static final int TYPE_USHORT_1555_ARGB = 1555;
42 public static final int TYPE_USHORT_565_RGB = 565;
43 public static final int TYPE_INT_888_RGB = 888;
44 public static final int TYPE_INT_8888_ARGB = 8888;
45
46
47 public void drawImage(Image image, int x, int y, int anchor, int manipulation);
48
49 public void drawPixels(byte pixels[], byte transparencyMask[], int offset, int scanlength, int x, int y, int width,
50 int height, int manipulation, int format);
51
52 public void drawPixels(int pixels[], boolean transparency, int offset, int scanlength, int x, int y, int width,
53 int height, int manipulation, int format);
54
55 public void drawPixels(short pixels[], boolean transparency, int offset, int scanlength, int x, int y, int width,
56 int height, int manipulation, int format);
57
58 public void drawPolygon(int xPoints[], int xOffset, int yPoints[], int yOffset, int nPoints, int argbColor);
59
60 public void drawTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int argbColor);
61
62 public void fillPolygon(int xPoints[], int xOffset, int yPoints[], int yOffset, int nPoints, int argbColor);
63
64 public void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int argbColor);
65
66 public int getAlphaComponent();
67
68 public int getNativePixelFormat();
69
70 public void getPixels(byte pixels[], byte transparencyMask[], int offset, int scanlength, int x, int y, int width,
71 int height, int format);
72
73 public void getPixels(int pixels[], int offset, int scanlength, int x, int y, int width,
74 int height, int format);
75
76 public void getPixels(short pixels[], int offset, int scanlength, int x, int y, int width,
77 int height, int format);
78
79 public void setARGBColor(int i);
80
81 }