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 haxef...@googlegroups.com
I wanted to read pixel color either RGB or Hex from the screen for a point inside game window. This could be either a mouse coordinate or a FlxPoint. I searched for a while but could not found anything on this topic. I am not talking about reading pixels off the screen for making a bitmap or sprite. So I need color for one pixel not a given rect inside the screen. Like sorta this,
var pixColor = ReadPixelFromScreen(x, y); // x, y is a coordinate on the screen
Gama11
unread,
Oct 3, 2014, 11:02:17 AM10/3/14
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 haxef...@googlegroups.com
On Flash or HTML5, you can access the camera buffer for this:
FlxG.camera.buffer.getPixel(x, y);
That is, if you don't have any additional cameras / messed with the camera positioning.
solewalker
unread,
Oct 3, 2014, 11:46:45 AM10/3/14
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 haxef...@googlegroups.com
So it does not work on native? I am yet to try the code, as I am not at my home right now.
Gama11
unread,
Oct 3, 2014, 12:06:23 PM10/3/14
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 haxef...@googlegroups.com
Yep, no camera buffer in FLX_RENDER_TILE mode. There's no reliable way to get a BitmapData with the screen contents on native I know of.
solewalker
unread,
Oct 3, 2014, 2:52:43 PM10/3/14
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 haxef...@googlegroups.com
This is more of a openfl thing, I see they have implemented the function in development version of lime, so I would try to use dev lime, if it does not break flixel or other things.
Gama11
unread,
Oct 3, 2014, 3:11:19 PM10/3/14
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 haxef...@googlegroups.com
No, it's not. Which function do you mean? getPixel()? That's always been part of OpenFL's BitmapData, the problem is that FlxG.camera has no buffer BitmapData on native targets.
solewalker
unread,
Oct 3, 2014, 3:40:41 PM10/3/14
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