Point
 
Returns the color attribute of a specified pixel coordinate

Syntax

result = Point( coord_x, coord_y [,buffer] )
or
result = Point( function_index )


Usage

coord_x
x coordinate of the pixel
coord_y
y coordinate of the pixel
buffer
the image buffer to read from
function_index
the type of screen coordinate to return: one of the values 0, 1, 2, 3

Return Value

If the x, y coordinates of a pixel are provided Point returns the color attribute at the specified coordinates.
If the argument is a function index, Point returns one of the graphics cursor coordinates set by the last graphics command.

Argument Value Returned
0The current physical x coordinate.
1The current physical y coordinate.
2The current view x coordinate. This returns the same value as the POINT(0) function if the WINDOW statement has not been used.
3The current view y coordinate. This returns the same value as the POINT(1) function if the WINDOW statement has not been used.



Description

GfxLib Function with two different uses.
If supplied with two coordinates it reads the color of the pixel at the coordinate coord_x, coord_y of the screen, or of the buffer, if supplied.
The value return is a color index in a 256 or less color Screen, and an RGB value in true color modes. If the coordinates are off-screen or off-buffer, -1 is returned

If supplied with a single value it returns the one of the coordinates of the graphics cursor as set by the last graphics command executed. If the last command was executed in a buffer, the values returned will be coordinates in the buffer. Arguments out of the range 0-3 will return 0.

The function Point does not work in text modes.

Optimization note: while Point and the opposite PSet provide valid results, they are very slow. Much better performance can be achieved by using Peek after calculating the address yourself from values obtained from ImageInfo and ScreenInfo, or even more usig inline ASM.

Example

Screen 13 
Line (10,10)-(100,100),12
Print Point(20,20)

Output:
12
Differences from QB

  • buffer is new to FreeBASIC
  • In SVGA modes, a 32-bit RGB value is returned

See also

Сайт ПДСНПСР. Если ты патриот России - жми сюда!


Знаете ли Вы, что такое "усталость света"?
Усталость света, анг. tired light - это явление потери энергии квантом электромагнитного излучения при прохождении космических расстояний, то же самое, что эффект красного смещения спектра далеких галактик, обнаруженный Эдвином Хабблом в 1926 г.
На самом деле кванты света, проходя миллиарды световых лет, отдают свою энергию эфиру, "пустому пространству", так как он является реальной физической средой - носителем электромагнитных колебаний с ненулевой вязкостью или трением, и, следовательно, колебания в этой среде должны затухать с расходом энергии на трение. Трение это чрезвычайно мало, а потому эффект "старения света" или "красное смещение Хаббла" обнаруживается лишь на межгалактических расстояниях.
Таким образом, свет далеких звезд не суммируется со светом ближних. Далекие звезды становятся красными, а совсем далекие уходят в радиодиапазон и перестают быть видимыми вообще. Это реально наблюдаемое явление астрономии глубокого космоса. Подробнее читайте в FAQ по эфирной физике.

НОВОСТИ ФОРУМАФорум Рыцари теории эфира
Рыцари теории эфира
 10.11.2021 - 12:37: ПЕРСОНАЛИИ - Personalias -> WHO IS WHO - КТО ЕСТЬ КТО - Карим_Хайдаров.
10.11.2021 - 12:36: СОВЕСТЬ - Conscience -> РАСЧЕЛОВЕЧИВАНИЕ ЧЕЛОВЕКА. КОМУ ЭТО НАДО? - Карим_Хайдаров.
10.11.2021 - 12:36: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от д.м.н. Александра Алексеевича Редько - Карим_Хайдаров.
10.11.2021 - 12:35: ЭКОЛОГИЯ - Ecology -> Биологическая безопасность населения - Карим_Хайдаров.
10.11.2021 - 12:34: ВОЙНА, ПОЛИТИКА И НАУКА - War, Politics and Science -> Проблема государственного терроризма - Карим_Хайдаров.
10.11.2021 - 12:34: ВОЙНА, ПОЛИТИКА И НАУКА - War, Politics and Science -> ПРАВОСУДИЯ.НЕТ - Карим_Хайдаров.
10.11.2021 - 12:34: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от Вадима Глогера, США - Карим_Хайдаров.
10.11.2021 - 09:18: НОВЫЕ ТЕХНОЛОГИИ - New Technologies -> Волновая генетика Петра Гаряева, 5G-контроль и управление - Карим_Хайдаров.
10.11.2021 - 09:18: ЭКОЛОГИЯ - Ecology -> ЭКОЛОГИЯ ДЛЯ ВСЕХ - Карим_Хайдаров.
10.11.2021 - 09:16: ЭКОЛОГИЯ - Ecology -> ПРОБЛЕМЫ МЕДИЦИНЫ - Карим_Хайдаров.
10.11.2021 - 09:15: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от Екатерины Коваленко - Карим_Хайдаров.
10.11.2021 - 09:13: ВОСПИТАНИЕ, ПРОСВЕЩЕНИЕ, ОБРАЗОВАНИЕ - Upbringing, Inlightening, Education -> Просвещение от Вильгельма Варкентина - Карим_Хайдаров.
Bourabai Research Institution home page

Боровское исследовательское учреждение - Bourabai Research Bourabai Research Institution