FBA The Creator
http://www.fbacreator.com/fbaforum/

Get Color of the point
http://www.fbacreator.com/fbaforum/viewtopic.php?f=3&t=107
Page 1 of 1

Author:  Arnold [ Thu Aug 14, 2008 11:55 am ]
Post subject:  Get Color of the point

I try to write my first game "XONIX" on your's really super languge.

But problem is that it's impossible to get color of point of the screen i mean of Default render target that is the screen!

I mean--->
I know that it possible to get color of any image imagecolor(handle, x, y, red, green, blue)
but how can i get color of a any point i need of Default render target that is the screen?

the function i sugesst can look's like this: targetcolor(handle,x,y) or pointcolor(handle,x,y)

this function will be very useful.

Author:  umbiomar [ Sat Aug 16, 2008 6:34 am ]
Post subject:  Re: Get Color of the point

Arnold wrote:
I try to write my first game "XONIX" on your's really super languge.

But problem is that it's impossible to get color of point of the screen i mean of Default render target that is the screen!

I mean--->
I know that it possible to get color of any image imagecolor(handle, x, y, red, green, blue)
but how can i get color of a any point i need of Default render target that is the screen?

the function i sugesst can look's like this: targetcolor(handle,x,y) or pointcolor(handle,x,y)

this function will be very useful.


You are right, there's not such a function (at least in the current documentation).
I suppose is an easy task to accomplish for the author to extend the existent imagecolor that, called with a NIL handle argument, retrieve the color of default render target.

In the meantime, as a workaround, I suggest to create a backbuffer with the screen size, set this buffer as default target, get the imagecolor you need against this image and finally, blit that on screen.

This tecnique is explained in example project #18 Particles and buffer coming with FBA.

Author:  Arnold [ Mon Aug 18, 2008 7:28 am ]
Post subject:  Re: Get Color of the point

Thanks
I DID IT.
It's OK Now
Now i still writing Xonix.

Arnold

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/