Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
Bitmapの色を反転させる
897 views
Skip to first unread message
Stone
unread,
Aug 5, 2010, 12:23:47 AM
8/5/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
Stone@東京.調布 です。
指定したBitmap(の色)を反転させたいんですが。方法がわかりません。
リストなどをクリックした際ピカっとなるあんな感じです。
リストに入れれば自動的になるんですが、リストにいれない生のBitmapを反転させたいです。
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/Xfermodes.html
ここにヒントが書かれてるみたいなんですが、なにがなにやらさっぱりわかりません。
試しに以下のようにしましたが、まっ黒けのままでした。
Xfermode sModes = new PorterDuffXfermode(PorterDuff.Mode.XOR);
Paint paint = new Paint();
// paint.setFilterBitmap(false);
paint.setXfermode(sModes);
canvas.drawBitmap(myBitmap, srcR, dstR, paint);
よろしくお願いします。
Stone
unread,
Aug 5, 2010, 6:31:17 AM
8/5/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
Stone@東京.調布です
事故レスです。
あれこれ試してやっと画像を反転できました。
たったこれだけです。
なにかよくわかりませんが、とにかくひっくり返ってくれました。
Paint paint = new Paint();
paint.setXfermode(new PixelXorXfermode(0xFFFFFF));
canvas.drawBitmap(myBitmap,src,dst,paint);
On 8月5日, 午後1:23, Stone <
ish...@cap.bekkoame.ne.jp
> wrote:
> Stone@東京.調布 です。
>
> 指定したBitmap(の色)を反転させたいんですが。方法がわかりません。
> リストなどをクリックした際ピカっとなるあんな感じです。
> リストに入れれば自動的になるんですが、リストにいれない生のBitmapを反転させたいです。
>
>
http://developer.android.com/resources/samples/ApiDemos/src/com/examp.
..
Reply all
Reply to author
Forward
0 new messages