Color of a screen pixel: Difference between revisions
Content added Content deleted
Line 679: | Line 679: | ||
=={{header|FutureBasic}}== |
=={{header|FutureBasic}}== |
||
Tracks color information of the pixel under the current mouse coordinates. |
Tracks color information of the pixel under the current mouse x/y coordinates. |
||
<syntaxhighlight lang="futurebasic"> |
<syntaxhighlight lang="futurebasic"> |
||
_window = 1 |
_window = 1 |
||
begin enum 1 |
begin enum 1 |
||
_view |
_view |
||
_colorWell |
_colorWell |
||
_imageView |
_imageView |
||
end enum |
end enum |
||
void local fn BuildWindow |
void local fn BuildWindow |
||
⚫ | |||
'~'1 |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end fn |
end fn |
||
void local fn DrawRect |
void local fn DrawRect |
||
⚫ | |||
'~'1 |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end fn |
end fn |
||
void local fn DoMouse( tag as NSInteger ) |
void local fn DoMouse( tag as NSInteger ) |
||
CGPoint pt = fn EventLocationInView( tag ) |
|||
'~'1 |
|||
ColorRef color = fn ViewColorAtPoint( tag, pt ) |
|||
ColorRef color = fn ViewColorAtPoint( tag, pt ) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end fn |
end fn |
||
void local fn DoDialog( ev as long, tag as long ) |
void local fn DoDialog( ev as long, tag as long ) |
||
⚫ | |||
'~'1 |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
case _viewMouseDragged : fn DoMouse( tag ) |
|||
⚫ | |||
⚫ | |||
end select |
end select |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end fn |
end fn |
||