Map_Get_Pixel
Last Modified: May 23, 2005 20:05PM
|
|
| (Any)
|
Description
INT MAP_GET_PIXEL ( INT LIBRARY, INT GRAPH, INT X, INT Y )
It reads the value of a pixel of a graph
PARAMETERS:
INT library: Number of FPG library
INT graph: Number of graph inside of library
INT x: Horizontal coordinate
INT y: Vertical coordinate
DESCRIPTION:
This function returns the colour of a determined pixel inside a graph. The coordinates increase towards down and right, and the point (0, 0) represents the top left corner of the graph.
In the case of graphs of 256 colours (8 bits), the value returned by this function is a colour of 0 to 255. In opposite case the value returned is a codification of the components of the colour that depends of the video card and graph mode. It can be used Get_Rgb to obtain the approximated values of the components of the colour.
NOTES:
Although Get_Rgb returns value of 0 to 255 for each component of colour, it is important to understand that the precision of a mode of 16 bits is not sufficient to get all possibilities. Because the high value (255) can not be showed without 8 bits. It is not recommended the use of Map_Get_Pixel for collision maps, with graphs of 16 bits.
For that the use of arrays are recommended.
|
User Contributed Notes Map_Get_Pixel |
|
| There are no user contributed notes for this page. |
| Last updated: Tue, 24 May 2005 - 17:30:27 |
|
|