Class: Fox::FXVisual
Overview
An FXVisual instance describes the pixel format for a drawable (i.e. an FXDrawable instance).
Construction options for FXVisual
VISUAL_DEFAULT
-
Default visual
VISUAL_MONOCHROME
-
Must be monochrome visual
VISUAL_BEST
-
Best (deepest) visual
VISUAL_INDEXCOLOR
-
Palette visual
VISUAL_GRAYSCALE
-
Gray scale visual
VISUAL_TRUECOLOR
-
Must be true color visual
VISUAL_OWNCOLORMAP
-
Allocate private colormap
VISUAL_DOUBLEBUFFER
-
Double-buffered FXGLVisual
VISUAL_STEREO
-
Stereo FXGLVisual
VISUAL_NOACCEL
-
No hardware acceleration [for broken h/w]
VISUAL_SWAP_COPY
-
Buffer swap by copying (for FXGLVisual)
Visual type
VISUALTYPE_UNKNOWN
-
Undetermined visual type
VISUALTYPE_MONO
-
Visual for drawing into 1-bpp surfaces
VISUALTYPE_TRUE
-
True color
VISUALTYPE_INDEX
-
Index [palette] color
VISUALTYPE_GRAY
-
Gray scale
Direct Known Subclasses
Instance Attribute Summary collapse
-
#depth ⇒ Object
readonly
Visual depth, i.e.
-
#flags ⇒ Object
readonly
Visual construction flags [Integer].
-
#maxColors ⇒ Object
Maximum number of colors [Integer].
-
#numBlue ⇒ Object
readonly
Number of bits of blue [Integer].
-
#numColors ⇒ Object
readonly
Number of colors [Integer].
-
#numGreen ⇒ Object
readonly
Number of bits of green [Integer].
-
#numRed ⇒ Object
readonly
Number of bits of red [Integer].
-
#visualType ⇒ Object
readonly
The visual type, one of
VISUALTYPE_MONO
,VISUALTYPE_TRUE
VISUALTYPE_INDEX
orVISUALTYPE_GRAY
.
Attributes inherited from FXId
Instance Method Summary collapse
-
#getColor(pix) ⇒ Object
Get color value for device pixel value pix.
-
#getPixel(clr) ⇒ Object
Get device pixel value for color value clr.
-
#initialize(a, flgs, d = 32) ⇒ FXVisual
constructor
Return an initialized FXVisual instance.
Methods inherited from FXId
#create, #created?, #destroy, #detach, #runOnUiThread
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(a, flgs, d = 32) ⇒ FXVisual
Return an initialized FXVisual instance.
Parameters:
a
-
an application instance Fox::FXApp
flgs
-
visual construction flags [Integer]
d
-
requested visual depth, in bits [Integer]
66 |
# File 'rdoc-sources/FXVisual.rb', line 66 def initialize(a, flgs, d=32); end |
Instance Attribute Details
#depth ⇒ Object (readonly)
Visual depth, i.e. number of significant bits in color representation [Integer]
32 33 34 |
# File 'rdoc-sources/FXVisual.rb', line 32 def depth @depth end |
#flags ⇒ Object (readonly)
Visual construction flags [Integer]
29 30 31 |
# File 'rdoc-sources/FXVisual.rb', line 29 def flags @flags end |
#maxColors ⇒ Object
Maximum number of colors [Integer]
47 48 49 |
# File 'rdoc-sources/FXVisual.rb', line 47 def maxColors @maxColors end |
#numBlue ⇒ Object (readonly)
Number of bits of blue [Integer]
44 45 46 |
# File 'rdoc-sources/FXVisual.rb', line 44 def numBlue @numBlue end |
#numColors ⇒ Object (readonly)
Number of colors [Integer]
35 36 37 |
# File 'rdoc-sources/FXVisual.rb', line 35 def numColors @numColors end |
#numGreen ⇒ Object (readonly)
Number of bits of green [Integer]
41 42 43 |
# File 'rdoc-sources/FXVisual.rb', line 41 def numGreen @numGreen end |
#numRed ⇒ Object (readonly)
Number of bits of red [Integer]
38 39 40 |
# File 'rdoc-sources/FXVisual.rb', line 38 def numRed @numRed end |
#visualType ⇒ Object (readonly)
The visual type, one of VISUALTYPE_MONO
, VISUALTYPE_TRUE
VISUALTYPE_INDEX
or VISUALTYPE_GRAY
. The visual type may also be VISUALTYPE_UNKNOWN
before the visual is actually created.
55 56 57 |
# File 'rdoc-sources/FXVisual.rb', line 55 def visualType @visualType end |
Instance Method Details
#getColor(pix) ⇒ Object
Get color value for device pixel value pix.
76 |
# File 'rdoc-sources/FXVisual.rb', line 76 def getColor(pix); end |
#getPixel(clr) ⇒ Object
Get device pixel value for color value clr.
71 |
# File 'rdoc-sources/FXVisual.rb', line 71 def getPixel(clr); end |