Please suggest Substitute for drawRegion in android

by manohar » Wed, 25 Mar 2009 01:33:24 GMT

Sponsored Links
 Hi All,
I am converting a game from j2me to android. Instead of drawRegion i
tried using bitmap.  For translation 0 it works properly means
TRANS_NONE.  I am unable to get the out put for TRANS_MIRROR and
TRANS_MIRROR_ROT180. pls any one can guide me on this.

My drawRegion is some thing like this.
GraphicsContext.drawRegion( s.Data, sourceX,
sourceY,sourceWidth ,sourceHeight, flips, posX,posY, Graphics.TOP |
Graphics.LEFT );

can you please any one guide on this?


Other Threads

1. WebView addJavascriptInterface

I need to create secondary object in android project .java  file So, I
can write like
inside our class-

   webview.addJavascriptInterface(new MyParent() , "MyParent");
   webview.addJavascriptInterface(new MyChild() , "MyParent.MyChild");

class Widget
class Message  //  secondary class's object
  public String test()
  { }
to call the method of secondary object- message from javascript file
   var strname=Widget.Message.test()

 It won't allow due to dot "." or any other reason  in interfaceName
that I pass in addJavascriptInterface() method at cpp layer. Can any
body tell how to create and where to modify in webkit.
Thanks in advance


2. Question about view onDraw

   My english is not good. I have a view with procedure onDraw:
   I want to load the two image from the R.drawable.crab file to
simulate the GIF Animator. But it only display the image once. Here is
my code.
(Remark: the first and second image are cut from R.drawable.crab)
             protected void onDraw(Canvas canvas){
                 Resources res = getResources();
                 Bitmap icon = BitmapFactory.decodeResource(res,
R.drawable.crab );
                 //first image cut from crab image file
                 Bitmap bm1 = Bitmap.createBitmap(icon, 0, 100, 100, 100);

                 //second image cut from crab image file
                 Bitmap bm2 = Bitmap.createBitmap(icon, 0, 200, 100, 100);

                 //display first image
                 canvas.drawBitmap(bm1, 100, 100, null);
                        try {
                        } catch (InterruptedException e) {
                          // TODO Auto-generated catch block
                     //display second image
                 canvas.drawBitmap(bm2, 100, 100, null);

3. Final yr project -- message inbox search -- help

4. Bachelor Thesis about Android

5. JUnit and Basic Java.

6. Java based UI & Scrolling of text

7. How to add a toggle list to a view