Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Drawing a part of a Drawable on a Canvas

Drawing a part of a Drawable on a Canvas

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Drawing a part of a Drawable on a Canvas

Postby Risike » Mon May 25, 2009 11:40 am

Hi,

I would like to draw a part of an image (png) I have in the "drawable" folder on a canvas.
But there is only a drawBitmap method to draw some parts of an image.

How can I do this please ?
Risike
Freshman
Freshman
 
Posts: 3
Joined: Wed May 13, 2009 1:23 pm

Top

Postby cokoyan » Sun Jul 12, 2009 6:53 pm

you need to load the compete image and extract one part like this :

Bitmap theSpriteSheet = BitmapFactory.loadBitmap(...);
Bitmap theSpritePart = Bitmap.createBitmap( theSpriteSheet, x,y,width,height);

theSpritePart contain only a part of the sprite sheet.
Approxymatly it's like this if I understand correctly our request ^^
cokoyan
Junior Developer
Junior Developer
 
Posts: 13
Joined: Sat Jul 04, 2009 7:05 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest